update package name.
authorTrillGates <williamtrillgates@gmail.com>
Sat, 19 Jun 2021 07:09:57 +0000 (15:09 +0800)
committerTrillGates <williamtrillgates@gmail.com>
Sat, 19 Jun 2021 07:09:57 +0000 (15:09 +0800)
30 files changed:
app/build.gradle
app/proguard-rules.pro
app/release/ICLoopPageLauncher_V10_202106191058_release.apk [new file with mode: 0644]
app/release/ICLoopPageLauncher_V2_202106121959_release.apk [deleted file]
app/release/output-metadata.json
app/src/main/AndroidManifest.xml
app/src/main/java/com/ic/launcher/App.java [moved from app/src/main/java/com/ic/launcher/loop/App.java with 91% similarity]
app/src/main/java/com/ic/launcher/MainActivity.java [moved from app/src/main/java/com/ic/launcher/loop/LauncherActivity.java with 66% similarity]
app/src/main/java/com/ic/launcher/adapter/MainPageAdapter.java [moved from app/src/main/java/com/ic/launcher/loop/adapter/MainPageAdapter.java with 95% similarity]
app/src/main/java/com/ic/launcher/data/AppItem.java [moved from app/src/main/java/com/ic/launcher/loop/data/AppItem.java with 97% similarity]
app/src/main/java/com/ic/launcher/data/HardCodeAppListRepository.java [moved from app/src/main/java/com/ic/launcher/loop/data/HardCodeAppListRepository.java with 90% similarity]
app/src/main/java/com/ic/launcher/data/IAppListRepository.java [moved from app/src/main/java/com/ic/launcher/loop/data/IAppListRepository.java with 59% similarity]
app/src/main/java/com/ic/launcher/presenter/BasePresenter.java [moved from app/src/main/java/com/ic/launcher/loop/presenter/BasePresenter.java with 63% similarity]
app/src/main/java/com/ic/launcher/presenter/LauncherPresenter.java [moved from app/src/main/java/com/ic/launcher/loop/presenter/LauncherPresenter.java with 86% similarity]
app/src/main/java/com/ic/launcher/presenter/MainPagePresenter.java [moved from app/src/main/java/com/ic/launcher/loop/presenter/MainPagePresenter.java with 99% similarity]
app/src/main/java/com/ic/launcher/presenter/StatusBarBasePresenter.java [moved from app/src/main/java/com/ic/launcher/loop/presenter/StatusBarBasePresenter.java with 98% similarity]
app/src/main/java/com/ic/launcher/presenter/StatusBarPresenter.java [moved from app/src/main/java/com/ic/launcher/loop/presenter/StatusBarPresenter.java with 98% similarity]
app/src/main/java/com/ic/launcher/utils/Constants.java [moved from app/src/main/java/com/ic/launcher/loop/utils/Constants.java with 91% similarity]
app/src/main/java/com/ic/launcher/utils/SystemUtils.java [moved from app/src/main/java/com/ic/launcher/loop/utils/SystemUtils.java with 99% similarity]
app/src/main/java/com/ic/launcher/view/BatteryView.java [moved from app/src/main/java/com/ic/launcher/loop/view/BatteryView.java with 98% similarity]
app/src/main/java/com/ic/launcher/view/MainPageView.java [moved from app/src/main/java/com/ic/launcher/loop/view/MainPageView.java with 94% similarity]
app/src/main/java/com/ic/launcher/view/MarqueeView.java [moved from app/src/main/java/com/ic/launcher/loop/view/MarqueeView.java with 99% similarity]
app/src/main/java/com/ic/launcher/view/SignalView.java [moved from app/src/main/java/com/ic/launcher/loop/view/SignalView.java with 72% similarity]
app/src/main/java/com/ic/launcher/view/SimpleStatusBarView.java [moved from app/src/main/java/com/ic/launcher/loop/view/SimpleStatusBarView.java with 91% similarity]
app/src/main/java/com/ic/launcher/view/StatusBarView.java [moved from app/src/main/java/com/ic/launcher/loop/view/StatusBarView.java with 97% similarity]
app/src/main/res/layout/activity_main.xml
app/src/main/res/layout/item_simple_status_bar.xml
app/src/main/res/layout/item_status_bar.xml
app/src/main/res/values/strings.xml
app/version_code.properties

index 0160702..0857be0 100644 (file)
@@ -17,7 +17,7 @@ android {
     buildToolsVersion "30.0.3"
 
     defaultConfig {
-        applicationId "com.ic.launcher.loop"
+        applicationId "com.ic.launcher"
         minSdkVersion 19
         targetSdkVersion 30
         versionCode 1
index 481bb43..be4edd4 100644 (file)
 
 # If you keep the line number information, uncomment this to
 # hide the original source file name.
-#-renamesourcefileattribute SourceFile
\ No newline at end of file
+#-renamesourcefileattribute SourceFile
+
+
+# Add project specific ProGuard rules here.
+# You can control the set of applied configuration files using the
+# proguardFiles setting in build.gradle.
+#
+# For more details, see
+#   http://developer.android.com/guide/developing/tools/proguard.html
+
+# If your project uses WebView with JS, uncomment the following
+# and specify the fully qualified class name to the JavaScript interface
+# class:
+#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
+#   public *;
+#}
+
+# Uncomment this to preserve the line number information for
+# debugging stack traces.
+#-keepattributes SourceFile,LineNumberTable
+
+# If you keep the line number information, uncomment this to
+# hide the original source file name.
+#-renamesourcefileattribute SourceFile
+
+
+
+-dontoptimize                           # 混合时不使用大小写混合,混合后的类名为小写
+-dontusemixedcaseclassnames             # 混合时不使用大小写混合,混合后的类名为小写
+-dontskipnonpubliclibraryclasses        # 不跳过library中的非public的类
+-dontskipnonpubliclibraryclassmembers   # 不跳过library中的非public的类成员
+-dontpreverify                          # 不做预校验,preverify是proguard的四个步骤之一,Android平台不需要preverify,去掉这一步能够加快混淆速度
+-verbose                                # 在处理时打印冗长的信息
+
+# 保留异常表,以便编译器知道哪些异常可能被抛出
+# 保留InnerClasses,否则外部无法引用内部类
+# 保留Signature,否则无法访问泛型
+-keepattributes Exceptions,SourceFile,LineNumberTable,EnclosingMethod,Signature,*Annotation*,InnerClasses,Deprecated
+
+################################## 需要保留的公共部分 ##################################
+# 保留四大组件,自定义的Application等等这些类不被混淆
+-keep public class * extends android.app.Activity
+-keep public class * extends android.app.Application
+-keep public class * extends android.app.Service
+-keep public class * extends android.content.BroadcastReceiver
+-keep public class * extends android.content.ContentProvider
+-keep public class * extends android.app.backup.BackupAgentHelper
+-keep public class * extends android.preference.Preference
+-keep public class * extends android.view.View
+-keep public class com.android.vending.licensing.ILicensingService
+
+-keep class android.support.** { *; }
+-keep public class * extends android.support.annotation.**
+-keep public class * extends android.app.Fragment
+-keep class com.google.** { *; }
+
+# 保留R下面的资源
+-keep class **.R$* {*;}
+-keepclassmembers class **.R$* {
+    public static <fields>;
+}
+
+# 保留本地native方法不被混淆
+-keepclasseswithmembernames class * {
+    native <methods>;
+}
+
+# 保留在Activity中的方法参数是view的方法,
+# 这样以来我们在layout中写的onClick就不会被影响
+-keepclassmembers class * extends android.app.Activity{
+    public void *(android.view.View);
+}
+
+# 保留我们自定义控件(继承自View)不被混淆
+-keep public class * extends android.view.View{
+    *** get*();
+    void set*(***);
+    public <init>(android.content.Context);
+    public <init>(android.content.Context, android.util.AttributeSet);
+    public <init>(android.content.Context, android.util.AttributeSet, int);
+}
+
+-keepclasseswithmembernames class * {
+    public <init>(android.content.Context, android.util.AttributeSet);
+}
+
+-keepclasseswithmembernames class * {
+    public <init>(android.content.Context, android.util.AttributeSet, int);
+}
+
+# 保留枚举类不被混淆
+-keepclassmembers enum * {
+    public static **[] values();
+    public static ** valueOf(java.lang.String);
+}
+
+# 保留Parcelable序列化类不被混淆
+-keep class * implements android.os.Parcelable {
+  public static final android.os.Parcelable$Creator *;
+}
+
+# 保留Serializable序列化的类不被混淆
+-keepclassmembers class * implements java.io.Serializable {
+    static final long serialVersionUID;
+    private static final java.io.ObjectStreamField[] serialPersistentFields;
+    !static !transient <fields>;
+    !private <fields>;
+    !private <methods>;
+    private void writeObject(java.io.ObjectOutputStream);
+    private void readObject(java.io.ObjectInputStream);
+    java.lang.Object writeReplace();
+    java.lang.Object readResolve();
+}
+
+# 对于带有回调函数的onXXEvent、**On*Listener的,不能被混淆
+-keepclassmembers class * {
+    void *(**On*Event);
+    void *(**On*Listener);
+}
+
+
+-keep class com.sun.jna.** { *; }
+-dontwarn com.sun.jna.**
+
+-keep public class com.android.support.a
+-keep public class com.android.support.b
+-keep public class rx.internal.util
+
+################################## 项目类 ##################################
+
+-keep class com.facebook.** { *; }
+-keep class com.mediatek.** { *; }
+-keep class org.apache.** { *; }
+-keep class okio.Okio.** { *; }
+-keep class java.nio.** { *; }
+-keep class com.android.** { *; }
+-keep class android.** { *; }
+-keep class android.ddm.** { *; }
+-keep class com.alibaba.fastjson.** { *; }
+-dontwarn com.facebook.**
+-dontwarn com.mediatek.**
+-dontwarn java.nio.**
+-dontwarn com.alibaba.fastjson.**
+-dontwarn android.**
+-dontwarn com.android.**
+-dontwarn rx.internal.**
+
+-keep class com.ic.** { *; }
\ No newline at end of file
diff --git a/app/release/ICLoopPageLauncher_V10_202106191058_release.apk b/app/release/ICLoopPageLauncher_V10_202106191058_release.apk
new file mode 100644 (file)
index 0000000..4ad831e
Binary files /dev/null and b/app/release/ICLoopPageLauncher_V10_202106191058_release.apk differ
diff --git a/app/release/ICLoopPageLauncher_V2_202106121959_release.apk b/app/release/ICLoopPageLauncher_V2_202106121959_release.apk
deleted file mode 100644 (file)
index e96e78f..0000000
Binary files a/app/release/ICLoopPageLauncher_V2_202106121959_release.apk and /dev/null differ
index e38593f..49df219 100644 (file)
@@ -4,7 +4,7 @@
     "type": "APK",
     "kind": "Directory"
   },
-  "applicationId": "com.ic.launcher.loop",
+  "applicationId": "com.ic.launcher",
   "variantName": "processReleaseResources",
   "elements": [
     {
@@ -12,7 +12,7 @@
       "filters": [],
       "versionCode": 1,
       "versionName": "1.0",
-      "outputFile": "ICLoopPageLauncher_V2_202106121959_release.apk"
+      "outputFile": "ICLoopPageLauncher_V10_202106191058_release.apk"
     }
   ]
 }
\ No newline at end of file
index b66c63a..803b42d 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:tools="http://schemas.android.com/tools"
-    package="com.ic.launcher.loop"
+    package="com.ic.launcher"
     android:sharedUserId="android.uid.system">
 
 
         android:roundIcon="@mipmap/ic_launcher_round"
         android:supportsRtl="true"
         android:theme="@style/Theme.LoopPageLauncher">
-        <activity android:name=".LauncherActivity">
+        <activity
+            android:name=".MainActivity"
+            android:configChanges="keyboardHidden|orientation|screenSize|locale
+            |screenLayout|mcc|mnc|layoutDirection"
+            android:screenOrientation="portrait">
             <intent-filter>
                 <action android:name="android.intent.action.MAIN" />
+                <action android:name="android.intent.action.VIEW" />
 
+                <category android:name="android.intent.category.HOME" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <category android:name="android.intent.category.MONKEY" />
                 <category android:name="android.intent.category.LAUNCHER" />
             </intent-filter>
         </activity>
similarity index 91%
rename from app/src/main/java/com/ic/launcher/loop/App.java
rename to app/src/main/java/com/ic/launcher/App.java
index 6a7e720..53b2faf 100644 (file)
@@ -1,4 +1,4 @@
-package com.ic.launcher.loop;
+package com.ic.launcher;
 
 import android.app.Application;
 
@@ -1,5 +1,6 @@
-package com.ic.launcher.loop;
+package com.ic.launcher;
 
+import android.content.ComponentName;
 import android.content.Intent;
 import android.os.Bundle;
 import android.text.TextUtils;
@@ -9,12 +10,12 @@ import android.widget.Toast;
 import androidx.appcompat.app.AppCompatActivity;
 import androidx.viewpager2.widget.ViewPager2;
 
-import com.ic.launcher.loop.adapter.MainPageAdapter;
-import com.ic.launcher.loop.presenter.LauncherPresenter;
-import com.ic.launcher.loop.view.SimpleStatusBarView;
-import com.ic.launcher.loop.view.StatusBarView;
+import com.ic.launcher.adapter.MainPageAdapter;
+import com.ic.launcher.presenter.LauncherPresenter;
+import com.ic.launcher.view.SimpleStatusBarView;
+import com.ic.launcher.view.StatusBarView;
 
-public class LauncherActivity extends AppCompatActivity {
+public class MainActivity extends AppCompatActivity {
 
     private MainPageAdapter mainPageAdapter;
     private LauncherPresenter mainPagePresenter;
@@ -33,7 +34,7 @@ public class LauncherActivity extends AppCompatActivity {
 
     @Override
     public void onBackPressed() {
-        //TODO:
+        looperPage.setCurrentItem(mainPageAdapter.getItemCount() / 2, false);
     }
 
     private void initPresenter() {
@@ -54,13 +55,22 @@ public class LauncherActivity extends AppCompatActivity {
             int packageNameResId = item.getPackageNameResId();
             String packageName = getString(packageNameResId);
             if (!TextUtils.isEmpty(packageName)) {
-                Intent launchIntentForPackage = getPackageManager().getLaunchIntentForPackage(packageName);
-                if (launchIntentForPackage != null) {
-                    launchIntentForPackage.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
-                    startActivity(launchIntentForPackage);
+                //APN独立处理
+                if (packageName.equals(getString(R.string.app_package_name_apn))) {
+                    Intent apnIntent = new Intent();
+                    ComponentName apnComponent = new ComponentName("com.android.settings",
+                            "com.android.settings.ApnSettings");
+                    apnIntent.setComponent(apnComponent);
+                    startActivity(apnIntent);
                 } else {
-                    Toast.makeText(this, getString(R.string.no_application_tips_text),
-                            Toast.LENGTH_SHORT).show();
+                    Intent launchIntentForPackage = getPackageManager().getLaunchIntentForPackage(packageName);
+                    if (launchIntentForPackage != null) {
+                        launchIntentForPackage.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+                        startActivity(launchIntentForPackage);
+                    } else {
+                        Toast.makeText(this, getString(R.string.no_application_tips_text),
+                                Toast.LENGTH_SHORT).show();
+                    }
                 }
             }
         });
@@ -91,4 +101,6 @@ public class LauncherActivity extends AppCompatActivity {
         simpleStatusBar = findViewById(R.id.simple_status_bar);
         simpleStatusBar.initViewModel(this);
     }
+
+
 }
\ No newline at end of file
@@ -1,4 +1,4 @@
-package com.ic.launcher.loop.adapter;
+package com.ic.launcher.adapter;
 
 import android.view.LayoutInflater;
 import android.view.View;
@@ -11,9 +11,10 @@ import androidx.lifecycle.LifecycleOwner;
 import androidx.recyclerview.widget.RecyclerView;
 import androidx.viewpager2.widget.ViewPager2;
 
-import com.ic.launcher.loop.R;
-import com.ic.launcher.loop.data.AppItem;
-import com.ic.launcher.loop.view.MainPageView;
+import com.ic.launcher.R;
+import com.ic.launcher.data.AppItem;
+
+import com.ic.launcher.view.MainPageView;
 
 import java.util.ArrayList;
 import java.util.List;
@@ -1,8 +1,8 @@
-package com.ic.launcher.loop.data;
+package com.ic.launcher.data;
 
 import android.content.Context;
 
-import com.ic.launcher.loop.R;
+import com.ic.launcher.R;
 
 import java.util.ArrayList;
 import java.util.List;
@@ -73,15 +73,15 @@ public class HardCodeAppListRepository implements IAppListRepository {
         // -拍照
         appItems.add(new AppItem(
                 R.string.app_title_camera,
-                R.mipmap.app_icon_phone,
-                R.string.app_package_name_photo,
+                R.mipmap.app_icon_camera,
+                R.string.app_package_name_camera,
                 true
         ));
         // -相册
         appItems.add(new AppItem(
                 R.string.app_title_photo,
                 R.mipmap.app_icon_photo,
-                R.string.app_package_name_phone,
+                R.string.app_package_name_photo,
                 true
         ));
         // -短信
@@ -112,6 +112,14 @@ public class HardCodeAppListRepository implements IAppListRepository {
                 R.string.app_package_name_settings,
                 true
         ));
+
+        // -APN临时
+        appItems.add(new AppItem(
+                R.string.app_title_apn,
+                R.mipmap.app_icon_settings,
+                R.string.app_package_name_apn,
+                true
+        ));
         return appItems;
     }
 
@@ -1,12 +1,12 @@
-package com.ic.launcher.loop.presenter;
+package com.ic.launcher.presenter;
 
 import android.content.Context;
 
 import androidx.lifecycle.MutableLiveData;
 
-import com.ic.launcher.loop.data.AppItem;
-import com.ic.launcher.loop.data.HardCodeAppListRepository;
-import com.ic.launcher.loop.data.IAppListRepository;
+import com.ic.launcher.data.AppItem;
+import com.ic.launcher.data.HardCodeAppListRepository;
+import com.ic.launcher.data.IAppListRepository;
 
 import java.util.List;
 import java.util.concurrent.ExecutorService;
@@ -1,4 +1,4 @@
-package com.ic.launcher.loop.presenter;
+package com.ic.launcher.presenter;
 
 import android.content.BroadcastReceiver;
 import android.content.Context;
@@ -15,7 +15,7 @@ import androidx.annotation.NonNull;
 import androidx.lifecycle.MutableLiveData;
 
 import com.ic.iclooger.ICLogger;
-import com.ic.launcher.loop.R;
+import com.ic.launcher.R;
 
 import org.threeten.bp.Instant;
 import org.threeten.bp.LocalDateTime;
@@ -1,4 +1,4 @@
-package com.ic.launcher.loop.presenter;
+package com.ic.launcher.presenter;
 
 import android.content.BroadcastReceiver;
 import android.content.Context;
@@ -16,8 +16,7 @@ import android.telephony.TelephonyManager;
 
 import androidx.lifecycle.MutableLiveData;
 
-import com.ic.iclooger.ICLogger;
-import com.ic.launcher.loop.utils.SystemUtils;
+import com.ic.launcher.utils.SystemUtils;
 
 import java.util.List;
 
@@ -1,4 +1,4 @@
-package com.ic.launcher.loop.presenter;
+package com.ic.launcher.presenter;
 
 import android.bluetooth.BluetoothAdapter;
 import android.content.BroadcastReceiver;
@@ -19,7 +19,8 @@ import com.ic.iclooger.ICLogger;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
 
-import static com.ic.launcher.loop.utils.Constants.SETTINGS;
+import static com.ic.launcher.utils.Constants.SETTINGS;
+
 
 public class StatusBarPresenter extends StatusBarBasePresenter {
 
@@ -1,4 +1,4 @@
-package com.ic.launcher.loop.utils;
+package com.ic.launcher.utils;
 
 public class Constants {
     public static final String PATH = "settings";
@@ -1,4 +1,4 @@
-package com.ic.launcher.loop.view;
+package com.ic.launcher.view;
 
 import android.content.Context;
 import android.graphics.Bitmap;
@@ -11,7 +11,7 @@ import android.view.View;
 import androidx.annotation.Nullable;
 
 import com.ic.iclooger.ICLogger;
-import com.ic.launcher.loop.R;
+import com.ic.launcher.R;
 
 
 public class BatteryView extends View {
@@ -1,4 +1,4 @@
-package com.ic.launcher.loop.view;
+package com.ic.launcher.view;
 
 import android.content.Context;
 import android.util.AttributeSet;
@@ -11,8 +11,8 @@ import androidx.annotation.Nullable;
 import androidx.lifecycle.LifecycleOwner;
 
 import com.ic.iclooger.ICLogger;
-import com.ic.launcher.loop.R;
-import com.ic.launcher.loop.presenter.MainPagePresenter;
+import com.ic.launcher.R;
+import com.ic.launcher.presenter.MainPagePresenter;
 
 public class MainPageView extends LinearLayout {
 
@@ -1,4 +1,4 @@
-package com.ic.launcher.loop.view;
+package com.ic.launcher.view;
 
 import android.content.Context;
 import android.util.AttributeSet;
@@ -1,4 +1,4 @@
-package com.ic.launcher.loop.view;
+package com.ic.launcher.view;
 
 import android.content.Context;
 import android.graphics.Bitmap;
@@ -15,7 +15,8 @@ import android.view.View;
 import androidx.annotation.Nullable;
 
 import com.ic.iclooger.ICLogger;
-import com.ic.launcher.loop.R;
+import com.ic.launcher.R;
+
 
 public class SignalView extends View {
 
@@ -48,7 +49,7 @@ public class SignalView extends View {
         textPaint = new Paint();
         textPaint.setFlags(Paint.ANTI_ALIAS_FLAG);
         textPaint.setColor(Color.WHITE);
-        textPaint.setTextSize(12.0f);
+        textPaint.setTextSize(type_size);
         textPaint.setTypeface(Typeface.DEFAULT_BOLD);
         defaultSgnalPic = BitmapFactory.decodeResource(getResources(), R.mipmap.top_signal_0, options);
         targetHeight = defaultSgnalPic.getHeight();
@@ -61,8 +62,20 @@ public class SignalView extends View {
     }
 
     private void retestSize() {
+        ICLogger.d("showText ==>  " + showText);
+        //不同size
+        if (isNoNetwork || showText.equals(getContext().getString(R.string.no_sim_service))) {
+            textPaint.setTextSize(no_sim_card_size);
+        } else {
+            textPaint.setTextSize(type_size);
+        }
         textWidth = textPaint.measureText(showText);
-        totalWidth = width;
+        //如果没有信号的时候,宽度则为文字的宽度
+        if (isNoNetwork) {
+            totalWidth = (int) textWidth;
+        } else {
+            totalWidth = width;
+        }
         //ICLogger.d("textWidth == > " + textWidth + " totalWidth == > " + totalWidth);
     }
 
@@ -87,7 +100,7 @@ public class SignalView extends View {
         //显示图片图标
         this.currentPic = R.mipmap.top_no_sim_card;
         //清空文字
-        this.showText = "";
+        this.showText = getContext().getString(R.string.no_sim_car);
         retestSize();
         updateBitMap();
         invalidate();
@@ -101,6 +114,11 @@ public class SignalView extends View {
         if (!TextUtils.isEmpty(text) && currentPic == R.mipmap.top_no_sim_card) {
             currentPic = R.mipmap.top_signal_0;
         }
+
+        if (TextUtils.isEmpty(text)) {
+            text = getContext().getString(R.string.no_sim_service);
+        }
+
         this.isNoNetwork = false;
         if (!showText.equals(text)) {
             showText = text;
@@ -110,9 +128,6 @@ public class SignalView extends View {
     }
 
     public void updateLev(int lev) {
-        if (lastLev == lev) {
-            return;
-        }
         this.lastLev = lev;
         ICLogger.d("update level..." + lev);
         if (lev < 0 || lev > 5 || isNoNetwork) {
@@ -128,13 +143,19 @@ public class SignalView extends View {
     @Override
     protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
         ICLogger.d("onMeasure...");
-        setMeasuredDimension(totalWidth, targetHeight);
+        int size = MeasureSpec.getSize(heightMeasureSpec);
+        setMeasuredDimension(totalWidth, isNoNetwork ? size : targetHeight);
     }
 
     private PaintFlagsDrawFilter mPaintFlagsFilter = new PaintFlagsDrawFilter(0,
             Paint.ANTI_ALIAS_FLAG
                     | Paint.FILTER_BITMAP_FLAG);
 
+
+    public static final float type_size = 12.0f;
+    public static final float no_sim_card_size = 16.0f;
+
+
     @Override
     protected void onDraw(Canvas canvas) {
         if (bitmap == null) {
@@ -142,10 +163,19 @@ public class SignalView extends View {
         }
         canvas.setDrawFilter(mPaintFlagsFilter);
         //判断状态
-        canvas.drawBitmap(bitmap, 0, 0, picPaint);
-        if (!TextUtils.isEmpty(showText)) {
-            canvas.drawText(showText, totalWidth - textWidth - 6,
-                    targetHeight - 15, textPaint);
+        //判断图片类型
+        if (currentPic == R.mipmap.top_no_sim_card) {
+            textPaint.setTextSize(no_sim_card_size);
+            //绘制文字
+            canvas.drawText(showText, 0,
+                    targetHeight, textPaint);
+        } else {
+            textPaint.setTextSize(type_size);
+            canvas.drawBitmap(bitmap, 0, 0, picPaint);
+            if (!TextUtils.isEmpty(showText)) {
+                canvas.drawText(showText, totalWidth - textWidth - 6,
+                        targetHeight - 15, textPaint);
+            }
         }
     }
 }
@@ -1,4 +1,4 @@
-package com.ic.launcher.loop.view;
+package com.ic.launcher.view;
 
 import android.content.Context;
 import android.text.TextUtils;
@@ -11,9 +11,10 @@ import androidx.annotation.NonNull;
 import androidx.annotation.Nullable;
 import androidx.lifecycle.LifecycleOwner;
 
-import com.ic.launcher.loop.R;
-import com.ic.launcher.loop.presenter.MainPagePresenter;
-import com.ic.launcher.loop.presenter.StatusBarPresenter;
+import com.ic.launcher.R;
+import com.ic.launcher.presenter.MainPagePresenter;
+import com.ic.launcher.presenter.StatusBarPresenter;
+
 
 public class SimpleStatusBarView extends FrameLayout {
 
@@ -1,4 +1,4 @@
-package com.ic.launcher.loop.view;
+package com.ic.launcher.view;
 
 import android.content.Context;
 import android.text.TextUtils;
@@ -12,8 +12,9 @@ import androidx.annotation.NonNull;
 import androidx.annotation.Nullable;
 import androidx.lifecycle.LifecycleOwner;
 
-import com.ic.launcher.loop.R;
-import com.ic.launcher.loop.presenter.StatusBarPresenter;
+import com.ic.launcher.R;
+import com.ic.launcher.presenter.StatusBarPresenter;
+
 
 public class StatusBarView extends FrameLayout {
 
@@ -119,7 +120,7 @@ public class StatusBarView extends FrameLayout {
             }
         });
         statusBarPresenter.networkTypeValue.observe(lifecycleOwner, type -> {
-            //ICLogger.d("type == > " + type);
+           // ICLogger.d("type == > " + type);
             if (TextUtils.isEmpty(type)) {
                 signalView.noNetwork();
             } else {
index 2b48297..9c264d6 100644 (file)
@@ -4,7 +4,7 @@
     xmlns:tools="http://schemas.android.com/tools"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
-    tools:context=".LauncherActivity">
+    tools:context=".MainActivity">
 
     <androidx.viewpager2.widget.ViewPager2
         android:id="@+id/main_looper_pager"
@@ -17,7 +17,7 @@
         app:layout_constraintTop_toTopOf="parent" />
 
     <!--在首页时显示:顶部的状态栏-->
-    <com.ic.launcher.loop.view.StatusBarView
+    <com.ic.launcher.view.StatusBarView
         android:id="@+id/status_bar"
         android:layout_width="match_parent"
         android:layout_height="34px"
         app:layout_constraintTop_toTopOf="parent" />
 
     <!--在应用列表时显示:顶部的时间栏-->
-    <com.ic.launcher.loop.view.SimpleStatusBarView
+    <com.ic.launcher.view.SimpleStatusBarView
         android:id="@+id/simple_status_bar"
         android:layout_width="match_parent"
-        android:layout_height="34dp"
+        android:layout_height="34px"
         android:visibility="gone"
         app:layout_constraintTop_toTopOf="parent" />
 
index 7199687..075dc4d 100644 (file)
@@ -5,19 +5,19 @@
     android:layout_height="match_parent">
 
 
-    <com.ic.launcher.loop.view.SignalView
-        android:layout_width="wrap_content"
+    <com.ic.launcher.view.SignalView
         android:id="@+id/signal_view"
+        android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         app:layout_constraintBottom_toBottomOf="parent"
         app:layout_constraintLeft_toLeftOf="parent" />
 
 
     <TextView
+        android:id="@+id/simple_status_bar_time_tv"
         android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
+        android:layout_height="match_parent"
         android:text="12:12"
-        android:id="@+id/simple_status_bar_time_tv"
         android:textColor="@color/white"
         android:textSize="22sp"
         android:textStyle="bold"
index f4adc33..29cf7ae 100644 (file)
@@ -1,25 +1,23 @@
 <?xml version="1.0" encoding="utf-8"?>
-<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:app="http://schemas.android.com/apk/res-auto"
     android:layout_width="match_parent"
     android:layout_height="match_parent">
 
 
-    <com.ic.launcher.loop.view.SignalView
+    <com.ic.launcher.view.SignalView
         android:id="@+id/signal_view"
         android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        app:layout_constraintBottom_toBottomOf="parent"
-        app:layout_constraintLeft_toLeftOf="parent" />
+        android:layout_height="match_parent"
+        android:layout_alignParentLeft="true" />
 
 
-    <com.ic.launcher.loop.view.MarqueeView
+    <com.ic.launcher.view.MarqueeView
         android:id="@+id/mar_queue_view"
         android:layout_width="match_parent"
         android:layout_height="match_parent"
-        android:layout_marginLeft="40dp"
         android:layout_marginRight="90dp"
-        app:layout_constraintBottom_toBottomOf="parent">
+        android:layout_toRightOf="@id/signal_view">
 
         <ImageView
             android:id="@+id/top_icon_wifi"
             android:visibility="gone" />
 
 
-    </com.ic.launcher.loop.view.MarqueeView>
+    </com.ic.launcher.view.MarqueeView>
+
+
+    <com.ic.launcher.view.BatteryView
+        android:id="@+id/right_battery_view"
+        android:layout_width="wrap_content"
+        android:layout_height="match_parent"
+        android:layout_alignParentRight="true" />
 
 
     <TextView
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:layout_marginRight="5dp"
+        android:layout_toLeftOf="@id/right_battery_view"
         android:text="100%"
         android:textColor="@color/white"
         android:textSize="20sp"
-        android:textStyle="bold"
-        app:layout_constraintBottom_toBottomOf="parent"
-        app:layout_constraintRight_toLeftOf="@id/right_battery_view" />
-
-    <com.ic.launcher.loop.view.BatteryView
-        android:id="@+id/right_battery_view"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        app:layout_constraintBottom_toBottomOf="parent"
-        app:layout_constraintRight_toRightOf="parent" />
-
+        android:textStyle="bold" />
 
-</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
+</RelativeLayout>
\ No newline at end of file
index 52662dc..d88f907 100644 (file)
@@ -16,7 +16,7 @@
     <string name="app_title_record">记录</string>
     <string name="app_title_sign">签到</string>
     <string name="app_title_settings">设定</string>
-
+    <string name="app_title_apn">APN临时</string>
     <!--Package name-->
     <string name="app_package_name_temperature">com.ic.temperature</string>
     <string name="app_package_name_health">com.ic.blood</string>
@@ -30,7 +30,8 @@
     <string name="app_package_name_sms">com.ic.sms</string>
     <string name="app_package_name_record">com.ic.record</string>
     <string name="app_package_name_sign">com.ic.sign</string>
-    <string name="app_package_name_settings">com.eqc.setting</string>
+    <string name="app_package_name_settings">com.eqc.settings</string>
+    <string name="app_package_name_apn">com.ic.apn</string>
     <string name="no_application_tips_text">未找到相关应用.</string>
 
     <string name="monday">星期一</string>
@@ -40,4 +41,8 @@
     <string name="friday">星期五</string>
     <string name="saturday">星期六</string>
     <string name="sunday">星期日</string>
+
+    <string name="no_sim_car">没有sim卡</string>
+    <string name="no_sim_service">没有服务</string>
+
 </resources>
\ No newline at end of file
index 13c6595..dee5003 100644 (file)
@@ -1,2 +1,2 @@
-#Sat Jun 12 19:59:47 CST 2021
-VERSION_CODE=2
+#Sat Jun 19 10:58:54 CST 2021
+VERSION_CODE=10