sync
This commit is contained in:
parent
62a6ac9078
commit
0cad3bce68
|
@ -53,6 +53,7 @@ public class CoverFragment extends Fragment {
|
|||
private int displayedChapterIndex = -2;
|
||||
private Playable media;
|
||||
private int orientation = Configuration.ORIENTATION_UNDEFINED;
|
||||
private int _position = -1;
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||
|
@ -142,6 +143,7 @@ public class CoverFragment extends Fragment {
|
|||
}
|
||||
|
||||
private void displayCoverImage(int position) {
|
||||
_position = position;
|
||||
int chapter = ChapterUtils.getCurrentChapterIndex(media, position);
|
||||
if (chapter != displayedChapterIndex) {
|
||||
displayedChapterIndex = chapter;
|
||||
|
@ -192,6 +194,9 @@ public class CoverFragment extends Fragment {
|
|||
mainContainer.setOrientation(LinearLayout.HORIZONTAL);
|
||||
params.weight = 1;
|
||||
}
|
||||
if (_position > -1) {
|
||||
displayCoverImage(_position);
|
||||
}
|
||||
textContainer.setLayoutParams(params);
|
||||
}
|
||||
|
||||
|
|
|
@ -5,23 +5,23 @@
|
|||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:orientation="horizontal"
|
||||
android:id="@+id/cover_fragment"
|
||||
android:padding="8dp"
|
||||
android:gravity="center">
|
||||
|
||||
<de.danoeh.antennapod.view.SquareImageView
|
||||
android:id="@+id/imgvCover"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:scaleType="fitCenter"
|
||||
android:layout_marginLeft="32dp"
|
||||
android:layout_marginRight="32dp"
|
||||
tools:src="@android:drawable/sym_def_app_icon"
|
||||
android:layout_weight="0"
|
||||
android:foreground="?attr/selectableItemBackgroundBorderless"
|
||||
android:importantForAccessibility="no"
|
||||
squareImageView:direction="minimum" />
|
||||
android:scaleType="fitCenter"
|
||||
squareImageView:direction="height"
|
||||
tools:src="@android:drawable/sym_def_app_icon" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/cover_fragment_text_container"
|
||||
|
|
Loading…
Reference in New Issue