mirror of
https://github.com/AntennaPod/AntennaPod.git
synced 2025-12-01 12:31:45 +00:00
Implemented GridView in FeedlistFragment
This commit is contained in:
13
res/drawable/badge.xml
Normal file
13
res/drawable/badge.xml
Normal file
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle" >
|
||||
|
||||
<solid android:color="@color/bright_blue" />
|
||||
|
||||
<padding
|
||||
android:bottom="5dip"
|
||||
android:left="5dip"
|
||||
android:right="5dip"
|
||||
android:top="5dip" />
|
||||
|
||||
</shape>
|
||||
24
res/layout-large/feedlist.xml
Normal file
24
res/layout-large/feedlist.xml
Normal file
@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<GridView
|
||||
android:id="@+id/grid"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:horizontalSpacing="32dp"
|
||||
android:numColumns="auto_fit"
|
||||
android:verticalSpacing="32dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@id/android:empty"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:layout_gravity="center"
|
||||
android:text="@string/no_feeds_label" />
|
||||
|
||||
</LinearLayout>
|
||||
71
res/layout/feedlist_item_grid.xml
Normal file
71
res/layout/feedlist_item_grid.xml
Normal file
@ -0,0 +1,71 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" >
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imgvFeedimage"
|
||||
android:layout_width="160dip"
|
||||
android:layout_height="160dip"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_margin="8dp"
|
||||
android:cropToPadding="true" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignLeft="@id/imgvFeedimage"
|
||||
android:layout_alignRight="@id/imgvFeedimage"
|
||||
android:layout_below="@id/imgvFeedimage"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txtvFeedname"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:maxLines="2"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txtvLastUpdate"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
android:textColor="@color/gray"
|
||||
android:textStyle="italic" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txtvNumEpisodes"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:textColor="@color/gray" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="25dp"
|
||||
android:layout_alignRight="@id/imgvFeedimage"
|
||||
android:layout_alignTop="@id/imgvFeedimage" >
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txtvNewEps"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/badge"
|
||||
android:gravity="center"
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/white"
|
||||
android:textStyle="bold"
|
||||
android:visibility="gone" />
|
||||
</LinearLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
5
res/values-large/refs.xml
Normal file
5
res/values-large/refs.xml
Normal file
@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<item type="layout" name="feedlist_item">@layout/feedlist_item_grid</item>
|
||||
|
||||
</resources>
|
||||
Reference in New Issue
Block a user