Skip to content

Commit d5ff247

Browse files
committed
Merge branch 'release/2.3.1'
2 parents 06fdea0 + bd1bffc commit d5ff247

28 files changed

+704
-435
lines changed

.idea/copyright/EManual.xml

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/inspectionProfiles/Project_Default.xml

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/inspectionProfiles/profiles_settings.xml

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

Lines changed: 0 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/app.iml

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -87,44 +87,40 @@
8787
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/rs" isTestSource="true" />
8888
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/assets" />
8989
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/blame" />
90-
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/classes" />
91-
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/dependency-cache" />
92-
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/dex" />
93-
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/appcompat-v7/21.0.3/jars" />
94-
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-v4/22.2.0/jars" />
90+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/appcompat-v7/23.1.1/jars" />
91+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/cardview-v7/23.1.1/jars" />
92+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/design/23.1.1/jars" />
93+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/recyclerview-v7/23.1.1/jars" />
94+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-v4/23.1.1/jars" />
9595
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.beardedhen/androidbootstrap/2.0.1/jars" />
9696
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.jpardogo.materialtabstrip/library/1.1.0/jars" />
9797
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental" />
98-
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/jniLibs" />
9998
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/manifests" />
100-
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/multi-dex" />
101-
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/pre-dexed" />
10299
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/res" />
103-
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/resources" />
104100
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/rs" />
105101
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/symbols" />
106-
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/tmp" />
107-
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/transforms" />
108102
<excludeFolder url="file://$MODULE_DIR$/build/outputs" />
109-
<excludeFolder url="file://$MODULE_DIR$/build/tmp" />
110103
</content>
111-
<orderEntry type="jdk" jdkName="Android API 21 Platform" jdkType="Android SDK" />
104+
<orderEntry type="jdk" jdkName="Android API 23 Platform" jdkType="Android SDK" />
112105
<orderEntry type="sourceFolder" forTests="false" />
113106
<orderEntry type="library" exported="" name="avoscloud-sdk-v3.12.1" level="project" />
114107
<orderEntry type="library" exported="" name="support-annotations-23.1.1" level="project" />
115108
<orderEntry type="library" exported="" name="okhttp-2.6.0-leancloud" level="project" />
109+
<orderEntry type="library" exported="" name="design-23.1.1" level="project" />
116110
<orderEntry type="library" exported="" name="butterknife-7.0.1" level="project" />
117111
<orderEntry type="library" exported="" name="zip4j_1.3.2" level="project" />
118112
<orderEntry type="library" exported="" name="android-async-http-1.4.9" level="project" />
119113
<orderEntry type="library" exported="" name="gson-2.3.1" level="project" />
120-
<orderEntry type="library" exported="" name="appcompat-v7-21.0.3" level="project" />
114+
<orderEntry type="library" exported="" name="recyclerview-v7-23.1.1" level="project" />
115+
<orderEntry type="library" exported="" name="support-v4-23.1.1" level="project" />
121116
<orderEntry type="library" exported="" name="androidbootstrap-2.0.1" level="project" />
122117
<orderEntry type="library" exported="" name="okio-1.6.0-leancloud" level="project" />
118+
<orderEntry type="library" exported="" name="appcompat-v7-23.1.1" level="project" />
123119
<orderEntry type="library" exported="" name="httpclient-4.3.6" level="project" />
124120
<orderEntry type="library" exported="" name="library-1.1.0" level="project" />
125121
<orderEntry type="library" exported="" name="umeng-analytics-v5.6.4" level="project" />
126-
<orderEntry type="library" exported="" name="support-v4-22.2.0" level="project" />
127122
<orderEntry type="library" exported="" name="fastjson-1.1.39-leancloud" level="project" />
123+
<orderEntry type="library" exported="" name="cardview-v7-23.1.1" level="project" />
128124
<orderEntry type="module" module-name="umeng-update" exported="" />
129125
</component>
130126
</module>

app/build.gradle

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
apply plugin: 'com.android.application'
22

33
android {
4-
compileSdkVersion 21
4+
compileSdkVersion 23
55
buildToolsVersion "21.1.2"
66

77
defaultConfig {
88
applicationId "io.github.emanual.app"
99
minSdkVersion 14
10-
targetSdkVersion 21
11-
versionCode 15
12-
versionName "2.3.0"
10+
targetSdkVersion 23
11+
versionCode 16
12+
versionName "2.3.1"
1313

1414
}
1515
signingConfigs {
@@ -84,7 +84,12 @@ android {
8484

8585
dependencies {
8686
compile fileTree(dir: 'libs', include: ['*.jar'])
87-
compile 'com.android.support:appcompat-v7:21.0.3'
87+
compile 'com.android.support:appcompat-v7:23.1.1'
88+
compile "com.android.support:design:23.1.1"
89+
compile "com.android.support:support-v4:23.1.1"
90+
compile "com.android.support:recyclerview-v7:23.1.1"
91+
compile "com.android.support:cardview-v7:23.1.1"
92+
8893
//https://github.com/JakeWharton/butterknife
8994
compile 'com.jakewharton:butterknife:7.0.1'
9095

app/src/main/AndroidManifest.xml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,23 +36,28 @@
3636
</activity>
3737
<activity
3838
android:name=".ui.Detail"
39-
android:launchMode="singleTask">
39+
android:launchMode="singleTask"
40+
android:theme="@style/AppTheme.TransparentActivity">
4041
</activity>
4142
<activity
4243
android:name=".ui.About"
43-
android:launchMode="singleTask">
44+
android:launchMode="singleTask"
45+
android:theme="@style/AppTheme.TransparentActivity">
4446
</activity>
4547
<activity
4648
android:name=".ui.FileTree"
47-
android:launchMode="singleTask">
49+
android:launchMode="singleTask"
50+
android:theme="@style/AppTheme.TransparentActivity">
4851
</activity>
4952
<activity
5053
android:name=".ui.Feedback"
51-
android:launchMode="singleTask">
54+
android:launchMode="singleTask"
55+
android:theme="@style/AppTheme.TransparentActivity">
5256
</activity>
5357
<activity
5458
android:name=".ui.Browser"
55-
android:launchMode="singleTask">
59+
android:launchMode="singleTask"
60+
android:theme="@style/AppTheme.TransparentActivity">
5661
</activity>
5762

5863
<service android:name=".CoreService">

app/src/main/java/io/github/emanual/app/ui/About.java

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,29 @@
11
package io.github.emanual.app.ui;
22

3-
import io.github.emanual.app.R;
4-
import io.github.emanual.app.utils.AndroidUtils;
5-
6-
import android.content.Intent;
73
import android.content.pm.PackageManager.NameNotFoundException;
84
import android.os.Bundle;
95
import android.support.v7.widget.Toolbar;
106
import android.view.MenuItem;
117
import android.widget.TextView;
128

13-
import butterknife.ButterKnife;
14-
import butterknife.OnClick;
9+
import butterknife.Bind;
10+
import io.github.emanual.app.R;
11+
import io.github.emanual.app.utils.AndroidUtils;
1512

16-
public class About extends BaseActivity {
13+
public class About extends SwipeBackActivity {
14+
15+
@Bind(R.id.tv_version) TextView tv_version;
1716

1817
@Override protected void onCreate(Bundle savedInstanceState) {
1918
super.onCreate(savedInstanceState);
20-
setContentView(R.layout.acty_about);
21-
ButterKnife.bind(this);
22-
initData();
23-
initLayout();
2419
}
2520

2621
@Override protected void initData() {
27-
22+
super.initData();
2823
}
2924

3025
@Override protected void initLayout() {
26+
super.initLayout();
3127
setSupportActionBar((Toolbar) findViewById(R.id.toolbar));
3228
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
3329
getSupportActionBar().setTitle(R.string.acty_about);
@@ -36,12 +32,16 @@ public class About extends BaseActivity {
3632
String text = String.format("%s v%s",
3733
getResources().getString(R.string.application_name),
3834
AndroidUtils.getAppVersionName(getContext()));
39-
((TextView) _getView(R.id.tv_version)).setText(text);
35+
tv_version.setText(text);
4036
} catch (NameNotFoundException e) {
4137
e.printStackTrace();
4238
}
4339
}
4440

41+
@Override protected int getContentViewId() {
42+
return R.layout.acty_about;
43+
}
44+
4545
@Override public boolean onOptionsItemSelected(MenuItem item) {
4646
if (item.getItemId() == android.R.id.home) {
4747
finish();

app/src/main/java/io/github/emanual/app/ui/ArticleList.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
import java.util.List;
2525

2626
import butterknife.Bind;
27-
import butterknife.ButterKnife;
2827
import cz.msebera.android.httpclient.Header;
2928
import io.github.emanual.app.R;
3029
import io.github.emanual.app.api.JavaAPI;
@@ -46,10 +45,6 @@ public class ArticleList extends BaseActivity implements OnRefreshListener,
4645
@Override
4746
protected void onCreate(Bundle savedInstanceState) {
4847
super.onCreate(savedInstanceState);
49-
setContentView(R.layout.acty_articlelist);
50-
ButterKnife.bind(this);
51-
initData();
52-
initLayout();
5348
}
5449

5550
@Override
@@ -69,16 +64,21 @@ protected void initLayout() {
6964
mActionBar.setTitle(topic);
7065
mActionBar.setDisplayHomeAsUpEnabled(true);
7166
swipeRefreshLayout.setOnRefreshListener(this);
72-
swipeRefreshLayout.setColorScheme(android.R.color.holo_blue_bright,
73-
android.R.color.holo_blue_light,
74-
android.R.color.holo_blue_bright,
75-
android.R.color.holo_blue_light);
67+
// swipeRefreshLayout.setColorScheme(android.R.color.holo_blue_bright,
68+
// android.R.color.holo_blue_light,
69+
// android.R.color.holo_blue_bright,
70+
// android.R.color.holo_blue_light);
71+
swipeRefreshLayout.setColorSchemeResources(android.R.color.holo_blue_light);
7672
lv.setAdapter(adapter);
7773
lv.setOnScrollListener(this);
7874
lv.setOnItemClickListener(this);
7975
onRefresh();
8076
}
8177

78+
@Override protected int getContentViewId() {
79+
return R.layout.acty_articlelist;
80+
}
81+
8282
@Override
8383
public boolean onOptionsItemSelected(MenuItem item) {
8484
if (item.getItemId() == android.R.id.home) {

app/src/main/java/io/github/emanual/app/ui/BaseActivity.java

Lines changed: 8 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -6,28 +6,27 @@
66
import android.support.v7.app.ActionBarActivity;
77
import android.util.Log;
88
import android.view.MenuItem;
9-
import android.view.View;
10-
import android.view.View.OnClickListener;
119
import android.widget.Toast;
1210

1311
import com.umeng.analytics.MobclickAgent;
1412

1513
import java.io.Serializable;
1614

15+
import butterknife.ButterKnife;
1716

18-
public abstract class BaseActivity extends ActionBarActivity implements
19-
OnClickListener {
2017

21-
protected abstract void initData();
18+
public abstract class BaseActivity extends ActionBarActivity {
2219

20+
protected abstract void initData();
2321
protected abstract void initLayout();
22+
protected abstract int getContentViewId();
2423

2524
@Override protected void onCreate(Bundle savedInstanceState) {
2625
super.onCreate(savedInstanceState);
27-
}
28-
29-
@Override public void setContentView(int layoutResID) {
30-
super.setContentView(layoutResID);
26+
setContentView(getContentViewId());
27+
ButterKnife.bind(this);
28+
initData();
29+
initLayout();
3130
}
3231

3332
/**
@@ -51,22 +50,6 @@ public void toast(String content) {
5150
Toast.makeText(this, content, Toast.LENGTH_SHORT).show();
5251
}
5352

54-
/**
55-
* @param id
56-
* @return
57-
*/
58-
public View _getView(int id) {
59-
return this.findViewById(id);
60-
}
61-
62-
/**
63-
* @param cls
64-
* @return
65-
*/
66-
public Intent wrapIntent(Class<?> cls) {
67-
return new Intent(this, cls);
68-
}
69-
7053
/**
7154
* @return
7255
*/
@@ -124,9 +107,6 @@ protected String[] getStringArrayExtra(final String name) {
124107
return getIntent().getStringArrayExtra(name);
125108
}
126109

127-
@Override public void onClick(View v) {
128-
129-
}
130110

131111
@Override protected void onDestroy() {
132112
super.onDestroy();

0 commit comments

Comments
 (0)