widgets implementation

This commit is contained in:
ezyyeah
2022-12-06 23:08:52 +01:00
parent e32d2483d3
commit 0de763a297
7 changed files with 113 additions and 17 deletions

View File

@@ -27,6 +27,7 @@
<action android:name="list_widget.ACTION_WIDGET_CLICK_NAV_RIGHT" />
<action android:name="list_widget.ACTION_WIDGET_CLICK_NAV_TODAY" />
<action android:name="list_widget.ACTION_WIDGET_CLICK_NAV_REFRESH" />
<action android:name="list_widget.ACTION_WIDGET_CLICK_BUY_PREMIUM" />
</intent-filter>
<meta-data

Binary file not shown.

After

Width:  |  Height:  |  Size: 528 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 156 KiB

View File

@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true">
<shape android:shape="rectangle">
<solid android:color="#ffE0CCEC"></solid>
<corners android:radius="10dp" />
</shape>
</item>
<item>
<shape android:shape="rectangle">
<gradient android:endColor="#ffE0CCEC" android:startColor="#C9ABDC" />
<corners android:radius="10dp" />
</shape>
</item>
</selector>

View File

@@ -5,16 +5,6 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_margin="@dimen/widget_margin">
<TextView
android:id="@+id/empty_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="Empty"
android:gravity="center"
android:textColor="@color/text"
android:textSize="20sp"
android:textStyle="bold" />
<RelativeLayout
android:id="@+id/tt_grid_cont"
android:layout_width="match_parent"
@@ -23,6 +13,17 @@
android:background="@drawable/card_layout_bg"
android:orientation="vertical">
<TextView
android:id="@+id/empty_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:text="Empty"
android:textColor="@color/text"
android:textSize="20sp"
android:textStyle="bold" />
<ListView
android:id="@+id/widget_list"
android:layout_width="match_parent"
@@ -83,17 +84,73 @@
android:id="@+id/nav_current"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_alignParentLeft="true"
android:layout_marginLeft="20sp"
android:layout_toLeftOf="@id/nav_refresh"
android:fontFamily="@font/montserrat_medium"
android:gravity="center_vertical"
android:maxLines="1"
android:text="Unknown"
android:fontFamily="@font/montserrat_medium"
android:layout_alignParentLeft="true"
android:layout_toLeftOf="@id/nav_refresh"
android:text="Timetable"
android:textColor="@color/text"
android:textSize="24sp"
android:textStyle="bold" />
</RelativeLayout>
</RelativeLayout>
<LinearLayout
android:visibility="gone"
android:id="@+id/need_login"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:background="@drawable/card_layout_bg"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFamily="@font/montserrat_medium"
android:gravity="center"
android:text="A Widget használatához, bejelentkezés szükséges."
android:textColor="@color/green"
android:textSize="24sp"
android:textStyle="bold" />
</LinearLayout>
<LinearLayout
android:visibility="gone"
android:id="@+id/need_premium"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:backgroundTint="#ffF4F4F4"
android:background="@drawable/card_layout_bg"
android:orientation="vertical" >
<ImageView
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="0.5"
android:layout_centerHorizontal="true"
android:adjustViewBounds="true"
android:paddingHorizontal="10dp"
android:paddingTop="5dp"
android:src="@drawable/tinta_widget" />
<Button
android:id="@+id/buy_premium"
android:layout_width="match_parent"
android:layout_height="40dp"
android:background="@drawable/btn_shape"
android:gravity="center"
android:text="Vigyél oda!"
android:padding="0dp"
android:layout_margin="0dp"
android:textColor="#ff691A9B"
android:fontFamily="@font/montserrat_medium"
android:textSize="16dp"
android:textStyle="bold"/>
</LinearLayout>
</RelativeLayout>