Skip to content

Commit b3a0a3b

Browse files
author
TalenGu
committed
一个稳定版本
0 parents  commit b3a0a3b

Some content is hidden

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

59 files changed

+2686
-0
lines changed

.gitignore

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
*.iml
2+
.gradle
3+
/local.properties
4+
/.idea/workspace.xml
5+
/.idea/libraries
6+
.DS_Store
7+
/build
8+
/captures
9+
.externalNativeBuild

.idea/compiler.xml

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

.idea/copyright/profiles_settings.xml

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

.idea/encodings.xml

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

.idea/gradle.xml

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

.idea/misc.xml

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

.idea/modules.xml

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

.idea/runConfigurations.xml

+12
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/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build

app/build.gradle

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
apply plugin: 'com.android.application'
2+
3+
android {
4+
compileSdkVersion 23
5+
buildToolsVersion "23.0.3"
6+
defaultConfig {
7+
applicationId "com.talengu.wordwarrior"
8+
minSdkVersion 21
9+
targetSdkVersion 23
10+
versionCode 1
11+
versionName "1.0"
12+
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
13+
}
14+
buildTypes {
15+
release {
16+
minifyEnabled false
17+
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
18+
}
19+
}
20+
}
21+
22+
dependencies {
23+
compile fileTree(dir: 'libs', include: ['*.jar'])
24+
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
25+
exclude group: 'com.android.support', module: 'support-annotations'
26+
})
27+
compile 'com.android.support:appcompat-v7:23.4.0'
28+
compile 'com.android.support:design:23.4.0'
29+
testCompile 'junit:junit:4.12'
30+
}

app/proguard-rules.pro

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Add project specific ProGuard rules here.
2+
# By default, the flags in this file are appended to flags specified
3+
# in C:\Android\sdk/tools/proguard/proguard-android.txt
4+
# You can edit the include path and order by changing the proguardFiles
5+
# directive in build.gradle.
6+
#
7+
# For more details, see
8+
# http://developer.android.com/guide/developing/tools/proguard.html
9+
10+
# Add any project specific keep options here:
11+
12+
# If your project uses WebView with JS, uncomment the following
13+
# and specify the fully qualified class name to the JavaScript interface
14+
# class:
15+
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16+
# public *;
17+
#}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
package com.talengu.wordwarrior;
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.talengu.wordwarrior", appContext.getPackageName());
25+
}
26+
}

app/src/main/AndroidManifest.xml

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
package="com.talengu.wordwarrior"
4+
android:versionCode="1"
5+
android:versionName="1.0">
6+
7+
<uses-sdk
8+
android:minSdkVersion="11"
9+
android:targetSdkVersion="17" />
10+
11+
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
12+
13+
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
14+
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
15+
16+
<application
17+
android:allowBackup="true"
18+
android:icon="@mipmap/ic_launcher"
19+
android:label="@string/app_name"
20+
android:theme="@style/AppTheme">
21+
<activity
22+
android:name=".MainActivity"
23+
android:label="@string/app_name">
24+
<intent-filter>
25+
<action android:name="android.intent.action.MAIN" />
26+
27+
<category android:name="android.intent.category.LAUNCHER" />
28+
</intent-filter>
29+
</activity>
30+
<activity
31+
android:name=".TXTActivity"
32+
android:label="@string/title_activity_txt"
33+
android:theme="@style/AppTheme.NoActionBar"></activity>
34+
</application>
35+
36+
</manifest>

app/src/main/ic_launcher-web.png

24.7 KB
Loading
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
package com.baoyz.swipemenulistview;
2+
3+
import android.content.Context;
4+
5+
import java.util.ArrayList;
6+
import java.util.List;
7+
8+
/**
9+
*
10+
* @author baoyz
11+
* @date 2014-8-23
12+
*
13+
*/
14+
public class SwipeMenu {
15+
16+
private Context mContext;
17+
private List<SwipeMenuItem> mItems;
18+
private int mViewType;
19+
20+
public SwipeMenu(Context context) {
21+
mContext = context;
22+
mItems = new ArrayList<SwipeMenuItem>();
23+
}
24+
25+
public Context getContext() {
26+
return mContext;
27+
}
28+
29+
public void addMenuItem(SwipeMenuItem item) {
30+
mItems.add(item);
31+
}
32+
33+
public void removeMenuItem(SwipeMenuItem item) {
34+
mItems.remove(item);
35+
}
36+
37+
public List<SwipeMenuItem> getMenuItems() {
38+
return mItems;
39+
}
40+
41+
public SwipeMenuItem getMenuItem(int index) {
42+
return mItems.get(index);
43+
}
44+
45+
public int getViewType() {
46+
return mViewType;
47+
}
48+
49+
public void setViewType(int viewType) {
50+
this.mViewType = viewType;
51+
}
52+
53+
}

0 commit comments

Comments
 (0)