Skip to content

Commit 67048a5

Browse files
committed
update sample.
1 parent 542f090 commit 67048a5

File tree

8 files changed

+29
-14
lines changed

8 files changed

+29
-14
lines changed

app/build.gradle

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

33
android {
4-
compileSdkVersion 21
5-
buildToolsVersion "21.1.1"
4+
compileSdkVersion 23
5+
buildToolsVersion "23.0.1"
66

77
defaultConfig {
88
applicationId "com.liuguangqiang.swiplebacksample"
99
minSdkVersion 14
10-
targetSdkVersion 21
10+
targetSdkVersion 23
1111
versionCode 1
1212
versionName "1.0"
1313
}
@@ -21,7 +21,7 @@ android {
2121

2222
dependencies {
2323
compile fileTree(dir: 'libs', include: ['*.jar'])
24-
compile 'com.android.support:appcompat-v7:21.0.2'
24+
compile 'com.android.support:appcompat-v7:23.1.1'
2525
compile 'com.github.liuguangqiang.prettyprogressbar:library:+'
2626
compile project(':library')
2727
}

app/src/main/AndroidManifest.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,19 +26,19 @@
2626
<activity
2727
android:name=".CommonActivity"
2828
android:label="@string/title_activity_common"
29-
android:theme="@style/Theme.Swipe.Back" />
29+
android:theme="@style/ThemeSwipeBack" />
3030
<activity
3131
android:name=".ListViewActivity"
3232
android:label="@string/title_activity_list_view"
33-
android:theme="@style/Theme.Swipe.Back" />
33+
android:theme="@style/ThemeSwipeBack" />
3434
<activity
3535
android:name=".ViewPagerActivity"
3636
android:label="@string/title_activity_viewpager"
37-
android:theme="@style/Theme.Swipe.Back" />
37+
android:theme="@style/ThemeSwipeBack" />
3838
<activity
39-
android:name=".WebViewActivity1"
39+
android:name=".WebViewActivity"
4040
android:label="@string/title_activity_viewpager"
41-
android:theme="@style/Theme.Swipe.Back" />
41+
android:theme="@style/ThemeSwipeBack" />
4242
</application>
4343

4444
</manifest>

app/src/main/java/com/liuguangqiang/swiplebacksample/CommonActivity.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
package com.liuguangqiang.swiplebacksample;
22

3+
import android.graphics.Color;
34
import android.os.Bundle;
5+
import android.support.v7.widget.Toolbar;
46

57
import com.liuguangqiang.swipeback.SwipeBackActivity;
68
import com.liuguangqiang.swipeback.SwipeBackLayout;
@@ -13,6 +15,10 @@ protected void onCreate(Bundle savedInstanceState) {
1315
setContentView(R.layout.activity_common);
1416
setDragEdge(SwipeBackLayout.DragEdge.LEFT);
1517
setTitle("Common");
18+
19+
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
20+
toolbar.setTitleTextColor(Color.WHITE);
21+
setSupportActionBar(toolbar);
1622
}
1723

1824
}

app/src/main/java/com/liuguangqiang/swiplebacksample/ListViewActivity.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,14 @@
1010
import android.widget.SimpleAdapter;
1111
import android.widget.Toast;
1212

13+
import com.liuguangqiang.swipeback.SwipeBackActivity;
1314
import com.liuguangqiang.swipeback.SwipeBackLayout;
1415

1516
import java.util.ArrayList;
1617
import java.util.HashMap;
1718
import java.util.List;
1819

19-
public class ListViewActivity extends ActionBarActivity {
20+
public class ListViewActivity extends SwipeBackActivity {
2021

2122
private ListView lv;
2223

app/src/main/java/com/liuguangqiang/swiplebacksample/MainActivity.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public void onClick(View v) {
3737
skipActivity(ViewPagerActivity.class);
3838
break;
3939
case R.id.btn_webview:
40-
skipActivity(WebViewActivity1.class);
40+
skipActivity(WebViewActivity.class);
4141
break;
4242
}
4343
}

app/src/main/java/com/liuguangqiang/swiplebacksample/ViewPagerActivity.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,14 @@
66
import android.support.v7.app.ActionBarActivity;
77
import android.support.v7.widget.Toolbar;
88

9+
import com.liuguangqiang.swipeback.SwipeBackActivity;
910
import com.liuguangqiang.swipeback.SwipeBackLayout;
1011
import com.liuguangqiang.swiplebacksample.adapter.TestAdapter;
1112

1213
/**
1314
* Created by Eric on 15/2/27.
1415
*/
15-
public class ViewPagerActivity extends ActionBarActivity {
16+
public class ViewPagerActivity extends SwipeBackActivity {
1617

1718
@Override
1819
protected void onCreate(Bundle savedInstanceState) {

app/src/main/java/com/liuguangqiang/swiplebacksample/WebViewActivity1.java renamed to app/src/main/java/com/liuguangqiang/swiplebacksample/WebViewActivity.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
/**
1212
* Created by Eric on 15/6/1.
1313
*/
14-
public class WebViewActivity1 extends SwipeBackActivity {
14+
public class WebViewActivity extends SwipeBackActivity {
1515

1616
private WebView webView;
1717

app/src/main/res/values/styles.xml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,14 @@
22

33
<!-- Base application theme. -->
44
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
5-
<!-- Customize your theme here. -->
5+
<item name="colorPrimary">#db4336</item>
6+
<item name="colorPrimaryDark">#b63120</item>
67
</style>
78

9+
<style name="ThemeSwipeBack" parent="Theme.Swipe.Back">
10+
<item name="colorPrimary">#db4336</item>
11+
<item name="colorPrimaryDark">#b63120</item>
12+
</style>
13+
14+
815
</resources>

0 commit comments

Comments
 (0)