瀏覽代碼

首次提交

皇甫睿欣 7 年之前
當前提交
c1c208fba3
共有 28 個文件被更改,包括 416 次插入0 次删除
  1. 9 0
      .gitignore
  2. 1 0
      app/.gitignore
  3. 28 0
      app/build.gradle
  4. 21 0
      app/proguard-rules.pro
  5. 26 0
      app/src/androidTest/java/com/kuxuan/fastbrowser/ExampleInstrumentedTest.java
  6. 21 0
      app/src/main/AndroidManifest.xml
  7. 13 0
      app/src/main/java/com/kuxuan/fastbrowser/MainActivity.java
  8. 34 0
      app/src/main/res/drawable-v24/ic_launcher_foreground.xml
  9. 170 0
      app/src/main/res/drawable/ic_launcher_background.xml
  10. 18 0
      app/src/main/res/layout/activity_main.xml
  11. 5 0
      app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
  12. 5 0
      app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
  13. 二進制
      app/src/main/res/mipmap-hdpi/ic_launcher.png
  14. 二進制
      app/src/main/res/mipmap-hdpi/ic_launcher_round.png
  15. 二進制
      app/src/main/res/mipmap-mdpi/ic_launcher.png
  16. 二進制
      app/src/main/res/mipmap-mdpi/ic_launcher_round.png
  17. 二進制
      app/src/main/res/mipmap-xhdpi/ic_launcher.png
  18. 二進制
      app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
  19. 二進制
      app/src/main/res/mipmap-xxhdpi/ic_launcher.png
  20. 二進制
      app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
  21. 二進制
      app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
  22. 二進制
      app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
  23. 6 0
      app/src/main/res/values/colors.xml
  24. 3 0
      app/src/main/res/values/strings.xml
  25. 11 0
      app/src/main/res/values/styles.xml
  26. 17 0
      app/src/test/java/com/kuxuan/fastbrowser/ExampleUnitTest.java
  27. 27 0
      build.gradle
  28. 1 0
      settings.gradle

+ 9 - 0
.gitignore

@@ -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

+ 1 - 0
app/.gitignore

@@ -0,0 +1 @@
1
+/build

+ 28 - 0
app/build.gradle

@@ -0,0 +1,28 @@
1
+apply plugin: 'com.android.application'
2
+
3
+android {
4
+    compileSdkVersion 26
5
+    defaultConfig {
6
+        applicationId "com.kuxuan.fastbrowser"
7
+        minSdkVersion 25
8
+        targetSdkVersion 26
9
+        versionCode 1
10
+        versionName "1.0"
11
+        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
12
+    }
13
+    buildTypes {
14
+        release {
15
+            minifyEnabled false
16
+            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
17
+        }
18
+    }
19
+}
20
+
21
+dependencies {
22
+    implementation fileTree(dir: 'libs', include: ['*.jar'])
23
+    implementation 'com.android.support:appcompat-v7:26.1.0'
24
+    implementation 'com.android.support.constraint:constraint-layout:1.0.2'
25
+    testImplementation 'junit:junit:4.12'
26
+    androidTestImplementation 'com.android.support.test:runner:1.0.1'
27
+    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
28
+}

+ 21 - 0
app/proguard-rules.pro

@@ -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

+ 26 - 0
app/src/androidTest/java/com/kuxuan/fastbrowser/ExampleInstrumentedTest.java

@@ -0,0 +1,26 @@
1
+package com.kuxuan.fastbrowser;
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.kuxuan.fastbrowser", appContext.getPackageName());
25
+    }
26
+}

+ 21 - 0
app/src/main/AndroidManifest.xml

@@ -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.kuxuan.fastbrowser">
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>

+ 13 - 0
app/src/main/java/com/kuxuan/fastbrowser/MainActivity.java

@@ -0,0 +1,13 @@
1
+package com.kuxuan.fastbrowser;
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
+}

File diff suppressed because it is too large
+ 34 - 0
app/src/main/res/drawable-v24/ic_launcher_foreground.xml


+ 170 - 0
app/src/main/res/drawable/ic_launcher_background.xml

@@ -0,0 +1,170 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
3
+    android:width="108dp"
4
+    android:height="108dp"
5
+    android:viewportHeight="108"
6
+    android:viewportWidth="108">
7
+    <path
8
+        android:fillColor="#26A69A"
9
+        android:pathData="M0,0h108v108h-108z" />
10
+    <path
11
+        android:fillColor="#00000000"
12
+        android:pathData="M9,0L9,108"
13
+        android:strokeColor="#33FFFFFF"
14
+        android:strokeWidth="0.8" />
15
+    <path
16
+        android:fillColor="#00000000"
17
+        android:pathData="M19,0L19,108"
18
+        android:strokeColor="#33FFFFFF"
19
+        android:strokeWidth="0.8" />
20
+    <path
21
+        android:fillColor="#00000000"
22
+        android:pathData="M29,0L29,108"
23
+        android:strokeColor="#33FFFFFF"
24
+        android:strokeWidth="0.8" />
25
+    <path
26
+        android:fillColor="#00000000"
27
+        android:pathData="M39,0L39,108"
28
+        android:strokeColor="#33FFFFFF"
29
+        android:strokeWidth="0.8" />
30
+    <path
31
+        android:fillColor="#00000000"
32
+        android:pathData="M49,0L49,108"
33
+        android:strokeColor="#33FFFFFF"
34
+        android:strokeWidth="0.8" />
35
+    <path
36
+        android:fillColor="#00000000"
37
+        android:pathData="M59,0L59,108"
38
+        android:strokeColor="#33FFFFFF"
39
+        android:strokeWidth="0.8" />
40
+    <path
41
+        android:fillColor="#00000000"
42
+        android:pathData="M69,0L69,108"
43
+        android:strokeColor="#33FFFFFF"
44
+        android:strokeWidth="0.8" />
45
+    <path
46
+        android:fillColor="#00000000"
47
+        android:pathData="M79,0L79,108"
48
+        android:strokeColor="#33FFFFFF"
49
+        android:strokeWidth="0.8" />
50
+    <path
51
+        android:fillColor="#00000000"
52
+        android:pathData="M89,0L89,108"
53
+        android:strokeColor="#33FFFFFF"
54
+        android:strokeWidth="0.8" />
55
+    <path
56
+        android:fillColor="#00000000"
57
+        android:pathData="M99,0L99,108"
58
+        android:strokeColor="#33FFFFFF"
59
+        android:strokeWidth="0.8" />
60
+    <path
61
+        android:fillColor="#00000000"
62
+        android:pathData="M0,9L108,9"
63
+        android:strokeColor="#33FFFFFF"
64
+        android:strokeWidth="0.8" />
65
+    <path
66
+        android:fillColor="#00000000"
67
+        android:pathData="M0,19L108,19"
68
+        android:strokeColor="#33FFFFFF"
69
+        android:strokeWidth="0.8" />
70
+    <path
71
+        android:fillColor="#00000000"
72
+        android:pathData="M0,29L108,29"
73
+        android:strokeColor="#33FFFFFF"
74
+        android:strokeWidth="0.8" />
75
+    <path
76
+        android:fillColor="#00000000"
77
+        android:pathData="M0,39L108,39"
78
+        android:strokeColor="#33FFFFFF"
79
+        android:strokeWidth="0.8" />
80
+    <path
81
+        android:fillColor="#00000000"
82
+        android:pathData="M0,49L108,49"
83
+        android:strokeColor="#33FFFFFF"
84
+        android:strokeWidth="0.8" />
85
+    <path
86
+        android:fillColor="#00000000"
87
+        android:pathData="M0,59L108,59"
88
+        android:strokeColor="#33FFFFFF"
89
+        android:strokeWidth="0.8" />
90
+    <path
91
+        android:fillColor="#00000000"
92
+        android:pathData="M0,69L108,69"
93
+        android:strokeColor="#33FFFFFF"
94
+        android:strokeWidth="0.8" />
95
+    <path
96
+        android:fillColor="#00000000"
97
+        android:pathData="M0,79L108,79"
98
+        android:strokeColor="#33FFFFFF"
99
+        android:strokeWidth="0.8" />
100
+    <path
101
+        android:fillColor="#00000000"
102
+        android:pathData="M0,89L108,89"
103
+        android:strokeColor="#33FFFFFF"
104
+        android:strokeWidth="0.8" />
105
+    <path
106
+        android:fillColor="#00000000"
107
+        android:pathData="M0,99L108,99"
108
+        android:strokeColor="#33FFFFFF"
109
+        android:strokeWidth="0.8" />
110
+    <path
111
+        android:fillColor="#00000000"
112
+        android:pathData="M19,29L89,29"
113
+        android:strokeColor="#33FFFFFF"
114
+        android:strokeWidth="0.8" />
115
+    <path
116
+        android:fillColor="#00000000"
117
+        android:pathData="M19,39L89,39"
118
+        android:strokeColor="#33FFFFFF"
119
+        android:strokeWidth="0.8" />
120
+    <path
121
+        android:fillColor="#00000000"
122
+        android:pathData="M19,49L89,49"
123
+        android:strokeColor="#33FFFFFF"
124
+        android:strokeWidth="0.8" />
125
+    <path
126
+        android:fillColor="#00000000"
127
+        android:pathData="M19,59L89,59"
128
+        android:strokeColor="#33FFFFFF"
129
+        android:strokeWidth="0.8" />
130
+    <path
131
+        android:fillColor="#00000000"
132
+        android:pathData="M19,69L89,69"
133
+        android:strokeColor="#33FFFFFF"
134
+        android:strokeWidth="0.8" />
135
+    <path
136
+        android:fillColor="#00000000"
137
+        android:pathData="M19,79L89,79"
138
+        android:strokeColor="#33FFFFFF"
139
+        android:strokeWidth="0.8" />
140
+    <path
141
+        android:fillColor="#00000000"
142
+        android:pathData="M29,19L29,89"
143
+        android:strokeColor="#33FFFFFF"
144
+        android:strokeWidth="0.8" />
145
+    <path
146
+        android:fillColor="#00000000"
147
+        android:pathData="M39,19L39,89"
148
+        android:strokeColor="#33FFFFFF"
149
+        android:strokeWidth="0.8" />
150
+    <path
151
+        android:fillColor="#00000000"
152
+        android:pathData="M49,19L49,89"
153
+        android:strokeColor="#33FFFFFF"
154
+        android:strokeWidth="0.8" />
155
+    <path
156
+        android:fillColor="#00000000"
157
+        android:pathData="M59,19L59,89"
158
+        android:strokeColor="#33FFFFFF"
159
+        android:strokeWidth="0.8" />
160
+    <path
161
+        android:fillColor="#00000000"
162
+        android:pathData="M69,19L69,89"
163
+        android:strokeColor="#33FFFFFF"
164
+        android:strokeWidth="0.8" />
165
+    <path
166
+        android:fillColor="#00000000"
167
+        android:pathData="M79,19L79,89"
168
+        android:strokeColor="#33FFFFFF"
169
+        android:strokeWidth="0.8" />
170
+</vector>

+ 18 - 0
app/src/main/res/layout/activity_main.xml

@@ -0,0 +1,18 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
3
+    xmlns:app="http://schemas.android.com/apk/res-auto"
4
+    xmlns:tools="http://schemas.android.com/tools"
5
+    android:layout_width="match_parent"
6
+    android:layout_height="match_parent"
7
+    tools:context="com.kuxuan.fastbrowser.MainActivity">
8
+
9
+    <TextView
10
+        android:layout_width="wrap_content"
11
+        android:layout_height="wrap_content"
12
+        android:text="Hello World!"
13
+        app:layout_constraintBottom_toBottomOf="parent"
14
+        app:layout_constraintLeft_toLeftOf="parent"
15
+        app:layout_constraintRight_toRightOf="parent"
16
+        app:layout_constraintTop_toTopOf="parent" />
17
+
18
+</android.support.constraint.ConstraintLayout>

+ 5 - 0
app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml

@@ -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="@drawable/ic_launcher_foreground" />
5
+</adaptive-icon>

+ 5 - 0
app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml

@@ -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="@drawable/ic_launcher_foreground" />
5
+</adaptive-icon>

二進制
app/src/main/res/mipmap-hdpi/ic_launcher.png


二進制
app/src/main/res/mipmap-hdpi/ic_launcher_round.png


二進制
app/src/main/res/mipmap-mdpi/ic_launcher.png


二進制
app/src/main/res/mipmap-mdpi/ic_launcher_round.png


二進制
app/src/main/res/mipmap-xhdpi/ic_launcher.png


二進制
app/src/main/res/mipmap-xhdpi/ic_launcher_round.png


二進制
app/src/main/res/mipmap-xxhdpi/ic_launcher.png


二進制
app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png


二進制
app/src/main/res/mipmap-xxxhdpi/ic_launcher.png


二進制
app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png


+ 6 - 0
app/src/main/res/values/colors.xml

@@ -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>

+ 3 - 0
app/src/main/res/values/strings.xml

@@ -0,0 +1,3 @@
1
+<resources>
2
+    <string name="app_name">FastBrowser</string>
3
+</resources>

+ 11 - 0
app/src/main/res/values/styles.xml

@@ -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>

+ 17 - 0
app/src/test/java/com/kuxuan/fastbrowser/ExampleUnitTest.java

@@ -0,0 +1,17 @@
1
+package com.kuxuan.fastbrowser;
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
+}

+ 27 - 0
build.gradle

@@ -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'
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
+}

+ 1 - 0
settings.gradle

@@ -0,0 +1 @@
1
+include ':app'