Updated player screen appearance
This commit is contained in:
parent
25fbff6afd
commit
0485102797
|
@ -211,12 +211,6 @@ public abstract class MediaplayerInfoActivity extends MediaplayerActivity implem
|
|||
setSupportActionBar(toolbar);
|
||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
getSupportActionBar().setTitle("");
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||
findViewById(R.id.shadow).setVisibility(View.GONE);
|
||||
AppBarLayout appBarLayout = findViewById(R.id.appBar);
|
||||
float px = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 4, getResources().getDisplayMetrics());
|
||||
appBarLayout.setElevation(px);
|
||||
}
|
||||
drawerLayout = findViewById(R.id.drawer_layout);
|
||||
navList = findViewById(R.id.nav_list);
|
||||
navDrawer = findViewById(R.id.nav_layout);
|
||||
|
|
|
@ -12,6 +12,8 @@ import android.widget.TextView;
|
|||
|
||||
import com.bumptech.glide.Glide;
|
||||
|
||||
import com.bumptech.glide.load.resource.bitmap.FitCenter;
|
||||
import com.bumptech.glide.load.resource.bitmap.RoundedCorners;
|
||||
import com.bumptech.glide.request.RequestOptions;
|
||||
import de.danoeh.antennapod.R;
|
||||
import de.danoeh.antennapod.core.glide.ApGlideSettings;
|
||||
|
@ -75,7 +77,8 @@ public class CoverFragment extends Fragment {
|
|||
.apply(new RequestOptions()
|
||||
.diskCacheStrategy(ApGlideSettings.AP_DISK_CACHE_STRATEGY)
|
||||
.dontAnimate()
|
||||
.fitCenter())
|
||||
.transforms(new FitCenter(),
|
||||
new RoundedCorners((int) (16 * getResources().getDisplayMetrics().density))))
|
||||
.into(imgvCover);
|
||||
}
|
||||
|
||||
|
|
|
@ -25,9 +25,8 @@ public class SquareImageView extends AppCompatImageView {
|
|||
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
|
||||
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
|
||||
|
||||
int width = getMeasuredWidth();
|
||||
//noinspection SuspiciousNameCombination
|
||||
setMeasuredDimension(width, width);
|
||||
int size = Math.min(getMeasuredWidth(), getMeasuredHeight());
|
||||
setMeasuredDimension(size, size);
|
||||
}
|
||||
|
||||
}
|
|
@ -4,36 +4,38 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:padding="8dp">
|
||||
android:padding="8dp"
|
||||
android:gravity="center">
|
||||
|
||||
<de.danoeh.antennapod.view.SquareImageView
|
||||
android:id="@+id/imgvCover"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:contentDescription="@string/cover_label"
|
||||
android:scaleType="fitCenter"
|
||||
android:layout_marginLeft="32dp"
|
||||
android:layout_marginRight="32dp"
|
||||
android:transitionName="coverTransition"
|
||||
tools:src="@android:drawable/sym_def_app_icon"
|
||||
android:foreground="?attr/selectableItemBackgroundBorderless"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txtvPodcastTitle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0.25"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center"
|
||||
android:maxLines="2"
|
||||
android:layout_marginTop="16dp"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
android:textIsSelectable="true"
|
||||
tools:text="Podcast" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imgvCover"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0.5"
|
||||
android:contentDescription="@string/cover_label"
|
||||
android:scaleType="fitCenter"
|
||||
android:transitionName="coverTransition"
|
||||
tools:src="@android:drawable/sym_def_app_icon"
|
||||
android:foreground="?attr/selectableItemBackground" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txtvEpisodeTitle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0.25"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center"
|
||||
android:maxLines="2"
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.drawerlayout.widget.DrawerLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<androidx.drawerlayout.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/drawer_layout"
|
||||
|
@ -33,71 +32,72 @@
|
|||
android:layout_marginTop="-12dp"
|
||||
android:paddingBottom="4dp"
|
||||
android:layout_gravity="center"
|
||||
android:background="@android:color/transparent"/>
|
||||
android:background="@android:color/transparent" />
|
||||
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
<androidx.viewpager.widget.ViewPager
|
||||
android:id="@+id/pager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_above="@id/playtime_layout"
|
||||
android:layout_below="@id/appBar"
|
||||
android:foreground="?android:windowContentOverlay"
|
||||
tools:background="@android:color/holo_orange_light"
|
||||
android:layout_marginBottom="12dp" />
|
||||
|
||||
<SeekBar
|
||||
android:id="@+id/sbPosition"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="24dp"
|
||||
android:max="500"
|
||||
tools:progress="100"
|
||||
android:layout_above="@id/playtime_layout"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:layoutDirection="ltr"
|
||||
tools:background="@android:color/holo_green_dark" />
|
||||
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/playtime_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="8dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:background="?attr/overlay_drawable"
|
||||
android:layoutDirection="ltr"
|
||||
android:orientation="vertical">
|
||||
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingLeft="8dp"
|
||||
android:paddingRight="8dp"
|
||||
android:layout_marginBottom="16dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txtvPosition"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="@dimen/scrubber_vertical_padding"
|
||||
android:paddingBottom="@dimen/scrubber_vertical_padding">
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:text="@string/position_default_label"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
android:textSize="@dimen/text_size_micro"
|
||||
tools:background="@android:color/holo_green_dark" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txtvPosition"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:text="@string/position_default_label"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
android:textSize="@dimen/text_size_micro"
|
||||
tools:background="@android:color/holo_green_dark"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txtvLength"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginRight="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:text="@string/position_default_label"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
android:textSize="@dimen/text_size_micro"
|
||||
tools:background="@android:color/holo_green_dark"/>
|
||||
|
||||
<SeekBar
|
||||
android:id="@+id/sbPosition"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_toLeftOf="@id/txtvLength"
|
||||
android:layout_toStartOf="@id/txtvLength"
|
||||
android:layout_toRightOf="@id/txtvPosition"
|
||||
android:layout_toEndOf="@id/txtvPosition"
|
||||
android:max="500"
|
||||
tools:background="@android:color/holo_green_dark"/>
|
||||
android:id="@+id/txtvLength"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginRight="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:text="@string/position_default_label"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
android:textSize="@dimen/text_size_micro"
|
||||
tools:background="@android:color/holo_green_dark" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
@ -105,9 +105,7 @@
|
|||
android:id="@+id/player_control"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="4dp"
|
||||
android:paddingBottom="8dp"
|
||||
android:background="?attr/overlay_background"
|
||||
android:layout_marginBottom="16dp"
|
||||
tools:background="@android:color/holo_purple">
|
||||
|
||||
<ImageButton
|
||||
|
@ -155,7 +153,7 @@
|
|||
android:text="30"
|
||||
android:textSize="12sp"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
android:clickable="false"/>
|
||||
android:clickable="false" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/butPlaybackSpeed"
|
||||
|
@ -185,7 +183,7 @@
|
|||
android:text="1.00"
|
||||
android:textSize="12sp"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
android:clickable="false"/>
|
||||
android:clickable="false" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/butCastDisconnect"
|
||||
|
@ -231,7 +229,7 @@
|
|||
android:text="30"
|
||||
android:textSize="12sp"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
android:clickable="false"/>
|
||||
android:clickable="false" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/butSkip"
|
||||
|
@ -249,23 +247,6 @@
|
|||
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.viewpager.widget.ViewPager
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/pager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_above="@id/playtime_layout"
|
||||
android:layout_below="@id/appBar"
|
||||
android:foreground="?android:windowContentOverlay"
|
||||
tools:background="@android:color/holo_orange_light" />
|
||||
|
||||
<View
|
||||
android:id="@+id/shadow"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="4dp"
|
||||
android:layout_below="@id/appBar"
|
||||
android:background="@drawable/shadow" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<include layout="@layout/nav_list" />
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<dimen name="scrubber_vertical_padding">12dp</dimen>
|
||||
</resources>
|
|
@ -37,6 +37,4 @@
|
|||
<dimen name="media_router_controller_playback_control_start_padding">24dp</dimen>
|
||||
<dimen name="media_router_controller_bottom_margin">8dp</dimen>
|
||||
|
||||
<dimen name="scrubber_vertical_padding">0dp</dimen>
|
||||
|
||||
</resources>
|
||||
|
|
Loading…
Reference in New Issue