forked from firka/student-legacy
widget better design, user provider await
This commit is contained in:
parent
0de763a297
commit
5524d467c2
BIN
filcnaplo/android/app/src/main/res/drawable-hdpi/tinta_icon.png
Normal file
BIN
filcnaplo/android/app/src/main/res/drawable-hdpi/tinta_icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.4 KiB |
BIN
filcnaplo/android/app/src/main/res/drawable-hdpi/tinta_image.png
Normal file
BIN
filcnaplo/android/app/src/main/res/drawable-hdpi/tinta_image.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 146 KiB |
Binary file not shown.
After Width: | Height: | Size: 155 KiB |
Binary file not shown.
Before Width: | Height: | Size: 528 B |
Binary file not shown.
Before Width: | Height: | Size: 156 KiB |
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
<item>
|
<item>
|
||||||
<shape android:shape="rectangle">
|
<shape android:shape="rectangle">
|
||||||
<gradient android:endColor="#ffE0CCEC" android:startColor="#C9ABDC" />
|
<gradient android:endColor="#ffE0CCEC" android:startColor="#ffC9ABDC" />
|
||||||
<corners android:radius="10dp" />
|
<corners android:radius="10dp" />
|
||||||
</shape>
|
</shape>
|
||||||
</item>
|
</item>
|
||||||
|
@ -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="#ff1D8868"></solid>
|
||||||
|
<corners android:radius="10dp" />
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
|
||||||
|
<item>
|
||||||
|
<shape android:shape="rectangle">
|
||||||
|
<gradient android:endColor="#ff1D8868" android:startColor="#ff1EA18F" />
|
||||||
|
<corners android:radius="10dp" />
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
|
||||||
|
</selector>
|
@ -97,28 +97,60 @@
|
|||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<RelativeLayout
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
android:id="@+id/need_login"
|
android:id="@+id/need_login"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:gravity="center"
|
android:backgroundTint="#ffF4F4F4"
|
||||||
android:background="@drawable/card_layout_bg"
|
android:background="@drawable/card_layout_bg"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical" >
|
||||||
|
|
||||||
|
<!--<ImageView
|
||||||
|
android:layout_width="45dp"
|
||||||
|
android:layout_height="45dp"
|
||||||
|
android:paddingHorizontal="10dp"
|
||||||
|
android:paddingTop="5dp"
|
||||||
|
android:src="@drawable/tinta_icon" />-->
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/iv_1"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:adjustViewBounds="true"
|
||||||
|
android:paddingHorizontal="10dp"
|
||||||
|
android:paddingTop="10dp"
|
||||||
|
android:src="@drawable/tinta_image" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_below="@id/iv_1"
|
||||||
|
android:layout_marginHorizontal="15dp"
|
||||||
android:fontFamily="@font/montserrat_medium"
|
android:fontFamily="@font/montserrat_medium"
|
||||||
android:gravity="center"
|
android:text="A widget használatához, bejelentkezés szükséges."
|
||||||
android:text="A Widget használatához, bejelentkezés szükséges."
|
android:textColor="@color/black"
|
||||||
android:textColor="@color/green"
|
android:paddingTop="10dp"
|
||||||
android:textSize="24sp"
|
android:textSize="17dp"
|
||||||
android:textStyle="bold" />
|
android:textStyle="bold" />
|
||||||
|
|
||||||
</LinearLayout>
|
<Button
|
||||||
|
android:id="@+id/open_login"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="40dp"
|
||||||
|
android:layout_alignParentBottom="true"
|
||||||
|
android:background="@drawable/btn_shape_login"
|
||||||
|
android:text="Alkalmazás megnyitása"
|
||||||
|
android:padding="0dp"
|
||||||
|
android:layout_margin="10dp"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:fontFamily="@font/montserrat_medium"
|
||||||
|
android:textSize="16dp"
|
||||||
|
android:textStyle="bold"/>
|
||||||
|
|
||||||
<LinearLayout
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
android:id="@+id/need_premium"
|
android:id="@+id/need_premium"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@ -127,15 +159,45 @@
|
|||||||
android:background="@drawable/card_layout_bg"
|
android:background="@drawable/card_layout_bg"
|
||||||
android:orientation="vertical" >
|
android:orientation="vertical" >
|
||||||
|
|
||||||
<ImageView
|
<!--<ImageView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="45dp"
|
||||||
android:layout_height="0dp"
|
android:layout_height="45dp"
|
||||||
android:layout_weight="0.5"
|
|
||||||
android:layout_centerHorizontal="true"
|
|
||||||
android:adjustViewBounds="true"
|
|
||||||
android:paddingHorizontal="10dp"
|
android:paddingHorizontal="10dp"
|
||||||
android:paddingTop="5dp"
|
android:paddingTop="5dp"
|
||||||
android:src="@drawable/tinta_widget" />
|
android:src="@drawable/tinta_icon" />-->
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/iv_2"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:adjustViewBounds="true"
|
||||||
|
android:paddingHorizontal="10dp"
|
||||||
|
android:paddingTop="10dp"
|
||||||
|
android:src="@drawable/tinta_image" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tw_1"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_below="@id/iv_2"
|
||||||
|
android:layout_marginHorizontal="15dp"
|
||||||
|
android:fontFamily="@font/montserrat_medium"
|
||||||
|
android:text="Órák a kezdőképernyőd kényelméből."
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:paddingTop="10dp"
|
||||||
|
android:textSize="16dp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_below="@id/tw_1"
|
||||||
|
android:fontFamily="@font/montserrat_medium"
|
||||||
|
android:text="Fizess elő a Tinta szinten és helyezz egy widgetet a kezdőképernyődre."
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:layout_marginTop="0dp"
|
||||||
|
android:layout_marginHorizontal="15dp"
|
||||||
|
android:textSize="14dp" />
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/buy_premium"
|
android:id="@+id/buy_premium"
|
||||||
@ -145,12 +207,13 @@
|
|||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:text="Vigyél oda!"
|
android:text="Vigyél oda!"
|
||||||
android:padding="0dp"
|
android:padding="0dp"
|
||||||
android:layout_margin="0dp"
|
android:layout_alignParentBottom="true"
|
||||||
|
android:layout_margin="10dp"
|
||||||
android:textColor="#ff691A9B"
|
android:textColor="#ff691A9B"
|
||||||
android:fontFamily="@font/montserrat_medium"
|
android:fontFamily="@font/montserrat_medium"
|
||||||
android:textSize="16dp"
|
android:textSize="16dp"
|
||||||
android:textStyle="bold"/>
|
android:textStyle="bold"/>
|
||||||
|
|
||||||
</LinearLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
@ -25,9 +25,9 @@ class UserProvider with ChangeNotifier {
|
|||||||
|
|
||||||
UserProvider({required SettingsProvider settings}) : _settings = settings;
|
UserProvider({required SettingsProvider settings}) : _settings = settings;
|
||||||
|
|
||||||
void setUser(String userId) {
|
void setUser(String userId) async {
|
||||||
_selectedUserId = userId;
|
_selectedUserId = userId;
|
||||||
_settings.update(lastAccountId: userId);
|
await _settings.update(lastAccountId: userId);
|
||||||
updateWidget();
|
updateWidget();
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user