Skip to content
This repository has been archived by the owner on Jan 4, 2021. It is now read-only.

Commit

Permalink
recycler: clearly distinguish between card and list recyclers
Browse files Browse the repository at this point in the history
  • Loading branch information
LalitMaganti committed Apr 23, 2015
1 parent 0f0ead3 commit 1ac13c0
Show file tree
Hide file tree
Showing 10 changed files with 47 additions and 43 deletions.
17 changes: 17 additions & 0 deletions android/src/main/res/layout/card_tile_refresh_recycler.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<com.xda.one.ui.widget.XDARefreshLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/swipe_refresh_layout"
android:layout_width="match_parent"
android:layout_height="match_parent">

<android.support.v7.widget.RecyclerView
android:id="@android:id/list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/main_xda_background_color"
android:clipToPadding="false"
android:paddingBottom="8dp"
android:paddingTop="8dp"
android:scrollbarStyle="outsideOverlay"
android:visibility="gone" />
</com.xda.one.ui.widget.XDARefreshLayout>
2 changes: 1 addition & 1 deletion android/src/main/res/layout/forum_fragment.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
android:orientation="vertical"
tools:context=".ui.MainActivity">

<include layout="@layout/recycler_inside_refresh" />
<include layout="@layout/list_refresh_recycler" />

<include
android:id="@android:id/empty"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<com.xda.one.ui.widget.XDARefreshLayout
<com.xda.one.ui.widget.XDARefreshLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/swipe_refresh_layout"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">

<android.support.v7.widget.RecyclerView
android:id="@android:id/list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/main_xda_backgroud_color"
android:background="@android:color/white"
android:clipToPadding="false"
android:paddingBottom="8dp"
android:paddingTop="8dp"
android:scrollbarStyle="outsideOverlay"
android:visibility="gone" />

</com.xda.one.ui.widget.XDARefreshLayout>
2 changes: 1 addition & 1 deletion android/src/main/res/layout/message_fragment.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
android:orientation="vertical"
tools:context=".ui.MainActivity">

<include layout="@layout/recycler_inside_refresh" />
<include layout="@layout/list_refresh_recycler" />

<include
android:id="@android:id/empty"
Expand Down
2 changes: 1 addition & 1 deletion android/src/main/res/layout/news_fragment.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
android:layout_marginTop="?android:attr/actionBarSize"
tools:context=".ui.MainActivity">

<include layout="@layout/recycler_inside_refresh" />
<include layout="@layout/card_tile_refresh_recycler" />

<include
android:id="@android:id/empty"
Expand Down
34 changes: 17 additions & 17 deletions android/src/main/res/layout/news_list_item.xml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:pkg="http://schemas.android.com/apk/res-auto"
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:pkg="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent">

<android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="5dp"
android:layout_marginTop="5dp"
android:layout_marginLeft="8dp"
android:layout_marginRight="8dp"
android:layout_marginTop="5dp"
android:foreground="?android:attr/selectableItemBackground"
pkg:cardBackgroundColor="@android:color/white"
pkg:cardCornerRadius="2dp"
Expand All @@ -27,37 +27,37 @@
android:id="@+id/avatar"
android:layout_width="fill_parent"
android:layout_height="160dp"
android:scaleType="fitXY"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:src="@drawable/ic_image_placeholder"/>
android:layout_alignParentTop="true"
android:scaleType="fitXY"
android:src="@drawable/ic_image_placeholder" />

<RelativeLayout
android:id="@+id/news_content_holder"
android:layout_width="wrap_content"
android:layout_below="@+id/avatar"
android:padding="8dp"
android:layout_height="wrap_content">
<RelativeLayout
android:id="@+id/news_content_holder"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/avatar"
android:padding="8dp">

<TextView
android:id="@+id/news_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:maxLines="2"
android:minLines="2"
android:singleLine="true"
android:text="@string/xda_news"
android:textSize="14sp"
android:textStyle="bold"
android:maxLines="2"
android:minLines="2"/>
android:textStyle="bold" />

<TextView
android:id="@+id/news_content"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:maxLines="2"
android:ellipsize="end"
android:visibility="gone"/>
android:maxLines="2"
android:visibility="gone" />

</RelativeLayout>
</RelativeLayout>
Expand Down
2 changes: 1 addition & 1 deletion android/src/main/res/layout/quote_mention_fragment.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent">

<include layout="@layout/recycler_inside_refresh" />
<include layout="@layout/list_refresh_recycler" />

<include layout="@layout/default_list_empty_view" />
</RelativeLayout>
17 changes: 1 addition & 16 deletions android/src/main/res/layout/subscribed_forum_fragment.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,7 @@
android:orientation="vertical"
tools:context=".ui.MainActivity">

<com.xda.one.ui.widget.XDARefreshLayout
android:id="@+id/swipe_refresh_layout"
android:layout_width="match_parent"
android:layout_height="match_parent">

<android.support.v7.widget.RecyclerView
android:id="@android:id/list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/white"
android:clipToPadding="false"
android:paddingBottom="8dp"
android:paddingTop="8dp"
android:scrollbarStyle="outsideOverlay"
android:visibility="gone" />
</com.xda.one.ui.widget.XDARefreshLayout>
<include layout="@layout/list_refresh_recycler" />

<include
android:id="@android:id/empty"
Expand Down
2 changes: 1 addition & 1 deletion android/src/main/res/layout/thread_fragment.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
android:layout_marginTop="?android:attr/actionBarSize"
android:orientation="vertical">

<include layout="@layout/recycler_inside_refresh" />
<include layout="@layout/card_tile_refresh_recycler" />

<include
android:id="@android:id/empty"
Expand Down
2 changes: 1 addition & 1 deletion android/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

<!-- Custom/XDA colours -->
<color name="main_xda_color">#EC9E08</color>
<color name="main_xda_backgroud_color">#EAEAEA</color>
<color name="main_xda_background_color">#EAEAEA</color>

<color name="custom_accent_green">#12911D</color>

Expand Down

0 comments on commit 1ac13c0

Please sign in to comment.