Improves dates & cards
This commit is contained in:
parent
fc306393f4
commit
5e7fbb9af1
|
@ -577,12 +577,11 @@ public class Helper {
|
|||
long months = days / 30;
|
||||
long years = days / 365;
|
||||
|
||||
String format = DateFormat.getDateInstance(DateFormat.SHORT).format(dateToot);
|
||||
if( years > 0 ) {
|
||||
SimpleDateFormat format = new SimpleDateFormat("M/d/yy", Locale.getDefault());
|
||||
return format.format(dateToot);
|
||||
return format;
|
||||
} else if( months > 0 || days > 7) {
|
||||
SimpleDateFormat format = new SimpleDateFormat("M/d", Locale.getDefault());
|
||||
return format.format(dateToot);
|
||||
return format.substring(0,5);
|
||||
}else if( days > 0 )
|
||||
return context.getString(R.string.date_day, days);
|
||||
else if(hours > 0)
|
||||
|
|
|
@ -198,7 +198,7 @@
|
|||
|
||||
<LinearLayout
|
||||
android:id="@+id/status_cardview"
|
||||
android:padding="10dp"
|
||||
android:padding="5dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:visibility="gone"
|
||||
|
@ -209,15 +209,15 @@
|
|||
<ImageView
|
||||
android:layout_gravity="center"
|
||||
android:id="@+id/status_cardview_image"
|
||||
android:layout_width="60dp"
|
||||
android:layout_width="80dp"
|
||||
android:gravity="center"
|
||||
android:layout_height="60dp"
|
||||
android:layout_height="80dp"
|
||||
tools:ignore="ContentDescription" />
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_width="0dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:layout_marginStart="2dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="wrap_content">
|
||||
<TextView
|
||||
|
|
Loading…
Reference in New Issue