Skip to content

Commit ee740b6

Browse files
author
CNCoderX
committed
mvvm
1 parent b82a66a commit ee740b6

File tree

260 files changed

+6542
-7966
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

260 files changed

+6542
-7966
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@
66
.DS_Store
77
/build
88
/captures
9+
.externalNativeBuild

.idea/.name

-1
This file was deleted.

.idea/gradle.xml

-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/inspectionProfiles/Project_Default.xml

+1-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

+3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/modules.xml

+1-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/vcs.xml

+6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/build.gradle

+19-17
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,49 @@
11
apply plugin: 'com.android.application'
2-
apply plugin: 'com.jakewharton.butterknife'
32

43
android {
54
compileSdkVersion 25
65
buildToolsVersion "25.0.3"
7-
86
defaultConfig {
9-
applicationId "com.cncoderx.github"
7+
applicationId "com.cncoderx.andhub"
108
minSdkVersion 14
119
targetSdkVersion 25
1210
versionCode 1
1311
versionName "1.0"
14-
vectorDrawables.useSupportLibrary = true
12+
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
1513
}
1614
buildTypes {
1715
release {
1816
minifyEnabled false
1917
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
2018
}
21-
debug {
22-
minifyEnabled false
23-
}
2419
}
25-
lintOptions {
26-
checkReleaseBuilds false
27-
abortOnError false
20+
dataBinding {
21+
enabled = true
2822
}
2923
}
3024

3125
dependencies {
32-
compile fileTree(include: ['*.jar'], dir: 'libs')
26+
compile fileTree(dir: 'libs', include: ['*.jar'])
27+
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
28+
exclude group: 'com.android.support', module: 'support-annotations'
29+
})
3330
testCompile 'junit:junit:4.12'
34-
3531
compile 'com.android.support:appcompat-v7:25.3.1'
3632

37-
compile 'com.jakewharton:butterknife:8.4.0'
38-
annotationProcessor 'com.jakewharton:butterknife-compiler:8.4.0'
33+
// compile 'io.reactivex.rxjava2:rxandroid:2.0.1'
34+
// compile 'io.reactivex.rxjava2:rxjava:2.1.7'
35+
// compile 'io.reactivex:rxandroid:1.2.0'
36+
37+
compile 'com.trello.rxlifecycle2:rxlifecycle:2.2.1'
38+
compile 'com.trello.rxlifecycle2:rxlifecycle-android:2.2.1'
39+
40+
compile 'com.squareup.retrofit2:retrofit:2.3.0'
41+
compile 'com.squareup.retrofit2:converter-gson:2.3.0'
42+
compile 'com.squareup.retrofit2:adapter-rxjava2:2.3.0'
43+
compile 'com.squareup.okhttp3:logging-interceptor:3.4.0-RC1'
3944

4045
compile 'com.github.bumptech.glide:glide:4.3.0'
4146
annotationProcessor 'com.github.bumptech.glide:compiler:4.3.0'
4247

4348
compile 'com.cncoderx.recyclerviewhelper:library:1.2.0'
44-
45-
releaseCompile project(path: ':githubsdk', configuration: 'release')
46-
debugCompile project(path: ':githubsdk', configuration: 'debug')
4749
}

app/libs/commons-lang-2.6.jar

-278 KB
Binary file not shown.

app/libs/github-api-1.89.jar

-323 KB
Binary file not shown.

app/libs/markdown4j-2.2.jar

-57.7 KB
Binary file not shown.

app/proguard-rules.pro

+8
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,11 @@
1515
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
1616
# public *;
1717
#}
18+
19+
# Uncomment this to preserve the line number information for
20+
# debugging stack traces.
21+
#-keepattributes SourceFile,LineNumberTable
22+
23+
# If you keep the line number information, uncomment this to
24+
# hide the original source file name.
25+
#-renamesourcefileattribute SourceFile
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
package com.cncoderx.andhub;
2+
3+
import android.content.Context;
4+
import android.support.test.InstrumentationRegistry;
5+
import android.support.test.runner.AndroidJUnit4;
6+
7+
import org.junit.Test;
8+
import org.junit.runner.RunWith;
9+
10+
import static org.junit.Assert.*;
11+
12+
/**
13+
* Instrumentation test, which will execute on an Android device.
14+
*
15+
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
16+
*/
17+
@RunWith(AndroidJUnit4.class)
18+
public class ExampleInstrumentedTest {
19+
@Test
20+
public void useAppContext() throws Exception {
21+
// Context of the app under test.
22+
Context appContext = InstrumentationRegistry.getTargetContext();
23+
24+
assertEquals("com.cncoderx.andhub", appContext.getPackageName());
25+
}
26+
}

app/src/androidTest/java/com/cncoderx/github/ApplicationTest.java

-14
This file was deleted.

app/src/main/AndroidManifest.xml

+79-73
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,16 @@
1-
<?xml version="1.0" encoding="utf-8"?>
21
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3-
xmlns:tools="http://schemas.android.com/tools"
4-
package="com.cncoderx.github">
2+
package="com.cncoderx.andhub">
53

6-
<!-- <uses-sdk -->
7-
<!-- android:minSdkVersion="16" -->
8-
<!-- android:targetSdkVersion="19" tools:overrideLibrary="org.xwalk.core"/> -->
94
<uses-permission android:name="android.permission.GET_ACCOUNTS"/>
105
<uses-permission android:name="android.permission.INTERNET"/>
116
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
127
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
138
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
14-
<uses-permission android:name="android.permission.MANAGE_ACCOUNTS" android:maxSdkVersion="22"/>
15-
<uses-permission android:name="android.permission.USE_CREDENTIALS" android:maxSdkVersion="22"/>
169
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
10+
<uses-permission android:name="android.permission.MANAGE_ACCOUNTS"
11+
android:maxSdkVersion="22"/>
12+
<uses-permission android:name="android.permission.USE_CREDENTIALS"
13+
android:maxSdkVersion="22"/>
1714
<uses-permission android:name="android.permission.AUTHENTICATE_ACCOUNTS"
1815
android:maxSdkVersion="22"/>
1916

@@ -22,8 +19,8 @@
2219
android:allowBackup="true"
2320
android:icon="@mipmap/ic_launcher"
2421
android:label="@string/app_name"
25-
android:supportsRtl="true"
2622
android:theme="@style/AppTheme">
23+
2724
<activity
2825
android:name=".ui.activity.SplashActivity">
2926
<intent-filter>
@@ -32,72 +29,81 @@
3229
<category android:name="android.intent.category.LAUNCHER"/>
3330
</intent-filter>
3431
</activity>
32+
33+
<activity
34+
android:name=".ui.activity.LoginActivity"
35+
android:label="@string/login"/>
36+
37+
<activity
38+
android:name=".ui.activity.SearchActivity"
39+
android:windowSoftInputMode="stateHidden|stateUnchanged"
40+
android:label="@string/search"/>
41+
3542
<activity
3643
android:name=".ui.activity.MainActivity"
3744
android:launchMode="singleTask"
38-
android:label="@string/app_name">
39-
</activity>
40-
<activity android:name=".ui.activity.LoginActivity"
41-
android:label="@string/login">
42-
</activity>
43-
<activity android:name=".ui.activity.SearchActivity"
44-
android:windowSoftInputMode="stateHidden|stateUnchanged"
45-
android:label="@string/search">
46-
</activity>
47-
<activity android:name=".ui.activity.RepositoryActivity"
48-
android:label="@string/repositories">
49-
</activity>
50-
<activity android:name=".ui.activity.CodeReviewActivity"
51-
android:label="">
52-
</activity>
53-
<activity android:name=".ui.activity.IssueCommentActivity"
54-
android:label="@string/issues">
55-
</activity>
56-
<activity android:name=".ui.activity.PullCommentActivity"
57-
android:label="@string/pull_requests">
58-
</activity>
59-
<activity android:name=".ui.activity.ProfileActivity"
60-
android:label="">
61-
</activity>
62-
<activity android:name=".ui.activity.OrganizationActivity"
63-
android:label="">
64-
</activity>
65-
<activity android:name=".ui.activity.FollowerListActivity"
66-
android:label="@string/followers2">
67-
</activity>
68-
<activity android:name=".ui.activity.FollowingListActivity"
69-
android:label="@string/following2">
70-
</activity>
71-
<activity android:name=".ui.activity.GistActivity"
72-
android:label="@string/gists">
73-
</activity>
74-
<activity android:name=".ui.activity.GistCommentActivity"
75-
android:label="@string/comments">
76-
</activity>
77-
<activity android:name=".ui.activity.SettingActivity"
78-
android:label="@string/settings">
79-
</activity>
80-
<activity android:name=".ui.activity.CodeStyleSettingActivity"
81-
android:label="@string/code_style">
82-
</activity>
83-
<activity android:name=".ui.activity.RepoListActivity"
84-
android:label="@string/repositories">
85-
</activity>
86-
<activity android:name=".ui.activity.GistListActivity"
87-
android:label="@string/gists">
88-
</activity>
89-
<activity android:name=".ui.activity.OrganListActivity"
90-
android:label="@string/organizations">
91-
</activity>
92-
<activity android:name=".ui.activity.MemberListActivity"
93-
android:label="@string/members">
94-
</activity>
95-
<activity android:name=".ui.activity.AccountListActivity"
96-
android:label="@string/accounts">
97-
</activity>
98-
<activity android:name=".ui.activity.AboutActivity"
99-
android:label="@string/about">
100-
</activity>
45+
android:label="@string/app_name"/>
46+
47+
<activity
48+
android:name=".ui.activity.SettingActivity"
49+
android:label="@string/settings"/>
50+
51+
<activity
52+
android:name=".ui.activity.CodeStyleSettingActivity"
53+
android:label="@string/code_style"/>
54+
55+
<activity
56+
android:name=".ui.activity.AboutActivity"
57+
android:label="@string/about"/>
58+
59+
<activity android:name=".ui.activity.ProfileActivity"/>
60+
61+
<activity
62+
android:name=".ui.activity.FollowerListActivity"
63+
android:label="@string/followers2"/>
64+
65+
<activity
66+
android:name=".ui.activity.FollowingListActivity"
67+
android:label="@string/following2"/>
68+
69+
<activity
70+
android:name=".ui.activity.RepoListActivity"
71+
android:label="@string/repositories"/>
72+
73+
<activity
74+
android:name=".ui.activity.GistListActivity"
75+
android:label="@string/gists"/>
76+
77+
<activity
78+
android:name=".ui.activity.MemberListActivity"
79+
android:label="@string/members"/>
80+
81+
<activity
82+
android:name=".ui.activity.OrganListActivity"
83+
android:label="@string/organizations"/>
84+
85+
<activity
86+
android:name=".ui.activity.RepositoryActivity"
87+
android:label="@string/repositories"/>
88+
89+
<activity
90+
android:name=".ui.activity.CodeReviewActivity"/>
91+
92+
<activity
93+
android:name=".ui.activity.IssueCommentActivity"
94+
android:label="@string/issues"/>
95+
96+
<activity
97+
android:name=".ui.activity.PullCommentActivity"
98+
android:label="@string/pull_requests"/>
99+
100+
<activity
101+
android:name=".ui.activity.GistActivity"
102+
android:label="@string/gists"/>
103+
104+
<activity
105+
android:name=".ui.activity.GistCommentActivity"
106+
android:label="@string/gists"/>
101107

102108
<service android:name=".service.AccountAuthenticatorService"
103109
android:exported="false">
@@ -110,4 +116,4 @@
110116
</service>
111117
</application>
112118

113-
</manifest>
119+
</manifest>

0 commit comments

Comments
 (0)