246 lines
11 KiB
XML
246 lines
11 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
xmlns:tools="http://schemas.android.com/tools"
|
|
android:id="@+id/mainLayout"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:animateLayoutChanges="true"
|
|
android:orientation="vertical"
|
|
tools:context=".ui.widgets.WidgetFragment">
|
|
|
|
<FrameLayout
|
|
android:id="@+id/touchArea"
|
|
android:layout_marginVertical="20dp"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent" />
|
|
|
|
<com.github.droidworksstudio.launcher.view.GestureNestedScrollView
|
|
android:id="@+id/nestScrollView"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:clipChildren="false"
|
|
android:clipToPadding="false"
|
|
android:fadingEdgeLength="48dp"
|
|
android:fillViewport="true"
|
|
android:overScrollMode="never"
|
|
android:requiresFadingEdge="vertical"
|
|
android:scrollbars="none"
|
|
app:layout_behavior="@string/appbar_scrolling_view_behavior"
|
|
app:layout_constraintBottom_toBottomOf="parent"
|
|
app:layout_constraintTop_toTopOf="parent"
|
|
tools:ignore="SpeakableTextPresentCheck">
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginVertical="50dp"
|
|
android:orientation="vertical">
|
|
|
|
<RelativeLayout
|
|
android:id="@+id/weather_root"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginHorizontal="16dp"
|
|
android:layout_marginVertical="5dp"
|
|
android:background="@drawable/widget_background"
|
|
android:orientation="vertical"
|
|
android:visibility="gone">
|
|
|
|
<LinearLayout
|
|
android:id="@+id/topHeaderWeather"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_alignParentStart="true"
|
|
android:orientation="horizontal">
|
|
|
|
<TextView
|
|
android:id="@+id/weather_city"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:layout_weight="3"
|
|
android:ellipsize="end"
|
|
android:gravity="start"
|
|
android:lines="1"
|
|
android:textSize="16sp"
|
|
tools:text="London, GB" />
|
|
|
|
<TextView
|
|
android:id="@+id/weather_lastRun"
|
|
android:layout_width="115dp"
|
|
android:layout_height="match_parent"
|
|
android:layout_marginEnd="2dp"
|
|
android:layout_weight="2"
|
|
android:ellipsize="end"
|
|
android:gravity="center_vertical|end"
|
|
android:lines="1"
|
|
android:textSize="11sp"
|
|
tools:text="lastRun" />
|
|
|
|
<TextView
|
|
android:id="@+id/weather_refresh"
|
|
android:layout_width="42dp"
|
|
android:layout_height="match_parent"
|
|
android:layout_weight="1"
|
|
android:ellipsize="end"
|
|
android:gravity="end"
|
|
android:lines="1"
|
|
android:textSize="18sp"
|
|
tools:text="refresh" />
|
|
|
|
</LinearLayout>
|
|
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:layout_below="@id/topHeaderWeather"
|
|
android:gravity="center_vertical"
|
|
android:orientation="horizontal"
|
|
android:paddingStart="8dp"
|
|
android:paddingLeft="8dp"
|
|
android:paddingEnd="8dp"
|
|
android:paddingRight="8dp">
|
|
|
|
<ImageView
|
|
android:id="@+id/weather_icon"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="match_parent"
|
|
android:layout_gravity="center_vertical|center_horizontal"
|
|
android:layout_marginEnd="12dp"
|
|
android:layout_weight="0.3"
|
|
android:contentDescription="@string/widget_weather_description" />
|
|
|
|
<LinearLayout
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="0.7"
|
|
android:orientation="vertical">
|
|
|
|
<TextView
|
|
android:id="@+id/weather_temperature"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:ellipsize="end"
|
|
android:lines="1"
|
|
android:paddingTop="2dp"
|
|
android:text="@string/widget_weather_temp"
|
|
android:textSize="20sp" />
|
|
|
|
<TextView
|
|
android:id="@+id/weather_description"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:ellipsize="end"
|
|
android:lines="1"
|
|
android:paddingTop="2dp"
|
|
android:text="@string/widget_weather_description"
|
|
android:textSize="14sp" />
|
|
|
|
<TextView
|
|
android:id="@+id/weather_wind"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:ellipsize="end"
|
|
android:lines="1"
|
|
android:paddingTop="2dp"
|
|
android:text="@string/widget_weather_wind"
|
|
android:textSize="14sp" />
|
|
|
|
<TextView
|
|
android:id="@+id/weather_humidity"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:ellipsize="end"
|
|
android:lines="1"
|
|
android:paddingTop="2dp"
|
|
android:text="@string/widget_weather_humidity"
|
|
android:textSize="14sp" />
|
|
</LinearLayout>
|
|
</LinearLayout>
|
|
</RelativeLayout>
|
|
|
|
<RelativeLayout
|
|
android:id="@+id/battery_root"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginHorizontal="16dp"
|
|
android:layout_marginVertical="5dp"
|
|
android:background="@drawable/widget_background"
|
|
android:orientation="vertical"
|
|
android:visibility="gone">
|
|
|
|
<LinearLayout
|
|
android:id="@+id/topHeaderBattery"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_alignParentStart="true"
|
|
android:orientation="vertical"
|
|
tools:ignore="UselessParent">
|
|
|
|
<TextView
|
|
android:id="@+id/battery_level"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:ellipsize="end"
|
|
android:lines="1"
|
|
android:paddingTop="2dp"
|
|
android:text="@string/widgets_battery_level"
|
|
android:textSize="14sp" />
|
|
|
|
<TextView
|
|
android:id="@+id/battery_count"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:ellipsize="end"
|
|
android:lines="1"
|
|
android:paddingTop="2dp"
|
|
android:text="@string/widgets_battery_count"
|
|
android:textSize="14sp" />
|
|
|
|
<TextView
|
|
android:id="@+id/charging_status"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:ellipsize="end"
|
|
android:lines="1"
|
|
android:paddingTop="2dp"
|
|
android:text="@string/widgets_battery_status"
|
|
android:textSize="14sp" />
|
|
|
|
<TextView
|
|
android:id="@+id/battery_health"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:ellipsize="end"
|
|
android:lines="1"
|
|
android:paddingTop="2dp"
|
|
android:text="@string/widgets_battery_health"
|
|
android:textSize="14sp" />
|
|
|
|
<TextView
|
|
android:id="@+id/battery_voltage"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:ellipsize="end"
|
|
android:lines="1"
|
|
android:paddingTop="2dp"
|
|
android:text="@string/widgets_battery_voltage"
|
|
android:textSize="14sp" />
|
|
|
|
<TextView
|
|
android:id="@+id/battery_temperature"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:ellipsize="end"
|
|
android:lines="1"
|
|
android:paddingTop="2dp"
|
|
android:text="@string/widgets_battery_temperature"
|
|
android:textSize="14sp" />
|
|
</LinearLayout>
|
|
</RelativeLayout>
|
|
</LinearLayout>
|
|
|
|
</com.github.droidworksstudio.launcher.view.GestureNestedScrollView>
|
|
|
|
</FrameLayout> |