Browse Source

修复沉浸栏模式下底部输入框 被系统盘隐藏的bug!!!

Arison 7 years ago
parent
commit
ff8f85bb8e
36 changed files with 374 additions and 21 deletions
  1. 2 2
      WeiChat/build.gradle
  2. 3 3
      WeiChat/version.properties
  3. 12 14
      app_modular/appme/src/main/java/com/uas/appme/settings/activity/SettingActivity.java
  4. 1 0
      app_modular/appmusic/.gitignore
  5. 24 0
      app_modular/appmusic/build.gradle
  6. 25 0
      app_modular/appmusic/proguard-rules.pro
  7. 26 0
      app_modular/appmusic/src/androidTest/java/com/usoftchina/music/ExampleInstrumentedTest.java
  8. 18 0
      app_modular/appmusic/src/main/AndroidManifest.xml
  9. BIN
      app_modular/appmusic/src/main/res/drawable-hdpi/bg_yingtang_music.png
  10. BIN
      app_modular/appmusic/src/main/res/drawable-hdpi/ic_launcher.png
  11. BIN
      app_modular/appmusic/src/main/res/drawable-hdpi/ic_player_seeker.png
  12. BIN
      app_modular/appmusic/src/main/res/drawable-hdpi/music_paying.png
  13. BIN
      app_modular/appmusic/src/main/res/drawable-hdpi/music_start.png
  14. BIN
      app_modular/appmusic/src/main/res/drawable-xhdpi/ic_launcher.png
  15. BIN
      app_modular/appmusic/src/main/res/drawable-xhdpi/music_paying.png
  16. BIN
      app_modular/appmusic/src/main/res/drawable-xhdpi/music_start.png
  17. BIN
      app_modular/appmusic/src/main/res/drawable-xxhdpi/ic_launcher.png
  18. BIN
      app_modular/appmusic/src/main/res/drawable-xxhdpi/music_paying.png
  19. BIN
      app_modular/appmusic/src/main/res/drawable-xxhdpi/music_start.png
  20. 18 0
      app_modular/appmusic/src/main/res/drawable/layer_list_progrssbar_play_bottom.xml
  21. 11 0
      app_modular/appmusic/src/main/res/drawable/layer_list_thumb_playing_default.xml
  22. 10 0
      app_modular/appmusic/src/main/res/drawable/layer_list_thumb_playing_press.xml
  23. 10 0
      app_modular/appmusic/src/main/res/drawable/selector_btn.xml
  24. 6 0
      app_modular/appmusic/src/main/res/drawable/selector_progress_bar_playing.xml
  25. 9 0
      app_modular/appmusic/src/main/res/drawable/shape_btn_n.xml
  26. 9 0
      app_modular/appmusic/src/main/res/drawable/shape_btn_p.xml
  27. 9 0
      app_modular/appmusic/src/main/res/drawable/shape_btn_u.xml
  28. 10 0
      app_modular/appmusic/src/main/res/drawable/shape_toast_bg.xml
  29. 82 0
      app_modular/appmusic/src/main/res/layout/activity_main_music.xml
  30. 18 0
      app_modular/appmusic/src/main/res/layout/seekbar.xml
  31. 16 0
      app_modular/appmusic/src/main/res/layout/toast.xml
  32. BIN
      app_modular/appmusic/src/main/res/raw/yingtang.mp3
  33. 33 0
      app_modular/appmusic/src/main/res/raw/yingtanglrc.lrc
  34. 3 0
      app_modular/appmusic/src/main/res/values/strings.xml
  35. 17 0
      app_modular/appmusic/src/test/java/com/usoftchina/music/ExampleUnitTest.java
  36. 2 2
      settings.gradle

+ 2 - 2
WeiChat/build.gradle

@@ -167,7 +167,7 @@ dependencies {
     androidTestCompile deps.leakcanaryNp
     debugCompile deps.leakcanary
     releaseCompile deps.leakcanaryNp
-    //project
+  
     compile project(':common')
     compile project(':appmessages')
     compile project(':network')
@@ -178,7 +178,7 @@ dependencies {
     compile project(':appme')
     compile project(':appworks')
     compile project(':appbooking')
-//    compile project(':android-pdf-viewer')
+    compile project(':appmusic')
     compile project(':apputils')
     compile 'com.android.support.constraint:constraint-layout:1.0.2'
     compile 'com.android.support:support-v4:26.+'

+ 3 - 3
WeiChat/version.properties

@@ -1,5 +1,5 @@
-#Wed May 23 09:38:35 CST 2018
-debugName=326
+#Wed May 23 14:12:50 CST 2018
+debugName=330
 versionName=630
-debugCode=326
+debugCode=330
 versionCode=170

+ 12 - 14
app_modular/appme/src/main/java/com/uas/appme/settings/activity/SettingActivity.java

@@ -57,14 +57,11 @@ import com.core.model.WorkModel;
 import com.core.net.http.ViewUtil;
 import com.core.utils.CommonUtil;
 import com.core.utils.ToastUtil;
-import com.core.utils.helper.LoginHelper;
-import com.core.utils.sp.UserSp;
 import com.core.widget.view.SwitchView;
 import com.me.network.app.http.HttpClient;
 import com.me.network.app.http.Method;
 import com.me.network.app.http.rx.ResultListener;
 import com.me.network.app.http.rx.ResultSubscriber;
-import com.modular.apputils.utils.PopupWindowHelper;
 import com.scwang.smartrefresh.layout.util.DensityUtil;
 import com.uas.appme.R;
 import com.uas.appme.pedometer.view.NewStepActivity;
@@ -184,17 +181,18 @@ public class SettingActivity extends SupportToolBarActivity implements View.OnCl
         mExitBtn.setOnClickListener(new View.OnClickListener() {
             @Override
             public void onClick(View v) {
-                PopupWindowHelper.showAlart(SettingActivity.this, getString(R.string.app_name), getString(R.string.exit_tips), new PopupWindowHelper.OnSelectListener() {
-                    @Override
-                    public void select(boolean selectOk) {
-                        if (selectOk){
-                            UserSp.getInstance(mContext).clearUserInfo();
-                            ViewUtil.clearAccount(mContext);
-                            LoginHelper.broadcastLogout(mContext);
-                            SettingActivity.this.finish();
-                        }
-                    }
-                });
+                startActivity(new Intent("com.usoftchina.pay.MainMusicActivity"));
+//                PopupWindowHelper.showAlart(SettingActivity.this, getString(R.string.app_name), getString(R.string.exit_tips), new PopupWindowHelper.OnSelectListener() {
+//                    @Override
+//                    public void select(boolean selectOk) {
+//                        if (selectOk){
+//                            UserSp.getInstance(mContext).clearUserInfo();
+//                            ViewUtil.clearAccount(mContext);
+//                            LoginHelper.broadcastLogout(mContext);
+//                            SettingActivity.this.finish();
+//                        }
+//                    }
+//                });
             }
         });
         mCacheTv = (TextView) findViewById(R.id.cache_tv);

+ 1 - 0
app_modular/appmusic/.gitignore

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

+ 24 - 0
app_modular/appmusic/build.gradle

@@ -0,0 +1,24 @@
+apply plugin: 'com.android.library'
+
+
+android {
+    compileSdkVersion rootProject.ext.android.compileSdkVersion
+    buildToolsVersion rootProject.ext.android.buildToolsVersion
+    defaultConfig {
+        minSdkVersion rootProject.ext.android.minSdkVersion
+        targetSdkVersion rootProject.ext.android.targetSdkVersion
+        versionCode rootProject.ext.android.versionCode
+        versionName rootProject.ext.android.versionName
+    }
+    buildTypes {
+        release {
+            minifyEnabled false
+            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
+        }
+    }
+}
+
+dependencies {
+    compile fileTree(include: ['*.jar'], dir: 'libs')
+    compile project(':common')
+}

+ 25 - 0
app_modular/appmusic/proguard-rules.pro

@@ -0,0 +1,25 @@
+# Add project specific ProGuard rules here.
+# By default, the flags in this file are appended to flags specified
+# in C:\Android\sdk/tools/proguard/proguard-android.txt
+# You can edit the include path and order by changing the proguardFiles
+# directive in build.gradle.
+#
+# For more details, see
+#   http://developer.android.com/guide/developing/tools/proguard.html
+
+# Add any project specific keep options here:
+
+# 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

+ 26 - 0
app_modular/appmusic/src/androidTest/java/com/usoftchina/music/ExampleInstrumentedTest.java

@@ -0,0 +1,26 @@
+package com.usoftchina.music;
+
+import android.content.Context;
+import android.support.test.InstrumentationRegistry;
+import android.support.test.runner.AndroidJUnit4;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import static org.junit.Assert.*;
+
+/**
+ * Instrumentation test, which will execute on an Android device.
+ *
+ * @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
+ */
+@RunWith(AndroidJUnit4.class)
+public class ExampleInstrumentedTest {
+    @Test
+    public void useAppContext() throws Exception {
+        // Context of the app under test.
+        Context appContext = InstrumentationRegistry.getTargetContext();
+
+        assertEquals("com.usoftchina.music.test", appContext.getPackageName());
+    }
+}

+ 18 - 0
app_modular/appmusic/src/main/AndroidManifest.xml

@@ -0,0 +1,18 @@
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    package="com.usoftchina.music">
+
+    <application
+        android:allowBackup="true"
+        android:label="@string/app_name"
+        android:supportsRtl="true">
+        <activity android:name="com.usoftchina.pay.MainMusicActivity"
+            android:theme="@style/MainBaseTheme"
+            android:label="智慧英唐">
+            <intent-filter>
+                <action android:name="com.usoftchina.pay.MainMusicActivity" />
+
+                <category android:name="android.intent.category.DEFAULT" />
+            </intent-filter>
+        </activity>
+    </application>
+</manifest>

BIN
app_modular/appmusic/src/main/res/drawable-hdpi/bg_yingtang_music.png


BIN
app_modular/appmusic/src/main/res/drawable-hdpi/ic_launcher.png


BIN
app_modular/appmusic/src/main/res/drawable-hdpi/ic_player_seeker.png


BIN
app_modular/appmusic/src/main/res/drawable-hdpi/music_paying.png


BIN
app_modular/appmusic/src/main/res/drawable-hdpi/music_start.png


BIN
app_modular/appmusic/src/main/res/drawable-xhdpi/ic_launcher.png


BIN
app_modular/appmusic/src/main/res/drawable-xhdpi/music_paying.png


BIN
app_modular/appmusic/src/main/res/drawable-xhdpi/music_start.png


BIN
app_modular/appmusic/src/main/res/drawable-xxhdpi/ic_launcher.png


BIN
app_modular/appmusic/src/main/res/drawable-xxhdpi/music_paying.png


BIN
app_modular/appmusic/src/main/res/drawable-xxhdpi/music_start.png


+ 18 - 0
app_modular/appmusic/src/main/res/drawable/layer_list_progrssbar_play_bottom.xml

@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<layer-list
+  xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:id="@android:id/background">
+        <shape>
+            <solid android:color="#ffdcdcdc" />
+            <corners android:radius="1dip" />
+        </shape>
+    </item>
+    <item android:id="@android:id/progress">
+        <clip>
+            <shape>
+                <solid android:color="#99249ef6" />
+                <corners android:radius="1dp" />
+            </shape>
+        </clip>
+    </item>
+</layer-list>

+ 11 - 0
app_modular/appmusic/src/main/res/drawable/layer_list_thumb_playing_default.xml

@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<layer-list
+    xmlns:android="http://schemas.android.com/apk/res/android">
+    <item >
+        <shape android:shape="oval">
+            <solid
+                android:color="@android:color/holo_green_light" />
+        </shape>
+    </item>
+    <item  android:drawable="@drawable/ic_player_seeker" />
+</layer-list>

+ 10 - 0
app_modular/appmusic/src/main/res/drawable/layer_list_thumb_playing_press.xml

@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>
+<layer-list
+  xmlns:android="http://schemas.android.com/apk/res/android">
+    <item>
+        <shape android:shape="oval">
+            <solid android:color="#99249ef6" />
+        </shape>
+    </item>
+    <item android:drawable="@drawable/ic_player_seeker" />
+</layer-list>

+ 10 - 0
app_modular/appmusic/src/main/res/drawable/selector_btn.xml

@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android" >
+    <item android:state_pressed="true"
+        android:drawable="@drawable/music_paying"
+        ></item>
+    <item android:state_selected="true"
+        android:drawable="@drawable/music_paying"
+        ></item>
+    <item android:drawable="@drawable/music_start"></item>
+</selector>

+ 6 - 0
app_modular/appmusic/src/main/res/drawable/selector_progress_bar_playing.xml

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+    <item 
+        android:drawable="@drawable/layer_list_thumb_playing_press" android:state_pressed="true"/>
+    <item  android:drawable="@drawable/layer_list_thumb_playing_default"/>
+</selector>

+ 9 - 0
app_modular/appmusic/src/main/res/drawable/shape_btn_n.xml

@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android" 
+    android:shape="rectangle"
+    >
+    
+    <corners android:radius="2dp"/>
+
+    <solid android:color="#ffffff"/>
+</shape>

+ 9 - 0
app_modular/appmusic/src/main/res/drawable/shape_btn_p.xml

@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android" 
+    android:shape="rectangle"
+    >
+    
+    <corners android:radius="2dp"/>
+
+    <solid android:color="#EE4000"/>
+</shape>

+ 9 - 0
app_modular/appmusic/src/main/res/drawable/shape_btn_u.xml

@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android" 
+    android:shape="rectangle"
+    >
+    
+    <corners android:radius="2dp"/>
+
+    <solid android:color="#444444"/>
+</shape>

+ 10 - 0
app_modular/appmusic/src/main/res/drawable/shape_toast_bg.xml

@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android"
+    android:shape="rectangle"
+     >
+    <solid android:color="#ffffff"/>
+    <corners android:radius="3dp"/>
+
+    <stroke android:width="2dp"
+        android:color="#88444444"/>
+</shape>

+ 82 - 0
app_modular/appmusic/src/main/res/layout/activity_main_music.xml

@@ -0,0 +1,82 @@
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:background="#000000" >
+
+    <ImageView
+        android:layout_width="fill_parent"
+        android:layout_height="match_parent"
+        android:alpha="0.6"
+        android:scaleType="centerCrop"
+        android:src="@drawable/bg_yingtang_music" />
+
+    <RelativeLayout
+        android:id="@+id/bottom"
+        android:layout_width="match_parent"
+        android:layout_height="120dp"
+        android:layout_alignParentBottom="true"
+        android:orientation="vertical" >
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="90dp"
+            android:layout_alignParentBottom="true"
+            android:gravity="center"
+            android:orientation="horizontal"
+            android:paddingBottom="5dp"
+            android:paddingLeft="20dp" >
+
+            <Button
+                android:id="@+id/btnPlay"
+                android:layout_width="30dp"
+                android:layout_height="30dp"
+                android:textColor="@android:color/transparent"
+                android:background="@drawable/selector_btn"
+                android:text="play" />
+
+            <include
+                android:id="@+id/include_lrc_seekbar"
+                android:visibility="gone"
+                layout="@layout/seekbar" />
+        </LinearLayout>
+        <RelativeLayout 
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content">
+        <TextView
+            android:id="@+id/tv_timeStart"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginLeft="10dp"
+            android:layout_centerVertical="true"
+            android:text="00:00" />
+        <include
+            android:id="@+id/include_player_seekbar"
+            android:layout_width="wrap_content"
+            android:layout_height="20dp"
+            android:layout_centerVertical="true"
+            android:layout_toEndOf="@+id/tv_timeStart"
+            android:layout_toRightOf="@+id/tv_timeStart"
+            layout="@layout/seekbar" />
+
+        <TextView
+            android:id="@+id/tv_timeTotal"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_centerVertical="true"
+            android:layout_marginRight="5dp"
+            android:layout_toRightOf="@+id/include_player_seekbar"
+            android:text="00:00" />
+        </RelativeLayout>
+    </RelativeLayout>
+
+    <com.lg.lrcview_master.LrcView
+        android:id="@+id/lrcView"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:layout_above="@id/bottom"
+        android:layout_marginLeft="30dp"
+        android:layout_marginRight="30dp"
+        android:layout_marginBottom="10dp"/>
+
+</RelativeLayout>

+ 18 - 0
app_modular/appmusic/src/main/res/layout/seekbar.xml

@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+
+
+
+    <SeekBar
+       xmlns:android="http://schemas.android.com/apk/res/android"
+        android:id="@+id/seekBar"
+        android:layout_width="wrap_content"
+        android:layout_height="20dp"
+        android:layout_alignParentTop="true"
+        android:layout_centerVertical="true"
+        android:maxHeight="1.5dp"
+        android:minHeight="1.5dp"
+        android:minWidth="230dp"
+        android:progressDrawable="@drawable/layer_list_progrssbar_play_bottom"
+        android:thumb="@drawable/selector_progress_bar_playing"
+        android:thumbOffset="10dp" />

+ 16 - 0
app_modular/appmusic/src/main/res/layout/toast.xml

@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="utf-8"?>
+<TextView xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="wrap_content"
+    android:layout_height="wrap_content"
+    android:id="@+id/tv_toast_progress"
+    android:text="01:22"
+    android:background="@drawable/shape_toast_bg"
+    android:paddingLeft="20dp"
+    android:paddingRight="20dp"
+    android:paddingTop="10dp"
+    android:paddingBottom="10dp"
+    android:textColor="#000000"
+    >
+    
+
+</TextView>

BIN
app_modular/appmusic/src/main/res/raw/yingtang.mp3


+ 33 - 0
app_modular/appmusic/src/main/res/raw/yingtanglrc.lrc

@@ -0,0 +1,33 @@
+[00:00.01]歌曲:智慧英唐
+[00:20.35]
+[00:20.55]英唐英唐
+[00:24.72]迎着朝阳启航
+[00:28.56]意气风发斗志昂扬
+[00:32.55]豪情藏在胸膛
+[00:36.91]信念是我们的行囊...
+[00:45.00]泥泞中互为肩膀
+[00:49.16]彼此不再彷徨
+[00:52.98]只要心怀梦想
+[00:57.17]定能乘风破浪
+[01:01.31]自强不息坚定地追逐梦想
+[01:09.17]厚德载物诚信是我们的干粮
+[01:17.31]开拓创新英唐智慧要让全球共享
+[01:25.75]携手共进挥洒汗水铸就强大英唐
+[01:33.81]
+[01:42.48]英唐英唐
+[01:46.50]怀揣梦想启航
+[01:50.22]越过高山跨过海洋
+[01:54.62]来路不及回望
+[01:58.41]奉献是我们的信仰...
+[02:06.92]孤独时相互守望
+[02:10.90]风雨中一起成长
+[02:14.99]只要挑起责任
+[02:18.68]定能铸就辉煌
+[02:23.07]自强不息坚定地追逐梦想
+[02:31.22]厚德载物诚信是我们的干粮
+[02:39.13]开拓创新英唐智慧要让全球共享
+[02:47.35]携手共进挥洒汗水铸就强大英唐
+[02:55.27]
+[02:56.14]人人都贡献力量
+[03:00.18]让世界为我们的精彩鼓掌...
+[03:06.92]

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

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

+ 17 - 0
app_modular/appmusic/src/test/java/com/usoftchina/music/ExampleUnitTest.java

@@ -0,0 +1,17 @@
+package com.usoftchina.music;
+
+import org.junit.Test;
+
+import static org.junit.Assert.*;
+
+/**
+ * Example local unit test, which will execute on the development machine (host).
+ *
+ * @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
+ */
+public class ExampleUnitTest {
+    @Test
+    public void addition_isCorrect() throws Exception {
+        assertEquals(4, 2 + 2);
+    }
+}

+ 2 - 2
settings.gradle

@@ -17,7 +17,7 @@ include ':appworks'
 include ':appmoments'
 include ':apptasks'
 include ':apputils'
-
+include  ':appmusic'
 //第三库模块
 
 include ':lib-zxing'
@@ -49,7 +49,7 @@ project(':appbooking').projectDir = new File('app_modular/appbooking')
 project(':appmoments').projectDir = new File('app_modular/appmoments')
 project(':apptasks').projectDir = new File('app_modular/apptasks')
 project(':apputils').projectDir = new File('app_modular/apputils')
-
+project(':appmusic').projectDir = new File('app_modular/appmusic')
 //第三库模块
 
 project(':lib-zxing').projectDir = new File('app_third/lib-zxing')