mirror of
https://codeberg.org/tom79/Fedilab.git
synced 2024-12-23 01:00:04 +02:00
This commit is contained in:
parent
640a725495
commit
f51c24dfb2
7 changed files with 61 additions and 9 deletions
|
@ -9,8 +9,8 @@ android {
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
minSdk 21
|
minSdk 21
|
||||||
targetSdk 31
|
targetSdk 31
|
||||||
versionCode 19
|
versionCode 20
|
||||||
versionName "beta-19"
|
versionName "beta-20"
|
||||||
|
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
}
|
}
|
||||||
|
|
|
@ -934,6 +934,11 @@ public class StatusAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>
|
||||||
} else {
|
} else {
|
||||||
layoutMediaBinding.playVideo.setVisibility(View.GONE);
|
layoutMediaBinding.playVideo.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
|
if (statusToDeal.media_attachments.get(0).type != null && statusToDeal.media_attachments.get(0).type.equalsIgnoreCase("audio")) {
|
||||||
|
layoutMediaBinding.playMusic.setVisibility(View.VISIBLE);
|
||||||
|
} else {
|
||||||
|
layoutMediaBinding.playMusic.setVisibility(View.GONE);
|
||||||
|
}
|
||||||
if (!mediaObfuscated(statusToDeal) || expand_media) {
|
if (!mediaObfuscated(statusToDeal) || expand_media) {
|
||||||
layoutMediaBinding.viewHide.setImageResource(R.drawable.ic_baseline_visibility_24);
|
layoutMediaBinding.viewHide.setImageResource(R.drawable.ic_baseline_visibility_24);
|
||||||
Glide.with(layoutMediaBinding.media.getContext())
|
Glide.with(layoutMediaBinding.media.getContext())
|
||||||
|
@ -972,6 +977,11 @@ public class StatusAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>
|
||||||
} else {
|
} else {
|
||||||
layoutMediaBinding.playVideo.setVisibility(View.GONE);
|
layoutMediaBinding.playVideo.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
|
if (attachment.type != null && attachment.type.equalsIgnoreCase("audio")) {
|
||||||
|
layoutMediaBinding.playMusic.setVisibility(View.VISIBLE);
|
||||||
|
} else {
|
||||||
|
layoutMediaBinding.playMusic.setVisibility(View.GONE);
|
||||||
|
}
|
||||||
lp.setMargins(0, 0, (int) Helper.convertDpToPixel(5, context), 0);
|
lp.setMargins(0, 0, (int) Helper.convertDpToPixel(5, context), 0);
|
||||||
if (!mediaObfuscated(statusToDeal) || expand_media) {
|
if (!mediaObfuscated(statusToDeal) || expand_media) {
|
||||||
layoutMediaBinding.viewHide.setImageResource(R.drawable.ic_baseline_visibility_24);
|
layoutMediaBinding.viewHide.setImageResource(R.drawable.ic_baseline_visibility_24);
|
||||||
|
|
10
app/src/main/res/drawable/ic_baseline_audiotrack_128.xml
Normal file
10
app/src/main/res/drawable/ic_baseline_audiotrack_128.xml
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="128dp"
|
||||||
|
android:height="128dp"
|
||||||
|
android:tint="#FFFFFF"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
<path
|
||||||
|
android:fillColor="@android:color/white"
|
||||||
|
android:pathData="M12,3v9.28c-0.47,-0.17 -0.97,-0.28 -1.5,-0.28C8.01,12 6,14.01 6,16.5S8.01,21 10.5,21c2.31,0 4.2,-1.75 4.45,-4H15V6h4V3h-7z" />
|
||||||
|
</vector>
|
10
app/src/main/res/drawable/ic_baseline_audiotrack_24.xml
Normal file
10
app/src/main/res/drawable/ic_baseline_audiotrack_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="#FFFFFF"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
<path
|
||||||
|
android:fillColor="@android:color/white"
|
||||||
|
android:pathData="M12,3v9.28c-0.47,-0.17 -0.97,-0.28 -1.5,-0.28C8.01,12 6,14.01 6,16.5S8.01,21 10.5,21c2.31,0 4.2,-1.75 4.45,-4H15V6h4V3h-7z" />
|
||||||
|
</vector>
|
10
app/src/main/res/drawable/ic_baseline_audiotrack_48.xml
Normal file
10
app/src/main/res/drawable/ic_baseline_audiotrack_48.xml
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="48dp"
|
||||||
|
android:height="48dp"
|
||||||
|
android:tint="#FFFFFF"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
<path
|
||||||
|
android:fillColor="@android:color/white"
|
||||||
|
android:pathData="M12,3v9.28c-0.47,-0.17 -0.97,-0.28 -1.5,-0.28C8.01,12 6,14.01 6,16.5S8.01,21 10.5,21c2.31,0 4.2,-1.75 4.45,-4H15V6h4V3h-7z" />
|
||||||
|
</vector>
|
|
@ -20,6 +20,14 @@
|
||||||
android:src="@drawable/ic_baseline_play_circle_filled_24"
|
android:src="@drawable/ic_baseline_play_circle_filled_24"
|
||||||
android:visibility="gone" />
|
android:visibility="gone" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
|
android:id="@+id/play_music"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_centerInParent="true"
|
||||||
|
android:src="@drawable/ic_baseline_audiotrack_24"
|
||||||
|
android:visibility="gone" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/view_hide"
|
android:id="@+id/view_hide"
|
||||||
android:layout_width="24dp"
|
android:layout_width="24dp"
|
||||||
|
|
|
@ -3,8 +3,18 @@
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="@dimen/nav_header_height"
|
android:layout_height="@dimen/nav_header_height"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:theme="@style/ThemeOverlay.AppCompat.Dark">
|
android:theme="@style/ThemeOverlay.AppCompat.Dark">
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
|
android:id="@+id/background_image"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:minHeight="@dimen/nav_header_height"
|
||||||
|
android:scaleType="centerCrop"
|
||||||
|
tools:src="@tools:sample/backgrounds/scenic" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/header_option_info"
|
android:id="@+id/header_option_info"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
@ -17,13 +27,6 @@
|
||||||
android:src="@drawable/ic_baseline_more_vert_24"
|
android:src="@drawable/ic_baseline_more_vert_24"
|
||||||
app:tint="?iconColor" />
|
app:tint="?iconColor" />
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatImageView
|
|
||||||
android:id="@+id/background_image"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:minHeight="@dimen/nav_header_height"
|
|
||||||
android:scaleType="centerCrop" />
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.LinearLayoutCompat
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="180dp"
|
android:layout_height="180dp"
|
||||||
|
@ -42,6 +45,7 @@
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:contentDescription="@string/profile_picture"
|
android:contentDescription="@string/profile_picture"
|
||||||
android:paddingTop="@dimen/nav_header_vertical_spacing"
|
android:paddingTop="@dimen/nav_header_vertical_spacing"
|
||||||
|
tools:src="@tools:sample/avatars"
|
||||||
android:scaleType="fitCenter" />
|
android:scaleType="fitCenter" />
|
||||||
|
|
||||||
<androidx.appcompat.widget.LinearLayoutCompat
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
|
|
Loading…
Reference in a new issue