properly fix missing cardview padding on 5.0, duh
This commit is contained in:
parent
876b31b410
commit
25622e2761
@ -329,14 +329,6 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener,
|
|||||||
|
|
||||||
ListView list = (ListView)view.findViewById(R.id.headlines_list);
|
ListView list = (ListView)view.findViewById(R.id.headlines_list);
|
||||||
|
|
||||||
// thanks google
|
|
||||||
if (android.os.Build.VERSION.SDK_INT <= android.os.Build.VERSION_CODES.KITKAT) {
|
|
||||||
list.setDividerHeight(0);
|
|
||||||
|
|
||||||
int px = m_activity.dpToPx(4);
|
|
||||||
list.setPadding(px, px, px, px);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (m_prefs.getBoolean("headlines_mark_read_scroll", false)) {
|
if (m_prefs.getBoolean("headlines_mark_read_scroll", false)) {
|
||||||
WindowManager wm = (WindowManager) m_activity.getSystemService(Context.WINDOW_SERVICE);
|
WindowManager wm = (WindowManager) m_activity.getSystemService(Context.WINDOW_SERVICE);
|
||||||
Display display = wm.getDefaultDisplay();
|
Display display = wm.getDefaultDisplay();
|
||||||
|
@ -307,14 +307,6 @@ public class OfflineHeadlinesFragment extends Fragment implements OnItemClickLis
|
|||||||
|
|
||||||
ListView list = (ListView)view.findViewById(R.id.headlines_list);
|
ListView list = (ListView)view.findViewById(R.id.headlines_list);
|
||||||
|
|
||||||
// thanks google
|
|
||||||
if (android.os.Build.VERSION.SDK_INT <= android.os.Build.VERSION_CODES.KITKAT) {
|
|
||||||
list.setDividerHeight(0);
|
|
||||||
|
|
||||||
int px = m_activity.dpToPx(4);
|
|
||||||
list.setPadding(px, px, px, px);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (m_prefs.getBoolean("headlines_mark_read_scroll", false)) {
|
if (m_prefs.getBoolean("headlines_mark_read_scroll", false)) {
|
||||||
WindowManager wm = (WindowManager) m_activity.getSystemService(Context.WINDOW_SERVICE);
|
WindowManager wm = (WindowManager) m_activity.getSystemService(Context.WINDOW_SERVICE);
|
||||||
Display display = wm.getDefaultDisplay();
|
Display display = wm.getDefaultDisplay();
|
||||||
|
@ -10,12 +10,12 @@
|
|||||||
android:layout_height="match_parent" >
|
android:layout_height="match_parent" >
|
||||||
|
|
||||||
<ListView
|
<ListView
|
||||||
android:padding="8dp"
|
android:padding="4dp"
|
||||||
android:id="@+id/headlines_list"
|
android:id="@+id/headlines_list"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layoutAnimation="@anim/layout_headline"
|
android:layoutAnimation="@anim/layout_headline"
|
||||||
android:dividerHeight="8dp"
|
android:dividerHeight="0dp"
|
||||||
android:divider="@android:color/transparent"
|
android:divider="@null"
|
||||||
android:layout_height="match_parent" >
|
android:layout_height="match_parent" >
|
||||||
</ListView>
|
</ListView>
|
||||||
</android.support.v4.widget.SwipeRefreshLayout>
|
</android.support.v4.widget.SwipeRefreshLayout>
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
card_view:cardElevation="2dp"
|
card_view:cardElevation="2dp"
|
||||||
|
card_view:cardUseCompatPadding="true"
|
||||||
card_view:cardBackgroundColor="?headlineNormalBackground"
|
card_view:cardBackgroundColor="?headlineNormalBackground"
|
||||||
tools:ignore="HardcodedText" >
|
tools:ignore="HardcodedText" >
|
||||||
|
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
card_view:cardElevation="2dp"
|
card_view:cardElevation="2dp"
|
||||||
|
card_view:cardUseCompatPadding="true"
|
||||||
card_view:cardBackgroundColor="?headlineSelectedBackground"
|
card_view:cardBackgroundColor="?headlineSelectedBackground"
|
||||||
tools:ignore="HardcodedText" >
|
tools:ignore="HardcodedText" >
|
||||||
|
|
||||||
|
@ -6,7 +6,8 @@
|
|||||||
android:id="@+id/headlines_row"
|
android:id="@+id/headlines_row"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
card_view:cardElevation="2dp"
|
card_view:cardElevation="4dp"
|
||||||
|
card_view:cardUseCompatPadding="true"
|
||||||
card_view:cardBackgroundColor="?headlineSelectedBackground"
|
card_view:cardBackgroundColor="?headlineSelectedBackground"
|
||||||
tools:ignore="HardcodedText" >
|
tools:ignore="HardcodedText" >
|
||||||
|
|
||||||
|
@ -6,7 +6,8 @@
|
|||||||
android:id="@+id/headlines_row"
|
android:id="@+id/headlines_row"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
card_view:cardElevation="2dp"
|
card_view:cardElevation="4dp"
|
||||||
|
card_view:cardUseCompatPadding="true"
|
||||||
card_view:cardBackgroundColor="?headlineUnreadBackground"
|
card_view:cardBackgroundColor="?headlineUnreadBackground"
|
||||||
tools:ignore="HardcodedText" >
|
tools:ignore="HardcodedText" >
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user