mirror of
https://framagit.org/tom79/fedilab-tube
synced 2025-02-08 08:08:49 +01:00
Release 1.7.0
This commit is contained in:
parent
ea2cf58e5f
commit
73cd48b94a
@ -11,8 +11,8 @@ android {
|
||||
|
||||
minSdkVersion 21
|
||||
targetSdkVersion 30
|
||||
versionCode 24
|
||||
versionName "1.6.0"
|
||||
versionCode 25
|
||||
versionName "1.7.0"
|
||||
multiDexEnabled true
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
|
@ -61,6 +61,7 @@ import androidx.annotation.RequiresApi;
|
||||
import androidx.appcompat.app.AlertDialog;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.appcompat.widget.PopupMenu;
|
||||
import androidx.constraintlayout.widget.ConstraintLayout;
|
||||
import androidx.core.app.ActivityCompat;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import androidx.core.graphics.drawable.DrawableCompat;
|
||||
@ -180,6 +181,7 @@ public class PeertubeActivity extends AppCompatActivity implements CommentListAd
|
||||
private TorrentStream torrentStream;
|
||||
private String show_more_content;
|
||||
private videoOrientation videoOrientationType;
|
||||
private int initialOrientation;
|
||||
|
||||
public static void hideKeyboard(Activity activity) {
|
||||
if (activity != null && activity.getWindow() != null) {
|
||||
@ -252,7 +254,7 @@ public class PeertubeActivity extends AppCompatActivity implements CommentListAd
|
||||
|
||||
torrentStream = TorrentStream.init(torrentOptions);
|
||||
torrentStream.addListener(PeertubeActivity.this);
|
||||
|
||||
initialOrientation = getResources().getConfiguration().orientation;
|
||||
if (Helper.isTablet(PeertubeActivity.this)) {
|
||||
|
||||
LinearLayout.LayoutParams param = new LinearLayout.LayoutParams(
|
||||
@ -261,6 +263,15 @@ public class PeertubeActivity extends AppCompatActivity implements CommentListAd
|
||||
2.0f
|
||||
);
|
||||
binding.videoContainer.setLayoutParams(param);
|
||||
} else {
|
||||
if (initialOrientation == Configuration.ORIENTATION_LANDSCAPE) {
|
||||
LinearLayout.LayoutParams param = new LinearLayout.LayoutParams(
|
||||
ConstraintLayout.LayoutParams.MATCH_PARENT,
|
||||
0,
|
||||
3.0f
|
||||
);
|
||||
binding.videoContainer.setLayoutParams(param);
|
||||
}
|
||||
}
|
||||
isPlayInMinimized = false;
|
||||
if (getSupportActionBar() != null)
|
||||
@ -1053,16 +1064,33 @@ public class PeertubeActivity extends AppCompatActivity implements CommentListAd
|
||||
@Override
|
||||
public void onConfigurationChanged(@NotNull Configuration newConfig) {
|
||||
super.onConfigurationChanged(newConfig);
|
||||
|
||||
if (newConfig.orientation == Configuration.ORIENTATION_LANDSCAPE) {
|
||||
if (mode != Helper.VIDEO_MODE_WEBVIEW) {
|
||||
openFullscreenDialog();
|
||||
}
|
||||
setFullscreen(FullScreenMediaController.fullscreen.ON);
|
||||
if (initialOrientation == Configuration.ORIENTATION_LANDSCAPE) {
|
||||
LinearLayout.LayoutParams param = new LinearLayout.LayoutParams(
|
||||
ConstraintLayout.LayoutParams.MATCH_PARENT,
|
||||
0,
|
||||
3.0f
|
||||
);
|
||||
binding.videoContainer.setLayoutParams(param);
|
||||
}
|
||||
} else if (newConfig.orientation == Configuration.ORIENTATION_PORTRAIT) {
|
||||
if (mode != Helper.VIDEO_MODE_WEBVIEW) {
|
||||
closeFullscreenDialog();
|
||||
}
|
||||
setFullscreen(FullScreenMediaController.fullscreen.OFF);
|
||||
if (initialOrientation == Configuration.ORIENTATION_LANDSCAPE) {
|
||||
LinearLayout.LayoutParams param = new LinearLayout.LayoutParams(
|
||||
ConstraintLayout.LayoutParams.MATCH_PARENT,
|
||||
0,
|
||||
1.0f
|
||||
);
|
||||
binding.videoContainer.setLayoutParams(param);
|
||||
}
|
||||
}
|
||||
change();
|
||||
}
|
||||
@ -1242,9 +1270,13 @@ public class PeertubeActivity extends AppCompatActivity implements CommentListAd
|
||||
}
|
||||
if (fullScreenMode) {
|
||||
closeFullscreenDialog();
|
||||
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
|
||||
Handler handler = new Handler();
|
||||
handler.postDelayed(() -> setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR), 2000);
|
||||
if (!Helper.isTablet(PeertubeActivity.this) && initialOrientation != Configuration.ORIENTATION_LANDSCAPE) {
|
||||
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
|
||||
Handler handler = new Handler();
|
||||
handler.postDelayed(() -> setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR), 2000);
|
||||
} else {
|
||||
binding.peertubeInformationContainer.setVisibility(View.VISIBLE);
|
||||
}
|
||||
}
|
||||
super.onBackPressed();
|
||||
}
|
||||
|
10
app/src/main/res/drawable/ic_baseline_close_24.xml
Normal file
10
app/src/main/res/drawable/ic_baseline_close_24.xml
Normal file
@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:tint="?attr/colorControlNormal"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M19,6.41L17.59,5 12,10.59 6.41,5 5,6.41 10.59,12 5,17.59 6.41,19 12,13.41 17.59,19 19,17.59 13.41,12z" />
|
||||
</vector>
|
@ -87,6 +87,7 @@
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:id="@+id/bottom_video"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="2"
|
||||
android:layout_marginStart="@dimen/video_comment_margin"
|
||||
@ -296,13 +297,14 @@
|
||||
android:divider="?android:dividerHorizontal"
|
||||
android:orientation="vertical"
|
||||
android:showDividers="end">
|
||||
|
||||
<ImageView
|
||||
android:layout_gravity="end|center_vertical"
|
||||
android:id="@+id/close_reply"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:contentDescription="@string/close"
|
||||
android:src="@drawable/ic_close_black_48dp"/>
|
||||
android:src="@drawable/ic_baseline_close_24" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
@ -334,6 +336,7 @@
|
||||
android:divider="?android:dividerHorizontal"
|
||||
android:orientation="vertical"
|
||||
android:showDividers="end">
|
||||
|
||||
<ImageView
|
||||
android:layout_margin="5dp"
|
||||
android:layout_gravity="end|center_vertical"
|
||||
@ -341,7 +344,7 @@
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:contentDescription="@string/close"
|
||||
android:src="@drawable/ic_close_black_48dp"/>
|
||||
android:src="@drawable/ic_baseline_close_24" />
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/reply_content"
|
||||
android:visibility="gone"
|
||||
|
Loading…
x
Reference in New Issue
Block a user