Browse Source

创建组件的Application

guiying712 9 years ago
parent
commit
062f9571fa

+ 2 - 0
.gitignore

@@ -16,6 +16,7 @@ out/
 # Gradle files
 .gradle/
 build/
+.idea/
 
 # Local configuration file (sdk path, etc)
 local.properties
@@ -36,6 +37,7 @@ captures/
 *.iml
 .idea/workspace.xml
 .idea/vcs.xml
+.idea/libraries
 
 # Keystore files
 *.jks

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

@@ -1,3 +1,6 @@
 <resources>
     <string name="app_name">Common</string>
+
+    <string name="current_internet_invalid">当前网络未连接</string>
+
 </resources>

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

@@ -3,6 +3,7 @@
     package="com.guiying.androidmodulepattern">
 
     <application
+        android:name=".MyApplication"
         android:allowBackup="true"
         android:icon="@mipmap/ic_launcher"
         android:label="@string/app_name"

+ 18 - 0
app/src/main/java/com/guiying/androidmodulepattern/MyApplication.java

@@ -0,0 +1,18 @@
+package com.guiying.androidmodulepattern;
+
+import com.guiying.common.base.BaseApplication;
+
+/**
+ * <p>类说明</p>
+ *
+ * @author 张华洋 2017/2/15 20:14
+ * @version V1.2.0
+ * @name MyApplication
+ */
+public class MyApplication extends BaseApplication {
+
+    @Override
+    public void onCreate() {
+        super.onCreate();
+    }
+}

+ 0 - 2
common/src/main/java/com/guiying/common/http/HttpClient.java

@@ -36,8 +36,6 @@ import retrofit2.Retrofit;
  */
 public class HttpClient {
 
-    /*The certificate's password*/
-    private static final String STORE_PASS = "ivms8700";
     /*返回数据为String*/
     public static final int STRING = 0;
     /*返回数据为json对象*/

+ 4 - 1
girls/src/main/debug/AndroidManifest.xml

@@ -3,12 +3,15 @@
     package="com.guiying.girls">
 
     <application
+        android:name="debug.GirlsApplication"
         android:allowBackup="true"
         android:icon="@mipmap/ic_launcher"
         android:label="@string/app_name"
         android:supportsRtl="true"
         android:theme="@style/AppTheme">
-        <activity android:name=".GirlsActivity">
+        <activity
+            android:name=".GirlsActivity"
+            android:screenOrientation="portrait">
             <intent-filter>
                 <action android:name="android.intent.action.MAIN" />
 

+ 18 - 0
girls/src/main/java/debug/GirlsApplication.java

@@ -0,0 +1,18 @@
+package debug;
+
+import com.guiying.common.base.BaseApplication;
+
+/**
+ * <p>类说明</p>
+ *
+ * @author 张华洋 2017/2/15 20:09
+ * @version V1.2.0
+ * @name GirlsApplication
+ */
+public class GirlsApplication extends BaseApplication {
+
+    @Override
+    public void onCreate() {
+        super.onCreate();
+    }
+}

+ 3 - 1
girls/src/main/release/AndroidManifest.xml

@@ -2,7 +2,9 @@
     package="com.guiying.girls">
 
     <application android:theme="@style/AppTheme">
-
+        <activity
+            android:name=".GirlsActivity"
+            android:screenOrientation="portrait" />
     </application>
 
 </manifest>

+ 4 - 1
news/src/main/debug/AndroidManifest.xml

@@ -3,12 +3,15 @@
     package="com.guiying.news">
 
     <application
+        android:name="debug.NewsApplication"
         android:allowBackup="true"
         android:icon="@mipmap/ic_launcher"
         android:label="@string/app_name"
         android:supportsRtl="true"
         android:theme="@style/AppTheme">
-        <activity android:name=".NewsActivity">
+        <activity
+            android:name=".NewsActivity"
+            android:screenOrientation="portrait">
             <intent-filter>
                 <action android:name="android.intent.action.MAIN" />
 

+ 18 - 0
news/src/main/java/debug/NewsApplication.java

@@ -0,0 +1,18 @@
+package debug;
+
+import com.guiying.common.base.BaseApplication;
+
+/**
+ * <p>类说明</p>
+ *
+ * @author 张华洋 2017/2/15 20:11
+ * @version V1.2.0
+ * @name NewsApplication
+ */
+public class NewsApplication extends BaseApplication {
+
+    @Override
+    public void onCreate() {
+        super.onCreate();
+    }
+}

+ 3 - 1
news/src/main/release/AndroidManifest.xml

@@ -2,7 +2,9 @@
     package="com.guiying.news">
 
     <application android:theme="@style/AppTheme">
-
+        <activity
+            android:name=".NewsActivity"
+            android:screenOrientation="portrait" />
     </application>
 
 </manifest>