mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2025-01-25 08:05:55 +01:00
Activity list - move activity label below, revert background color set
This commit is contained in:
parent
cdaf78cbbc
commit
cac9b702a2
@ -93,9 +93,10 @@ public class ActivityListItem {
|
||||
final boolean selected) {
|
||||
final String activityKindLabel = activityKind.getLabel(activityName.getContext());
|
||||
if (StringUtils.isNotBlank(activityLabel)) {
|
||||
activityLabelText.setText(String.format(" (%s)", activityKindLabel));
|
||||
activityLabelText.setText(String.format("%s", activityKindLabel));
|
||||
activityName.setText(String.format("%s", activityLabel));
|
||||
} else {
|
||||
activityLabelText.setVisibility(View.GONE);
|
||||
activityName.setText(String.format("%s", activityKindLabel));
|
||||
}
|
||||
durationLabel.setText(DateTimeUtils.formatDurationHoursMinutes(duration, TimeUnit.MILLISECONDS));
|
||||
@ -155,6 +156,8 @@ public class ActivityListItem {
|
||||
if (parentLayout != null) {
|
||||
if (selected) {
|
||||
parentLayout.setBackgroundColor(selectedColor);
|
||||
} else {
|
||||
parentLayout.setBackgroundColor(backgroundColor);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -71,46 +71,49 @@
|
||||
android:minHeight="50dp"
|
||||
>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
<TableLayout
|
||||
android:gravity="top"
|
||||
android:layout_weight="1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:shrinkColumns="0"
|
||||
>
|
||||
<TextView
|
||||
android:id="@+id/line_layout_activity_name"
|
||||
<TableRow
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:maxLines="1"
|
||||
android:layout_weight="0"
|
||||
android:scrollHorizontally="false"
|
||||
android:text="@string/unknown"
|
||||
android:textStyle="bold"
|
||||
android:textSize="16sp"
|
||||
/>
|
||||
<TextView
|
||||
android:id="@+id/line_layout_activity_label"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:maxLines="1"
|
||||
android:layout_weight="0"
|
||||
android:scrollHorizontally="false"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:gravity="end"
|
||||
android:id="@+id/line_layout_date_label"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:maxLines="1"
|
||||
android:scrollHorizontally="false"
|
||||
android:text="@string/stats_empty_value"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
android:gravity="center_vertical">
|
||||
<TextView
|
||||
android:id="@+id/line_layout_activity_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0"
|
||||
android:scrollHorizontally="false"
|
||||
android:text="@string/unknown"
|
||||
android:textStyle="bold"
|
||||
android:textSize="16sp"
|
||||
android:singleLine="true"
|
||||
android:ellipsize="end"
|
||||
/>
|
||||
<TextView
|
||||
android:gravity="end|top"
|
||||
android:layout_gravity="top"
|
||||
android:id="@+id/line_layout_date_label"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:scrollHorizontally="false"
|
||||
android:text="@string/stats_empty_value"
|
||||
android:singleLine="true"
|
||||
android:ellipsize="none"
|
||||
/>
|
||||
</TableRow>
|
||||
</TableLayout>
|
||||
<TextView
|
||||
android:id="@+id/line_layout_activity_label"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0"
|
||||
/>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
Loading…
Reference in New Issue
Block a user