mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 20:33:53 +01:00
Add minimal detail view as a fragment
This commit is contained in:
parent
de39502292
commit
0cb11284ff
7 changed files with 238 additions and 7 deletions
|
|
@ -1,16 +1,15 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal"
|
||||
android:id="@+id/contributionsFragmentContainer"
|
||||
>
|
||||
<fragment
|
||||
android:name="org.wikimedia.commons.contributions.ContributionsListFragment"
|
||||
android:id="@+id/contributionsListFragment"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
</FrameLayout>
|
||||
42
commons/res/layout/fragment_media_detail.xml
Normal file
42
commons/res/layout/fragment_media_detail.xml
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:background="@android:color/background_dark"
|
||||
>
|
||||
|
||||
<ImageView android:id="@+id/mediaDetailImage"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:scaleType="fitCenter"
|
||||
/>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center|bottom"
|
||||
android:background="#AA000000"
|
||||
android:padding="8dp"
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/mediaDetailTitle"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#FFFFFFFF"
|
||||
style="?android:textAppearanceMedium"
|
||||
android:typeface="serif" />
|
||||
<!-- <TextView
|
||||
android:id="@+id/mediaDetailDescription"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/mediaDetailTitle"
|
||||
android:layout_alignParentBottom="true"
|
||||
style="?android:textAppearanceSmall"
|
||||
android:textColor="#FFFFFFFF"
|
||||
/> -->
|
||||
</RelativeLayout>
|
||||
|
||||
</FrameLayout>
|
||||
16
commons/res/layout/fragment_media_detail_pager.xml
Normal file
16
commons/res/layout/fragment_media_detail_pager.xml
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
<android.support.v4.view.ViewPager
|
||||
android:id="@+id/mediaDetailsPager"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:fadingEdge="none"
|
||||
>
|
||||
|
||||
</android.support.v4.view.ViewPager>
|
||||
|
||||
</LinearLayout>
|
||||
Loading…
Add table
Add a link
Reference in a new issue