forked from github/wulkanowy-mirror
New timetable widget design (#1384)
This commit is contained in:
parent
076948a680
commit
aba2068a84
@ -164,7 +164,7 @@ ext {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation "io.github.wulkanowy:sdk:496dc01d15"
|
implementation "io.github.wulkanowy:sdk:b991d0c"
|
||||||
|
|
||||||
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5'
|
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5'
|
||||||
|
|
||||||
|
@ -0,0 +1,7 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<solid android:color="@color/colorPrimary" />
|
||||||
|
<corners
|
||||||
|
android:topLeftRadius="8dp"
|
||||||
|
android:topRightRadius="8dp" />
|
||||||
|
</shape>
|
@ -0,0 +1,7 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<solid android:color="@color/colorWidgetTopBar" />
|
||||||
|
<corners
|
||||||
|
android:topLeftRadius="8dp"
|
||||||
|
android:topRightRadius="8dp" />
|
||||||
|
</shape>
|
@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<solid android:color="@android:color/white" />
|
||||||
|
<corners android:radius="3dp" />
|
||||||
|
</shape>
|
@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<solid android:color="@color/colorWidgetTopBar" />
|
||||||
|
<corners android:radius="3dp" />
|
||||||
|
</shape>
|
@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<solid android:color="#bbffffff" />
|
||||||
|
<corners android:radius="8dp" />
|
||||||
|
</shape>
|
@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<solid android:color="#BB191919" />
|
||||||
|
<corners android:radius="8dp" />
|
||||||
|
</shape>
|
BIN
app/src/main/res/drawable/img_timetable_widget_preview.png
Normal file → Executable file
BIN
app/src/main/res/drawable/img_timetable_widget_preview.png
Normal file → Executable file
Binary file not shown.
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 25 KiB |
@ -6,12 +6,12 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:minHeight="45dp"
|
android:minHeight="45dp"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
|
android:background="@drawable/background_widget_item_timetable"
|
||||||
tools:context=".ui.modules.timetablewidget.TimetableWidgetFactory">
|
tools:context=".ui.modules.timetablewidget.TimetableWidgetFactory">
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="@android:color/white"
|
|
||||||
android:paddingStart="6dp"
|
android:paddingStart="6dp"
|
||||||
android:paddingLeft="6dp"
|
android:paddingLeft="6dp"
|
||||||
android:paddingTop="6dp"
|
android:paddingTop="6dp"
|
||||||
@ -126,9 +126,4 @@
|
|||||||
tools:text="Lekcja odwołana: uczniowie zwolnieni do domu"
|
tools:text="Lekcja odwołana: uczniowie zwolnieni do domu"
|
||||||
tools:visibility="gone" />
|
tools:visibility="gone" />
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
<FrameLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="1dp"
|
|
||||||
android:background="@color/colorDivider" />
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
@ -6,12 +6,12 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:minHeight="45dp"
|
android:minHeight="45dp"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
|
android:background="@drawable/background_widget_item_timetable_dark"
|
||||||
tools:context=".ui.modules.timetablewidget.TimetableWidgetFactory">
|
tools:context=".ui.modules.timetablewidget.TimetableWidgetFactory">
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="@color/colorWidgetBackground"
|
|
||||||
android:paddingStart="6dp"
|
android:paddingStart="6dp"
|
||||||
android:paddingTop="6dp"
|
android:paddingTop="6dp"
|
||||||
android:paddingEnd="12dp"
|
android:paddingEnd="12dp"
|
||||||
@ -111,9 +111,4 @@
|
|||||||
tools:text="Lekcja odwołana: uczniowie zwolnieni do domu"
|
tools:text="Lekcja odwołana: uczniowie zwolnieni do domu"
|
||||||
tools:visibility="gone" />
|
tools:visibility="gone" />
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
<FrameLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="1dp"
|
|
||||||
android:background="@color/colorDividerInverse" />
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
@ -91,7 +91,7 @@
|
|||||||
tools:text="@tools:sample/lorem/random" />
|
tools:text="@tools:sample/lorem/random" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<FrameLayout
|
<View
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="1dp"
|
android:layout_height="1dp"
|
||||||
android:background="@color/colorDivider" />
|
android:background="@color/colorDivider" />
|
||||||
|
@ -90,7 +90,7 @@
|
|||||||
tools:text="@tools:sample/lorem/random" />
|
tools:text="@tools:sample/lorem/random" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<FrameLayout
|
<View
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="1dp"
|
android:layout_height="1dp"
|
||||||
android:background="@color/colorDividerInverse" />
|
android:background="@color/colorDividerInverse" />
|
||||||
|
@ -3,13 +3,13 @@
|
|||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="@android:color/white"
|
android:background="@drawable/background_widget_timetable"
|
||||||
tools:context=".ui.modules.timetablewidget.TimetableWidgetProvider">
|
tools:context=".ui.modules.timetablewidget.TimetableWidgetProvider">
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="56dp"
|
android:layout_height="56dp"
|
||||||
android:background="@color/colorPrimary">
|
android:background="@drawable/background_widget_header_timetable">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
@ -45,6 +45,7 @@
|
|||||||
android:layout_width="50dp"
|
android:layout_width="50dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_alignParentEnd="true"
|
android:layout_alignParentEnd="true"
|
||||||
|
android:layout_marginEnd="4dp"
|
||||||
android:background="?android:selectableItemBackground"
|
android:background="?android:selectableItemBackground"
|
||||||
android:contentDescription="@string/account_title"
|
android:contentDescription="@string/account_title"
|
||||||
android:src="@drawable/ic_widget_account" />
|
android:src="@drawable/ic_widget_account" />
|
||||||
@ -77,7 +78,12 @@
|
|||||||
android:id="@+id/timetableWidgetList"
|
android:id="@+id/timetableWidgetList"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_marginTop="56dp"
|
android:layout_marginLeft="10dp"
|
||||||
|
android:layout_marginTop="66dp"
|
||||||
|
android:layout_marginRight="10dp"
|
||||||
|
android:layout_marginBottom="10dp"
|
||||||
|
android:divider="#00ffffff"
|
||||||
|
android:dividerHeight="4dp"
|
||||||
tools:listitem="@layout/item_widget_timetable" />
|
tools:listitem="@layout/item_widget_timetable" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@ -88,5 +94,6 @@
|
|||||||
android:text="@string/widget_timetable_no_items"
|
android:text="@string/widget_timetable_no_items"
|
||||||
android:textColor="@android:color/black"
|
android:textColor="@android:color/black"
|
||||||
android:textSize="20sp"
|
android:textSize="20sp"
|
||||||
|
android:translationY="28dp"
|
||||||
tools:visibility="invisible" />
|
tools:visibility="invisible" />
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
@ -3,13 +3,13 @@
|
|||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="@color/colorWidgetBackground"
|
android:background="@drawable/background_widget_timetable_dark"
|
||||||
tools:context=".ui.modules.timetablewidget.TimetableWidgetProvider">
|
tools:context=".ui.modules.timetablewidget.TimetableWidgetProvider">
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="56dp"
|
android:layout_height="56dp"
|
||||||
android:background="@color/colorWidgetTopBar">
|
android:background="@drawable/background_widget_header_timetable_dark">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
@ -45,6 +45,7 @@
|
|||||||
android:layout_width="50dp"
|
android:layout_width="50dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_alignParentEnd="true"
|
android:layout_alignParentEnd="true"
|
||||||
|
android:layout_marginEnd="4dp"
|
||||||
android:background="?android:selectableItemBackground"
|
android:background="?android:selectableItemBackground"
|
||||||
android:contentDescription="@string/account_title"
|
android:contentDescription="@string/account_title"
|
||||||
android:src="@drawable/ic_widget_account" />
|
android:src="@drawable/ic_widget_account" />
|
||||||
@ -77,7 +78,12 @@
|
|||||||
android:id="@+id/timetableWidgetList"
|
android:id="@+id/timetableWidgetList"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_marginTop="56dp"
|
android:layout_marginTop="66dp"
|
||||||
|
android:layout_marginBottom="10dp"
|
||||||
|
android:layout_marginLeft="10dp"
|
||||||
|
android:layout_marginRight="10dp"
|
||||||
|
android:divider="#00ffffff"
|
||||||
|
android:dividerHeight="4dp"
|
||||||
tools:listitem="@layout/item_widget_timetable_dark" />
|
tools:listitem="@layout/item_widget_timetable_dark" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@ -88,5 +94,6 @@
|
|||||||
android:text="@string/widget_timetable_no_items"
|
android:text="@string/widget_timetable_no_items"
|
||||||
android:textColor="@android:color/white"
|
android:textColor="@android:color/white"
|
||||||
android:textSize="20sp"
|
android:textSize="20sp"
|
||||||
|
android:translationY="28dp"
|
||||||
tools:visibility="invisible" />
|
tools:visibility="invisible" />
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user