Skip to content

Commit

Permalink
完善多方向返回设置
Browse files Browse the repository at this point in the history
  • Loading branch information
Issac committed Aug 24, 2013
1 parent 28cfa85 commit ecebe77
Show file tree
Hide file tree
Showing 21 changed files with 182 additions and 169 deletions.
Binary file modified .gradle/1.6/taskArtifacts/fileHashes.bin
Binary file not shown.
Binary file modified .gradle/1.6/taskArtifacts/fileSnapshots.bin
Binary file not shown.
Binary file modified .gradle/1.6/taskArtifacts/outputFileStates.bin
Binary file not shown.
Binary file modified .gradle/1.6/taskArtifacts/taskArtifacts.bin
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
package me.imid.swipebacklayout.demo;

import android.content.Intent;
import android.graphics.Color;
import android.os.Bundle;
import android.view.View;

Expand All @@ -11,6 +12,14 @@
* Created by Issac on 8/11/13.
*/
public class TestActivity extends SwipeBackActivity {
private View mContainer;

private int[] mBgColors = new int[] {
Color.BLACK, Color.BLUE, Color.GRAY, Color.RED, Color.YELLOW
};

private static int mBgIndex = 0;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Expand All @@ -21,5 +30,12 @@ public void onClick(View v) {
startActivity(new Intent(TestActivity.this, TestActivity.class));
}
});
mContainer = findViewById(R.id.container);
mContainer.setBackgroundColor(mBgColors[mBgIndex]);
mBgIndex++;
if (mBgIndex >= mBgColors.length) {
mBgIndex = 0;
}
}

}
2 changes: 2 additions & 0 deletions SwipeBackDemo/src/main/res/layout/activity_test.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingLeft="@dimen/activity_horizontal_margin"
Expand All @@ -8,6 +9,7 @@
>

<LinearLayout

android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content">
Expand Down
6 changes: 1 addition & 5 deletions SwipeBackDemo/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,7 @@
by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
-->
<style name="AppBaseTheme" parent="android:Theme.Light">
<!--
Theme customizations available in newer API levels can go in
res/values-vXX/styles.xml, while customizations related to
backward-compatibility can go here.
-->
<item name="android:windowIsTranslucent">true</item>
</style>

<!-- Application theme. -->
Expand Down
15 changes: 5 additions & 10 deletions SwipeBackLayout/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,18 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="me.imid.swipebacklayout.lib"
android:versionCode="1"
android:versionName="1.0" >
package="me.imid.swipebacklayout.lib"
android:versionCode="1"
android:versionName="1.0">

<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="14" />
android:targetSdkVersion="14"/>

<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
</application>
<application/>

</manifest>
Binary file removed SwipeBackLayout/src/main/ic_launcher-web.png
Binary file not shown.
Loading

0 comments on commit ecebe77

Please sign in to comment.