Skip to content

Commit 6a0dd87

Browse files
committed
first commit
0 parents  commit 6a0dd87

37 files changed

+541
-0
lines changed

.gitignore

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

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 26
5+
buildToolsVersion "26.0.2"
6+
defaultConfig {
7+
applicationId "com.wingjay.autolifecycle.app"
8+
minSdkVersion 15
9+
targetSdkVersion 26
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+
implementation fileTree(dir: 'libs', include: ['*.jar'])
24+
implementation 'com.android.support:appcompat-v7:26.0.0-beta1'
25+
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
26+
testImplementation 'junit:junit:4.12'
27+
androidTestImplementation('com.android.support.test.espresso:espresso-core:3.0.1', {
28+
exclude group: 'com.android.support', module: 'support-annotations'
29+
})
30+
}

app/proguard-rules.pro

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Add project specific ProGuard rules here.
2+
# You can control the set of applied configuration files using the
3+
# proguardFiles setting in build.gradle.
4+
#
5+
# For more details, see
6+
# http://developer.android.com/guide/developing/tools/proguard.html
7+
8+
# If your project uses WebView with JS, uncomment the following
9+
# and specify the fully qualified class name to the JavaScript interface
10+
# class:
11+
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12+
# public *;
13+
#}
14+
15+
# Uncomment this to preserve the line number information for
16+
# debugging stack traces.
17+
#-keepattributes SourceFile,LineNumberTable
18+
19+
# If you keep the line number information, uncomment this to
20+
# hide the original source file name.
21+
#-renamesourcefileattribute SourceFile
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
package com.wingjay.autolifecycle.app;
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+
* Instrumented 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.wingjay.autolifecycle.app", appContext.getPackageName());
25+
}
26+
}

app/src/main/AndroidManifest.xml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
package="com.wingjay.autolifecycle.app" >
4+
5+
<application
6+
android:allowBackup="true"
7+
android:icon="@mipmap/ic_launcher"
8+
android:label="@string/app_name"
9+
android:roundIcon="@mipmap/ic_launcher_round"
10+
android:supportsRtl="true"
11+
android:theme="@style/AppTheme" >
12+
<activity android:name=".MainActivity" >
13+
<intent-filter>
14+
<action android:name="android.intent.action.MAIN" />
15+
16+
<category android:name="android.intent.category.LAUNCHER" />
17+
</intent-filter>
18+
</activity>
19+
</application>
20+
21+
</manifest>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
package com.wingjay.autolifecycle.app;
2+
3+
import android.support.v7.app.AppCompatActivity;
4+
import android.os.Bundle;
5+
6+
public class MainActivity extends AppCompatActivity {
7+
8+
@Override
9+
protected void onCreate(Bundle savedInstanceState) {
10+
super.onCreate(savedInstanceState);
11+
setContentView(R.layout.activity_main);
12+
}
13+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<vector
3+
android:height="24dp"
4+
android:width="24dp"
5+
android:viewportHeight="108.0"
6+
android:viewportWidth="108.0"
7+
xmlns:android="http://schemas.android.com/apk/res/android">
8+
<path android:fillColor="#26A69A"
9+
android:pathData="M0,0h108v108h-108z"
10+
android:strokeColor="#66FFFFFF" android:strokeWidth="0.8"/>
11+
<path android:fillColor="#00000000" android:pathData="M19,0L19,108"
12+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
13+
<path android:fillColor="#00000000" android:pathData="M9,0L9,108"
14+
android:strokeColor="#66FFFFFF" android:strokeWidth="0.8"/>
15+
<path android:fillColor="#00000000" android:pathData="M39,0L39,108"
16+
android:strokeColor="#66FFFFFF" android:strokeWidth="0.8"/>
17+
<path android:fillColor="#00000000" android:pathData="M29,0L29,108"
18+
android:strokeColor="#66FFFFFF" android:strokeWidth="0.8"/>
19+
<path android:fillColor="#00000000" android:pathData="M59,0L59,108"
20+
android:strokeColor="#66FFFFFF" android:strokeWidth="0.8"/>
21+
<path android:fillColor="#00000000" android:pathData="M49,0L49,108"
22+
android:strokeColor="#66FFFFFF" android:strokeWidth="0.8"/>
23+
<path android:fillColor="#00000000" android:pathData="M79,0L79,108"
24+
android:strokeColor="#66FFFFFF" android:strokeWidth="0.8"/>
25+
<path android:fillColor="#00000000" android:pathData="M69,0L69,108"
26+
android:strokeColor="#66FFFFFF" android:strokeWidth="0.8"/>
27+
<path android:fillColor="#00000000" android:pathData="M89,0L89,108"
28+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
29+
<path android:fillColor="#00000000" android:pathData="M99,0L99,108"
30+
android:strokeColor="#66FFFFFF" android:strokeWidth="0.8"/>
31+
<path android:fillColor="#00000000" android:pathData="M0,89L108,89"
32+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
33+
<path android:fillColor="#00000000" android:pathData="M0,99L108,99"
34+
android:strokeColor="#66FFFFFF" android:strokeWidth="0.8"/>
35+
<path android:fillColor="#00000000" android:pathData="M0,69L108,69"
36+
android:strokeColor="#66FFFFFF" android:strokeWidth="0.8"/>
37+
<path android:fillColor="#00000000" android:pathData="M0,79L108,79"
38+
android:strokeColor="#66FFFFFF" android:strokeWidth="0.8"/>
39+
<path android:fillColor="#00000000" android:pathData="M0,49L108,49"
40+
android:strokeColor="#66FFFFFF" android:strokeWidth="0.8"/>
41+
<path android:fillColor="#00000000" android:pathData="M0,59L108,59"
42+
android:strokeColor="#66FFFFFF" android:strokeWidth="0.8"/>
43+
<path android:fillColor="#00000000" android:pathData="M0,29L108,29"
44+
android:strokeColor="#66FFFFFF" android:strokeWidth="0.8"/>
45+
<path android:fillColor="#00000000" android:pathData="M0,39L108,39"
46+
android:strokeColor="#66FFFFFF" android:strokeWidth="0.8"/>
47+
<path android:fillColor="#00000000" android:pathData="M0,19L108,19"
48+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
49+
<path android:fillColor="#00000000" android:pathData="M0,9L108,9"
50+
android:strokeColor="#66FFFFFF" android:strokeWidth="0.8"/>
51+
</vector>
52+
+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<android.support.constraint.ConstraintLayout
3+
xmlns:android="http://schemas.android.com/apk/res/android"
4+
xmlns:tools="http://schemas.android.com/tools"
5+
xmlns:app="http://schemas.android.com/apk/res-auto"
6+
android:layout_width="match_parent"
7+
android:layout_height="match_parent"
8+
tools:context="com.wingjay.autolifecycle.app.MainActivity">
9+
10+
<TextView
11+
android:layout_width="wrap_content"
12+
android:layout_height="wrap_content"
13+
android:text="Hello World!"
14+
app:layout_constraintBottom_toBottomOf="parent"
15+
app:layout_constraintLeft_toLeftOf="parent"
16+
app:layout_constraintRight_toRightOf="parent"
17+
app:layout_constraintTop_toTopOf="parent" />
18+
19+
</android.support.constraint.ConstraintLayout>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
3+
<background android:drawable="@drawable/ic_launcher_background"/>
4+
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
5+
</adaptive-icon>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
3+
<background android:drawable="@drawable/ic_launcher_background"/>
4+
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
5+
</adaptive-icon>
3.28 KB
Loading
Loading
Loading
2.33 KB
Loading
Loading
Loading
4.54 KB
Loading
Loading
Loading
6.84 KB
Loading
Loading
Loading
9.22 KB
Loading
Loading
Loading

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

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<resources>
3+
<color name="colorPrimary">#3F51B5</color>
4+
<color name="colorPrimaryDark">#303F9F</color>
5+
<color name="colorAccent">#FF4081</color>
6+
</resources>

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

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<resources>
2+
<string name="app_name">app</string>
3+
</resources>

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

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<resources>
2+
3+
<!-- Base application theme. -->
4+
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
5+
<!-- Customize your theme here. -->
6+
<item name="colorPrimary">@color/colorPrimary</item>
7+
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
8+
<item name="colorAccent">@color/colorAccent</item>
9+
</style>
10+
11+
</resources>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
package com.wingjay.autolifecycle.app;
2+
3+
import org.junit.Test;
4+
5+
import static org.junit.Assert.*;
6+
7+
/**
8+
* Example local unit test, which will execute on the development machine (host).
9+
*
10+
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
11+
*/
12+
public class ExampleUnitTest {
13+
@Test
14+
public void addition_isCorrect() throws Exception {
15+
assertEquals(4, 2 + 2);
16+
}
17+
}

build.gradle

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
// Top-level build file where you can add configuration options common to all sub-projects/modules.
2+
3+
buildscript {
4+
5+
repositories {
6+
google()
7+
jcenter()
8+
}
9+
dependencies {
10+
classpath 'com.android.tools.build:gradle:3.0.0-beta5'
11+
12+
13+
// NOTE: Do not place your application dependencies here; they belong
14+
// in the individual module build.gradle files
15+
}
16+
}
17+
18+
allprojects {
19+
repositories {
20+
google()
21+
jcenter()
22+
}
23+
}
24+
25+
task clean(type: Delete) {
26+
delete rootProject.buildDir
27+
}

gradle.properties

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Project-wide Gradle settings.
2+
3+
# IDE (e.g. Android Studio) users:
4+
# Gradle settings configured through the IDE *will override*
5+
# any settings specified in this file.
6+
7+
# For more details on how to configure your build environment visit
8+
# http://www.gradle.org/docs/current/userguide/build_environment.html
9+
10+
# Specifies the JVM arguments used for the daemon process.
11+
# The setting is particularly useful for tweaking memory settings.
12+
org.gradle.jvmargs=-Xmx1536m
13+
14+
# When configured, Gradle will run in incubating parallel mode.
15+
# This option should only be used with decoupled projects. More details, visit
16+
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
17+
# org.gradle.parallel=true

gradle/wrapper/gradle-wrapper.jar

52.4 KB
Binary file not shown.
+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#Thu Nov 09 22:33:02 CST 2017
2+
distributionBase=GRADLE_USER_HOME
3+
distributionPath=wrapper/dists
4+
zipStoreBase=GRADLE_USER_HOME
5+
zipStorePath=wrapper/dists
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip

0 commit comments

Comments
 (0)