Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
QArtur99 committed Dec 24, 2017
0 parents commit d309640
Show file tree
Hide file tree
Showing 77 changed files with 2,773 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
*.iml
.gradle
/local.properties
/.idea/workspace.xml
/.idea/libraries
.DS_Store
/build
/captures
.externalNativeBuild
15 changes: 15 additions & 0 deletions .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/encodings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 18 additions & 0 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

49 changes: 49 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions .idea/runConfigurations.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions app/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
56 changes: 56 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
apply plugin: 'com.android.application'


def poloFile = file("C:\\Users\\USER\\AndroidStudioProjects\\.gradle\\poloa.properties")
def poloProperties = new Properties()
poloProperties.load(new FileInputStream(poloFile))

android {
compileSdkVersion 26
defaultConfig {
applicationId "com.artf.poloa"
minSdkVersion 19
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'


buildTypes.each {
it.buildConfigField 'String', 'KEY', poloProperties['KEY']
it.buildConfigField 'String', 'SECRET', poloProperties['SECRET']
}
}
}
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
//Butter knife
implementation 'com.jakewharton:butterknife:8.8.0'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.0'
//Retrofit
implementation "com.squareup.retrofit2:retrofit:$retrofitVersion"
implementation "com.squareup.retrofit2:retrofit:$retrofitVersion"
implementation "com.squareup.retrofit2:adapter-rxjava2:$retrofitVersion"
implementation "com.squareup.retrofit2:converter-gson:$retrofitVersion"
//Dagger
implementation 'com.google.dagger:dagger:2.12'
annotationProcessor 'com.google.dagger:dagger-compiler:2.12'
//RxJava
implementation 'io.reactivex.rxjava2:rxandroid:2.0.1'
implementation 'io.reactivex.rxjava2:rxjava:2.1.5'
//http logging
implementation 'com.squareup.okhttp3:logging-interceptor:3.4.2'
implementation 'org.glassfish.main:javax.annotation:4.0-b33'
}
21 changes: 21 additions & 0 deletions app/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}

# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package com.artf.poloa;

import android.content.Context;
import android.support.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4;

import org.junit.Test;
import org.junit.runner.RunWith;

import static org.junit.Assert.*;

/**
* Instrumented test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() throws Exception {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getTargetContext();

assertEquals("com.artf.poloa", appContext.getPackageName());
}
}
27 changes: 27 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.artf.poloa">

<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>


<application
android:name=".presenter.root.App"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".MainActivity"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>

<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
</application>

</manifest>
58 changes: 58 additions & 0 deletions app/src/main/java/com/artf/poloa/MainActivity.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
package com.artf.poloa;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;

import com.artf.poloa.presenter.manager.ManagerMVP;
import com.artf.poloa.presenter.rmi.RmiMVP;
import com.artf.poloa.presenter.root.App;
import com.artf.poloa.presenter.volume.VolumeMVP;

import javax.inject.Inject;

public class MainActivity extends AppCompatActivity implements ManagerMVP.View {

@Inject
ManagerMVP.ThreadReceiver managerThreadReceiver;

@Inject
RmiMVP.ThreadUI rmiThread;

@Inject
VolumeMVP.ThreadUI volumeThread;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
((App) getApplication()).getComponent().inject(this);

managerThreadReceiver.setView(this);
managerThreadReceiver.startThread();

volumeThread.setDataReciver(managerThreadReceiver);
volumeThread.startThread();

rmiThread.setDataReciver(managerThreadReceiver);
rmiThread.startThread();

}


@Override
public void onBackPressed() {
// MainActivity.this.finish();
}

@Override
protected void onDestroy() {
super.onDestroy();
managerThreadReceiver.onStop();
rmiThread.onStop();
}

@Override
public void onStart() {
super.onStart();
}
}
17 changes: 17 additions & 0 deletions app/src/main/java/com/artf/poloa/data/entity/Buy.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package com.artf.poloa.data.entity;

import com.google.gson.annotations.SerializedName;

import java.util.List;

import javax.annotation.Generated;

@Generated("com.robohorse.robopojogenerator")
public class Buy{

@SerializedName("resultingTrades")
public List<ResultingTradesItem> resultingTrades;

@SerializedName("orderNumber")
public long orderNumber;
}
33 changes: 33 additions & 0 deletions app/src/main/java/com/artf/poloa/data/entity/PublicChartData.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
package com.artf.poloa.data.entity;

import com.google.gson.annotations.SerializedName;

import javax.annotation.Generated;

@Generated("com.robohorse.robopojogenerator")
public class PublicChartData{

@SerializedName("date")
public int date;

@SerializedName("volume")
public double volume;

@SerializedName("high")
public double high;

@SerializedName("low")
public double low;

@SerializedName("weightedAverage")
public double weightedAverage;

@SerializedName("quoteVolume")
public double quoteVolume;

@SerializedName("close")
public double close;

@SerializedName("open")
public double open;
}
Loading

0 comments on commit d309640

Please sign in to comment.