tweak compact layout
This commit is contained in:
parent
89823f32f1
commit
57942e84e3
@ -965,7 +965,16 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener,
|
||||
holder.dateView.setTextSize(TypedValue.COMPLEX_UNIT_SP, headlineSmallFontSize);
|
||||
|
||||
Date d = new Date((long)article.updated * 1000);
|
||||
DateFormat df = new SimpleDateFormat("MMM dd, HH:mm");
|
||||
Date now = new Date();
|
||||
|
||||
DateFormat df;
|
||||
|
||||
if (now.getYear() == d.getYear() && now.getMonth() == d.getMonth() && now.getDay() == d.getDay()) {
|
||||
df = new SimpleDateFormat("HH:mm");
|
||||
} else {
|
||||
df = new SimpleDateFormat("MMM dd");
|
||||
}
|
||||
|
||||
df.setTimeZone(TimeZone.getDefault());
|
||||
holder.dateView.setText(df.format(d));
|
||||
}
|
||||
|
@ -39,7 +39,7 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/excerpt"
|
||||
android:singleLine="true"
|
||||
android:maxLines="2"
|
||||
android:ellipsize="end"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
@ -86,7 +86,7 @@
|
||||
android:singleLine="true"
|
||||
android:ellipsize="none"
|
||||
android:layout_weight="1"
|
||||
android:text="Jan 01, 12:00, 1970"
|
||||
android:text="Jan 01"
|
||||
android:textColor="?headlineSecondaryTextColor"
|
||||
android:textSize="12sp"
|
||||
/>
|
||||
@ -94,9 +94,9 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/marked"
|
||||
android:layout_width="16dp"
|
||||
android:layout_width="24dp"
|
||||
android:layout_gravity="bottom|right"
|
||||
android:layout_height="16dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_weight="0"
|
||||
android:clickable="true"
|
||||
android:src="@drawable/ic_star_empty" />
|
||||
|
@ -39,7 +39,7 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/excerpt"
|
||||
android:singleLine="true"
|
||||
android:maxLines="2"
|
||||
android:ellipsize="end"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
@ -86,7 +86,7 @@
|
||||
android:singleLine="true"
|
||||
android:ellipsize="none"
|
||||
android:layout_weight="1"
|
||||
android:text="Jan 01, 12:00, 1970"
|
||||
android:text="Jan 01"
|
||||
android:textColor="?headlineSelectedSecondaryTextColor"
|
||||
android:textSize="12sp"
|
||||
/>
|
||||
@ -94,9 +94,9 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/marked"
|
||||
android:layout_width="16dp"
|
||||
android:layout_width="24dp"
|
||||
android:layout_gravity="bottom|right"
|
||||
android:layout_height="16dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_weight="0"
|
||||
android:clickable="true"
|
||||
android:src="@drawable/ic_star_empty" />
|
||||
|
@ -40,7 +40,7 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/excerpt"
|
||||
android:singleLine="true"
|
||||
android:maxLines="2"
|
||||
android:ellipsize="end"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
@ -87,7 +87,7 @@
|
||||
android:singleLine="true"
|
||||
android:ellipsize="none"
|
||||
android:layout_weight="1"
|
||||
android:text="Jan 01, 12:00, 1970"
|
||||
android:text="Jan 01"
|
||||
android:textColor="?headlineSelectedSecondaryTextColor"
|
||||
android:textSize="12sp"
|
||||
/>
|
||||
@ -95,9 +95,9 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/marked"
|
||||
android:layout_width="16dp"
|
||||
android:layout_width="24dp"
|
||||
android:layout_gravity="bottom|right"
|
||||
android:layout_height="16dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_weight="0"
|
||||
android:clickable="true"
|
||||
android:src="@drawable/ic_star_empty" />
|
||||
|
@ -40,7 +40,7 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/excerpt"
|
||||
android:singleLine="true"
|
||||
android:maxLines="2"
|
||||
android:ellipsize="end"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
@ -87,7 +87,7 @@
|
||||
android:singleLine="true"
|
||||
android:ellipsize="none"
|
||||
android:layout_weight="1"
|
||||
android:text="Jan 01, 12:00, 1970"
|
||||
android:text="Jan 01"
|
||||
android:textColor="?headlineSecondaryTextColor"
|
||||
android:textSize="12sp"
|
||||
/>
|
||||
@ -95,9 +95,9 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/marked"
|
||||
android:layout_width="16dp"
|
||||
android:layout_width="24dp"
|
||||
android:layout_gravity="bottom|right"
|
||||
android:layout_height="16dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_weight="0"
|
||||
android:clickable="true"
|
||||
android:src="@drawable/ic_star_empty" />
|
||||
|
Loading…
Reference in New Issue
Block a user