mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-11-28 12:56:49 +01:00
Make Sports Activity Detail data take full width
This commit is contained in:
parent
645c22b10a
commit
78745420ca
@ -31,7 +31,7 @@ import android.view.animation.Animation;
|
||||
import android.view.animation.AnimationUtils;
|
||||
import android.widget.Button;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TableLayout;
|
||||
import android.widget.TableRow;
|
||||
import android.widget.TextView;
|
||||
@ -82,7 +82,7 @@ public class ActivitySummaryDetail extends AbstractGBActivity {
|
||||
final long dateToFilter = intent.getLongExtra("dateToFilter", 0);
|
||||
|
||||
final ActivitySummaryItems items = new ActivitySummaryItems(this, gbDevice, filter, dateFromFilter, dateToFilter);
|
||||
final RelativeLayout layout = findViewById(R.id.activity_summary_detail_relative_layout);
|
||||
final LinearLayout layout = findViewById(R.id.activity_summary_detail_relative_layout);
|
||||
alternateColor = getAlternateColor(this);
|
||||
|
||||
final Animation animFadeRight;
|
||||
@ -103,6 +103,7 @@ public class ActivitySummaryDetail extends AbstractGBActivity {
|
||||
this,
|
||||
R.anim.bounceright);
|
||||
|
||||
|
||||
layout.setOnTouchListener(new SwipeEvents(this) {
|
||||
@Override
|
||||
public void onSwipeRight() {
|
||||
@ -129,6 +130,7 @@ public class ActivitySummaryDetail extends AbstractGBActivity {
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
currentItem = items.getItem(position);
|
||||
if (currentItem != null) {
|
||||
makeSummaryHeader(currentItem);
|
||||
|
@ -1,120 +1,146 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/activity_summary_detail_relative_layout"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:background="?android:attr/activatedBackgroundIndicator"
|
||||
android:clickable="true"
|
||||
android:focusable="auto"
|
||||
android:padding="8dp">
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/activity_summary_detail_relative_layout"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:background="?android:attr/activatedBackgroundIndicator"
|
||||
android:clickable="false"
|
||||
android:focusable="auto"
|
||||
android:orientation="vertical"
|
||||
android:padding="8dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/item_image"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_alignParentStart="true"
|
||||
android:contentDescription="activity image" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_toEndOf="@+id/item_image"
|
||||
android:orientation="vertical"
|
||||
android:paddingStart="8dp"
|
||||
android:paddingEnd="8dp">
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/item_image"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_alignParentStart="false"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:contentDescription="activity image" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/activitykind"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="sans-serif-black"
|
||||
android:maxLines="1"
|
||||
android:scrollHorizontally="false"
|
||||
android:textSize="18sp" />
|
||||
|
||||
<TableLayout
|
||||
android:id="@+id/summaryHeader"
|
||||
<LinearLayout
|
||||
android:id="@+id/top_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="false"
|
||||
android:clickable="false"
|
||||
android:foregroundGravity="top"
|
||||
android:gravity="top"
|
||||
android:orientation="vertical"
|
||||
android:paddingStart="8dp"
|
||||
android:paddingEnd="8dp">
|
||||
|
||||
<TableRow
|
||||
|
||||
<TextView
|
||||
android:id="@+id/activitykind"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="sans-serif-black"
|
||||
android:maxLines="1"
|
||||
android:scrollHorizontally="false"
|
||||
android:textSize="18sp" />
|
||||
|
||||
<TableLayout
|
||||
android:id="@+id/summaryHeader"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/starttime_label"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="start"
|
||||
android:text="@string/activity_detail_start_label" />
|
||||
<TableRow
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/starttime"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="end" />
|
||||
<TextView
|
||||
android:id="@+id/starttime_label"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="start"
|
||||
android:text="@string/activity_detail_start_label" />
|
||||
|
||||
</TableRow>
|
||||
<TextView
|
||||
android:id="@+id/starttime"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="end" />
|
||||
|
||||
<TableRow
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
</TableRow>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/endtime_label"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="start"
|
||||
android:text="@string/activity_detail_end_label" />
|
||||
<TableRow
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/endtime"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="end" />
|
||||
</TableRow>
|
||||
<TextView
|
||||
android:id="@+id/endtime_label"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="start"
|
||||
android:text="@string/activity_detail_end_label" />
|
||||
|
||||
<TableRow
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
<TextView
|
||||
android:id="@+id/endtime"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="end" />
|
||||
</TableRow>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/duration_label"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="start"
|
||||
android:text="@string/activity_detail_duration_label" />
|
||||
<TableRow
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/duration"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="end" />
|
||||
</TableRow>
|
||||
<TextView
|
||||
android:id="@+id/duration_label"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="start"
|
||||
android:text="@string/activity_detail_duration_label" />
|
||||
|
||||
</TableLayout>
|
||||
<TextView
|
||||
android:id="@+id/duration"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="end" />
|
||||
</TableRow>
|
||||
|
||||
</TableLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/bottom_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:clickable="false"
|
||||
android:orientation="vertical">
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="@android:color/darker_gray" />
|
||||
|
||||
<TableLayout
|
||||
android:id="@+id/summaryDetails"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
|
||||
<Button
|
||||
android:id="@+id/showTrack"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/activity_detail_show_gps_label" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
||||
|
@ -10,7 +10,7 @@
|
||||
<item
|
||||
android:id="@+id/activity_action_filter"
|
||||
android:icon="@drawable/ic_filter"
|
||||
android:title="@string/pref_header_filter"
|
||||
android:title="@string/pref_header_statistics"
|
||||
app:iconTint="@color/primarytext_dark"
|
||||
app:showAsAction="ifRoom" />
|
||||
<item
|
||||
|
@ -978,6 +978,7 @@
|
||||
<string name="prefs_events_forwarding_broadcast_title">Broadcast message</string>
|
||||
<string name="prefs_events_forwarding_action_title">Run action</string>
|
||||
<string name="pref_header_filter">Sports Activities Filter</string>
|
||||
<string name="pref_header_statistics">Sports Activities Statistics</string>
|
||||
<string name="activity_filter_date_from">From</string>
|
||||
<string name="activity_filter_date_to">To</string>
|
||||
<string name="activity_filter_reset_filter">Reset Filter</string>
|
||||
|
Loading…
Reference in New Issue
Block a user