FailedToRead 11 ヶ月 前
コミット
4b98e54923

+ 2 - 0
.idea/gradle.xml

@@ -7,6 +7,8 @@
         <option name="testRunner" value="GRADLE" />
         <option name="distributionType" value="DEFAULT_WRAPPED" />
         <option name="externalProjectPath" value="$PROJECT_DIR$" />
+        <option name="gradleHome" value="$USER_HOME$/.gradle/wrapper/dists/gradle-7.4-bin/c0gwcg53nkjbqw7r0h0umtfvt/gradle-7.4" />
+        <option name="gradleJvm" value="Android Studio default JDK" />
         <option name="modules">
           <set>
             <option value="$PROJECT_DIR$" />

+ 1 - 1
app-base/src/main/java/com/edufound/base/BaseApplication.java

@@ -127,7 +127,7 @@ public class BaseApplication implements ModuleMediator.ModuleInitial {
                     application.startActivity(intent);
                 }
             }
-
+    
             @RequiresApi(api = Build.VERSION_CODES.N)
             @Override
             protected void onMayBeBlackScreen(Throwable e) {

+ 0 - 7
app-video/src/main/java/com/edufound/video/VideoActivity.java

@@ -49,13 +49,6 @@ public class VideoActivity extends BaseMvpActivity<VideoModel, VideoActivityView
     @Override
     public void initView() {
         mVideoPlayer = findViewById(R.id.activity_video_player);
-        Button btn = findViewById(R.id.testbtn);
-        addUiClickListener(btn, new View.OnClickListener() {
-            @Override
-            public void onClick(View v) {
-                Toaster.showShort("3333");
-            }
-        });
         mPresenter.getVideoData();
     }
 

+ 4 - 6
app-video/src/main/java/com/edufound/video/listener/MobileVideoOnGestureListener.java

@@ -121,9 +121,9 @@ public class MobileVideoOnGestureListener extends GestureDetector.SimpleOnGestur
             index = 0;
         }
         volume = index;
-        listenerCallBack.changeVolume(volume);
         // 改变音量
-        audioManager.setStreamVolume(AudioManager.STREAM_MUSIC, index, 0);
+//        listenerCallBack.changeVolume(volume);
+//        audioManager.setStreamVolume(AudioManager.STREAM_MUSIC, index, 0);
     }
 
     /**
@@ -150,10 +150,8 @@ public class MobileVideoOnGestureListener extends GestureDetector.SimpleOnGestur
         } else if (lpa.screenBrightness < 0.01f) {
             lpa.screenBrightness = 0.01f;
         }
-        Logger.e("brightness:" + brightness);
-        Logger.e(" lpa.screenBrightness :" + lpa.screenBrightness);
-        listenerCallBack.changeBrightness(lpa.screenBrightness);
-        mView.getBaseActivity().getWindow().setAttributes(lpa);
+//        listenerCallBack.changeBrightness(lpa.screenBrightness);
+//        mView.getBaseActivity().getWindow().setAttributes(lpa);
     }
 
     /**

+ 10 - 2
app-video/src/main/java/com/edufound/video/presenter/VideoPresenter.java

@@ -43,8 +43,9 @@ public class VideoPresenter extends BasePresenter<VideoModel, VideoActivityView>
 
     VideoData mVideoData;
     FrameLayout videoController;
+    ImageView mControllerTopBack;
     FrameLayout mControllerCenter;
-    FrameLayout mControllerTop;
+    LinearLayout mControllerTop;
     LinearLayout mControllerBottom;
     ImageView mPosterImage;
     TextView mTextTitle;
@@ -79,8 +80,9 @@ public class VideoPresenter extends BasePresenter<VideoModel, VideoActivityView>
     private void setVideoController() {
         LayoutInflater layoutInflater = LayoutInflater.from(getView().getBaseActivity());
         videoController = (FrameLayout) layoutInflater.inflate(R.layout.video_controller, null);
-        mControllerCenter = videoController.findViewById(R.id.video_controller_center);
         mControllerTop = videoController.findViewById(R.id.video_controller_top);
+        mControllerTopBack = videoController.findViewById(R.id.video_controller_top_back);
+        mControllerCenter = videoController.findViewById(R.id.video_controller_center);
         mControllerBottom = videoController.findViewById(R.id.video_controller_bottom);
         mPosterImage = videoController.findViewById(R.id.video_controller_poster);
         mTextTitle = videoController.findViewById(R.id.video_controller_title);
@@ -98,6 +100,12 @@ public class VideoPresenter extends BasePresenter<VideoModel, VideoActivityView>
 
 
     private void initListener() {
+        mControllerTopBack.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                getView().getBaseActivity().finish();
+            }
+        });
         mStatusBtnImg.setOnClickListener(new View.OnClickListener() {
             @Override
             public void onClick(View view) {

+ 0 - 6
app-video/src/main/res/layout/activity_video.xml

@@ -14,10 +14,4 @@
         android:layout_height="match_parent"></com.edufound.video.ijkplayer.media.IjkVideoView>
 
 
-    <Button
-        android:id="@+id/testbtn"
-        android:layout_width="200dp"
-        android:layout_height="200dp"
-        android:layout_gravity="center"></Button>
-
 </FrameLayout>

+ 14 - 3
app-video/src/main/res/layout/video_controller.xml

@@ -21,23 +21,34 @@
         android:layout_height="match_parent"
         android:background="@drawable/videopower"></ImageView>
 
-    <FrameLayout
+    <LinearLayout
         android:id="@+id/video_controller_top"
         android:layout_width="match_parent"
         android:layout_height="80dp"
         android:layout_gravity="top"
         android:background="@color/translucent_background">
 
+
+        <ImageView
+            android:id="@+id/video_controller_top_back"
+            android:layout_width="40dp"
+            android:layout_height="40dp"
+            android:layout_gravity="center|left"
+            android:layout_marginLeft="30dp"
+            android:background="@color/red"></ImageView>
+
+
         <TextView
             android:id="@+id/video_controller_title"
             android:layout_width="match_parent"
             android:layout_height="match_parent"
+            android:layout_marginLeft="10dp"
             android:gravity="center|left"
-            android:paddingLeft="30dp"
+            android:paddingLeft="20dp"
             android:text="test1"
             android:textColor="@color/white"
             android:textSize="25dp"></TextView>
-    </FrameLayout>
+    </LinearLayout>
 
     <LinearLayout
         android:id="@+id/video_controller_bottom"

+ 1 - 0
app/build.gradle

@@ -330,6 +330,7 @@ dependencies {
     androidTestImplementation testLibs.get('junitAndroid')
     androidTestImplementation testLibs.get('espresso')
 
+
     if (isRelease) {
         api project(':app-pay')
         api project(':app-video')

+ 1 - 0
settings.gradle

@@ -5,6 +5,7 @@ pluginManagement {
         jcenter()
         mavenCentral()
         maven { url 'https://jitpack.io' }
+
     }
 }
 dependencyResolutionManagement {