forked from github/wulkanowy-mirror
Add lucky number widget (#292)
This commit is contained in:

committed by
Rafał Borcz

parent
baf1420193
commit
f84040109c
@ -6,7 +6,7 @@
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/timetableWidgetConfigureTitle"
|
||||
android:id="@+id/widgetConfigureTitle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="64dp"
|
||||
android:paddingStart="24dp"
|
||||
@ -20,10 +20,10 @@
|
||||
app:firstBaselineToTopHeight="40dp" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/timetableWidgetConfigureRecycler"
|
||||
android:id="@+id/widgetConfigureRecycler"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/timetableWidgetConfigureTitle"
|
||||
android:layout_below="@id/widgetConfigureTitle"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:overScrollMode="never"
|
||||
tools:itemCount="3"
|
63
app/src/main/res/layout/widget_luckynumber.xml
Normal file
63
app/src/main/res/layout/widget_luckynumber.xml
Normal file
@ -0,0 +1,63 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/luckyNumberWidgetContainer"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:background="@drawable/background_rounded_corner"
|
||||
android:gravity="center"
|
||||
android:padding="10dp"
|
||||
tools:context=".ui.modules.luckynumberwidget.LuckyNumberWidgetProvider">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/luckyNumberWidgetImageTop"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_above="@id/luckyNumberWidgetNumber"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginBottom="20dp"
|
||||
android:contentDescription="@string/lucky_number_title"
|
||||
android:gravity="center"
|
||||
android:src="@drawable/ic_widget_clover_24dp"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/luckyNumberWidgetTitle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="0dp"
|
||||
android:gravity="center"
|
||||
android:labelFor="@id/luckyNumberWidgetImageTop"
|
||||
android:text="@string/lucky_number_title"
|
||||
android:textAlignment="center"
|
||||
android:textColor="#8c8c8c"
|
||||
android:textSize="22sp"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/luckyNumberWidgetImageLeft"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignTop="@id/luckyNumberWidgetNumber"
|
||||
android:contentDescription="@string/lucky_number_title"
|
||||
android:src="@drawable/ic_widget_clover_24dp"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/luckyNumberWidgetNumber"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/luckyNumberWidgetTitle"
|
||||
android:layout_toEndOf="@id/luckyNumberWidgetImageLeft"
|
||||
android:layout_toRightOf="@id/luckyNumberWidgetImageLeft"
|
||||
android:gravity="center"
|
||||
android:text="#"
|
||||
android:textAlignment="center"
|
||||
android:textColor="#404040"
|
||||
android:textSize="34sp"
|
||||
tools:ignore="HardcodedText"
|
||||
tools:text="13" />
|
||||
</RelativeLayout>
|
Reference in New Issue
Block a user