Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
ead600b
Modify link
Trinea Feb 5, 2015
9afa24a
Update README.md
Trinea Feb 5, 2015
6d262da
add side-menu folder
cpacm Feb 6, 2015
a2e5e0d
add .gitignore
cpacm Feb 6, 2015
5dc2084
add nineoldanimations-demo by mr.simple
Feb 7, 2015
5d7c5a1
Merge branch 'master' of github.com:aosp-exchange-group/android-open-…
Feb 7, 2015
0746d52
Update README.md
hehonghui Feb 7, 2015
478cae4
rogary
Rogary Feb 10, 2015
3b47d56
READEME.md
Rogary Feb 11, 2015
a50477f
fix README.md
Rogary Feb 11, 2015
6986bcc
delete error README.md
Rogary Feb 11, 2015
3d1a04b
Merge pull request #1 from Rogary/master
Trinea Feb 11, 2015
26eca9f
add QuickAdapterDemo
Feb 12, 2015
ea29714
androidactive-demo
ouyangxiangshao Feb 13, 2015
f32412a
add apk file
Feb 13, 2015
c6a18c4
Merge branch 'master' of https://github.com/aosp-exchange-group/andro…
Feb 13, 2015
9e0cde9
dl-apk-load complete
FFish Feb 14, 2015
be5db32
add .gitignore
FFish Feb 14, 2015
3cf8c7f
pullToZoomInListviewDemo
Yom9c Feb 16, 2015
d15d17a
Create discrete-seek-bar-demo
wangeason Feb 27, 2015
b580e72
Delete discrete-seek-bar-demo
wangeason Feb 27, 2015
536005f
Create README.md
wangeason Feb 27, 2015
111b5bd
Update README.md
wangeason Feb 27, 2015
362dc0e
Demo
Mar 6, 2015
1cda786
pager-sliding-tab-strip-demo-ayyb1988
Mar 8, 2015
b32fb16
apk
Mar 8, 2015
23a9a4b
.gitignore
Mar 9, 2015
bdac540
pager-sliding-tab-strip-demo-ayyb1988
Mar 9, 2015
dce3c33
Create README.md
ayyb1988 Mar 9, 2015
0291b30
Update README.md
ayyb1988 Mar 9, 2015
836683d
Update README.md
ayyb1988 Mar 9, 2015
0f94032
Update README.md
ayyb1988 Mar 9, 2015
4ef0ca2
Merge pull request #2 from ayyb1988/master
ayyb1988 Mar 9, 2015
37aa832
update
cpacm Mar 9, 2015
1864a5b
add readme
cpacm Mar 9, 2015
c851af0
update readme
cpacm Mar 9, 2015
8a33825
update readme
cpacm Mar 9, 2015
0e272d1
submit sliding-menu-demo
huxian99 Mar 12, 2015
b52e9eb
upload demo gif
huxian99 Mar 23, 2015
3e012fc
complete demo
huxian99 Mar 23, 2015
fa0047a
Demo upload
wangeason Mar 26, 2015
245b2d0
update fresco demo
blackiedm Apr 1, 2015
171d21e
modify comments
wangeason Apr 10, 2015
30c2d7e
Initialize CircularReveal Sample commit!
Apr 15, 2015
e1bf917
Add source commit!
Apr 15, 2015
fe7b7c7
Update README.md commit!
Apr 15, 2015
caad22f
Update README.md commit!
Apr 15, 2015
d3ecfd9
update base-adapter-helper-demo
Apr 17, 2015
d13c786
add retrofit demo
guoGavin Jul 16, 2015
b6e9cd4
change retrofit source
guoGavin Jul 16, 2015
7d73690
add flyrefresh demo
AdrianLCA Jul 24, 2015
de4c942
Merge pull request #4 from skyacer/master
AdrianLCA Jul 24, 2015
e92d7c4
add flyrefresh apk
AdrianLCA Jul 31, 2015
9d5de02
change flyrefresh demo
AdrianLCA Aug 1, 2015
311b417
update fly-refresh demo
AdrianLCA Aug 1, 2015
ac3bb20
update flyrefresh
AdrianLCA Aug 1, 2015
9a6c265
Create volley-demo-Kevin1466
Kevin1466 Aug 27, 2015
f5d8784
能否提交
Aug 27, 2015
2e7a1a5
合肥市的
Aug 27, 2015
c304a3d
改变
Aug 27, 2015
9004e51
file
Aug 27, 2015
6c5fa2e
demo ok
Aug 27, 2015
af8083f
cleaned
Aug 27, 2015
cb0bed2
add folder for android-async-http-demo
yuanhuihui Aug 29, 2015
a2052eb
Merge pull request #5 from yuanhuihui/master
yuanhuihui Aug 29, 2015
219e90f
swipebacklayout demo
Neocomb Oct 1, 2015
f67a589
Create rxjava-demo project; Add create observable demo and unsubscrib…
Oct 10, 2015
d90e68d
add retrofit-demo-xxxzhi
jjjtui Oct 25, 2015
bde16c5
Update README.md
Trinea Oct 27, 2015
84d8de6
Create touchimageview-demo
truistic Oct 27, 2015
329d3f5
Create README.md
truistic Oct 27, 2015
d21400a
Update README.md
truistic Oct 27, 2015
ba22102
update listviewanimations lib
Nov 5, 2015
ba246b8
Update:
Nov 5, 2015
8764a8e
Update README.md
yansha87 Nov 5, 2015
f57ac47
add drag-and-drop feature
Nov 5, 2015
99e1a39
Merge branch 'master' of https://github.com/aosp-exchange-group/andro…
Nov 5, 2015
0d02bc9
Fix some crash bugs
Nov 6, 2015
afecb5e
remove unused file
Nov 11, 2015
911eb73
add android-open-project-demo
Labmem003 Jun 29, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
swipebacklayout demo
  • Loading branch information
Neocomb committed Oct 1, 2015
commit 219e90ff3e46cb2f7f3395698ebb778a748b4097
3 changes: 3 additions & 0 deletions swipebacklayout-demo/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
SwipeBackLayout Demo
====================================
![Demo展示图](./demo.gif)
Binary file added swipebacklayout-demo/apk/demoActivity.apk
Binary file not shown.
Binary file added swipebacklayout-demo/demo.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
48 changes: 48 additions & 0 deletions swipebacklayout-demo/demo/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
apply plugin: 'com.android.application'

repositories {
mavenCentral()
}

dependencies {
compile 'com.android.support:support-v4:21.0.3'
compile project(':library')
}

android {
compileSdkVersion 21
buildToolsVersion "21.1.2"

defaultConfig {
minSdkVersion 7
targetSdkVersion 21
}

signingConfigs {
signing
}

buildTypes {
release {
if (project.hasProperty('storeFile')) {
signingConfig signingConfigs.signing
}
}
}
}

if (project.hasProperty('storeFile')) {
android.signingConfigs.signing.storeFile = file(storeFile)
}

if (project.hasProperty('storePassword')) {
android.signingConfigs.signing.storePassword = storePassword
}

if (project.hasProperty('keyAlias')) {
android.signingConfigs.signing.keyAlias = keyAlias
}

if (project.hasProperty('keyPassword')) {
android.signingConfigs.signing.keyPassword = keyPassword
}
Binary file not shown.
29 changes: 29 additions & 0 deletions swipebacklayout-demo/demo/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="me.imid.swipebacklayout.demo"
android:versionCode="1"
android:versionName="1.0">

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

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

<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme">
<activity
android:name=".DemoActivity"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>

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

</manifest>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,180 @@

package me.imid.swipebacklayout.demo;

import android.content.Context;
import android.content.Intent;
import android.content.res.Resources;
import android.graphics.drawable.ColorDrawable;
import android.net.Uri;
import android.os.Bundle;
import android.os.Vibrator;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.RadioGroup;

import me.imid.swipebacklayout.lib.SwipeBackLayout;
import me.imid.swipebacklayout.lib.app.SwipeBackActivity;

/**
* Created by Issac on 8/11/13.
*/
public class DemoActivity extends SwipeBackActivity implements View.OnClickListener {
private static final int VIBRATE_DURATION = 20;

private int[] mBgColors;

private static int mBgIndex = 0;

private String mKeyTrackingMode;

private RadioGroup mTrackingModeGroup;

private SwipeBackLayout mSwipeBackLayout;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_demo);
changeActionBarColor();
findViews();
mKeyTrackingMode = getString(R.string.key_tracking_mode);
mSwipeBackLayout = getSwipeBackLayout();

mTrackingModeGroup.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(RadioGroup group, int checkedId) {
int edgeFlag;
switch (checkedId) {
case R.id.mode_left:
edgeFlag = SwipeBackLayout.EDGE_LEFT;
break;
case R.id.mode_right:
edgeFlag = SwipeBackLayout.EDGE_RIGHT;
break;
case R.id.mode_bottom:
edgeFlag = SwipeBackLayout.EDGE_BOTTOM;
break;
default:
edgeFlag = SwipeBackLayout.EDGE_ALL;
}
mSwipeBackLayout.setEdgeTrackingEnabled(edgeFlag);
saveTrackingMode(edgeFlag);
}
});
mSwipeBackLayout.addSwipeListener(new SwipeBackLayout.SwipeListener() {
@Override
public void onScrollStateChange(int state, float scrollPercent) {

}

@Override
public void onEdgeTouch(int edgeFlag) {
vibrate(VIBRATE_DURATION);
}

@Override
public void onScrollOverThreshold() {
vibrate(VIBRATE_DURATION);
}
});
}

@Override
protected void onResume() {
super.onResume();
restoreTrackingMode();
}

private void saveTrackingMode(int flag) {
PreferenceUtils.setPrefInt(getApplicationContext(), mKeyTrackingMode, flag);
}

private void restoreTrackingMode() {
int flag = PreferenceUtils.getPrefInt(getApplicationContext(), mKeyTrackingMode,
SwipeBackLayout.EDGE_LEFT);
mSwipeBackLayout.setEdgeTrackingEnabled(flag);
switch (flag) {
case SwipeBackLayout.EDGE_LEFT:
mTrackingModeGroup.check(R.id.mode_left);
break;
case SwipeBackLayout.EDGE_RIGHT:
mTrackingModeGroup.check(R.id.mode_right);
break;
case SwipeBackLayout.EDGE_BOTTOM:
mTrackingModeGroup.check(R.id.mode_bottom);
break;
case SwipeBackLayout.EDGE_ALL:
mTrackingModeGroup.check(R.id.mode_all);
break;
}
}

private void changeActionBarColor() {
getActionBar().setBackgroundDrawable(new ColorDrawable(getColors()[mBgIndex]));
mBgIndex++;
if (mBgIndex >= getColors().length) {
mBgIndex = 0;
}
}

private void findViews() {
findViewById(R.id.btn_start).setOnClickListener(this);
findViewById(R.id.btn_finish).setOnClickListener(this);
mTrackingModeGroup = (RadioGroup) findViewById(R.id.tracking_mode);
}

private int[] getColors() {
if (mBgColors == null) {
Resources resource = getResources();
mBgColors = new int[] {
resource.getColor(R.color.androidColorA),
resource.getColor(R.color.androidColorB),
resource.getColor(R.color.androidColorC),
resource.getColor(R.color.androidColorD),
resource.getColor(R.color.androidColorE),
};
}
return mBgColors;
}

private void vibrate(long duration) {
Vibrator vibrator = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE);
long[] pattern = {
0, duration
};
vibrator.vibrate(pattern, -1);
}

@Override
public void onClick(View v) {
switch (v.getId()) {
case R.id.btn_start:
startActivity(new Intent(DemoActivity.this, DemoActivity.class));
break;
case R.id.btn_finish:
scrollToFinishActivity();
break;
}
}

@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.main, menu);
return true;
}

@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case R.id.action_github:
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(Uri.parse("https://github.com/Issacw0ng/SwipeBackLayout"));
startActivity(intent);
return true;
default:
return super.onOptionsItemSelected(item);
}
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@

package me.imid.swipebacklayout.demo;

import android.content.Context;
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;
import android.preference.PreferenceManager;

public class PreferenceUtils {
public static String getPrefString(Context context, String key, final String defaultValue) {
final SharedPreferences settings = PreferenceManager.getDefaultSharedPreferences(context);
return settings.getString(key, defaultValue);
}

public static void setPrefString(Context context, final String key, final String value) {
final SharedPreferences settings = PreferenceManager.getDefaultSharedPreferences(context);
settings.edit().putString(key, value).commit();
}

public static boolean getPrefBoolean(Context context, final String key,
final boolean defaultValue) {
final SharedPreferences settings = PreferenceManager.getDefaultSharedPreferences(context);
return settings.getBoolean(key, defaultValue);
}

public static boolean hasKey(Context context, final String key) {
return PreferenceManager.getDefaultSharedPreferences(context).contains(key);
}

public static void setPrefBoolean(Context context, final String key, final boolean value) {
final SharedPreferences settings = PreferenceManager.getDefaultSharedPreferences(context);
settings.edit().putBoolean(key, value).commit();
}

public static void setPrefInt(Context context, final String key, final int value) {
final SharedPreferences settings = PreferenceManager.getDefaultSharedPreferences(context);
settings.edit().putInt(key, value).commit();
}

public static int getPrefInt(Context context, final String key, final int defaultValue) {
final SharedPreferences settings = PreferenceManager.getDefaultSharedPreferences(context);
return settings.getInt(key, defaultValue);
}

public static void setPrefFloat(Context context, final String key, final float value) {
final SharedPreferences settings = PreferenceManager.getDefaultSharedPreferences(context);
settings.edit().putFloat(key, value).commit();
}

public static float getPrefFloat(Context context, final String key, final float defaultValue) {
final SharedPreferences settings = PreferenceManager.getDefaultSharedPreferences(context);
return settings.getFloat(key, defaultValue);
}

public static void setSettingLong(Context context, final String key, final long value) {
final SharedPreferences settings = PreferenceManager.getDefaultSharedPreferences(context);
settings.edit().putLong(key, value).commit();
}

public static long getPrefLong(Context context, final String key, final long defaultValue) {
final SharedPreferences settings = PreferenceManager.getDefaultSharedPreferences(context);
return settings.getLong(key, defaultValue);
}

public static void clearPreference(Context context, final SharedPreferences p) {
final Editor editor = p.edit();
editor.clear();
editor.commit();
}
}
15 changes: 15 additions & 0 deletions swipebacklayout-demo/demo/src/main/project.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# This file is automatically generated by Android Tools.
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
#
# This file must be checked in Version Control Systems.
#
# To customize properties used by the Ant build system edit
# "ant.properties", and override values to adapt the script to your
# project structure.
#
# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt

# Project target.
target=android-14
android.library.reference.1=../../../library/src/main
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading