Showing
13 changed files
with
108 additions
and
51 deletions
1 | package com.example.vip | 1 | package com.example.vip |
2 | 2 | ||
3 | +import android.graphics.drawable.Drawable | ||
4 | +import android.graphics.drawable.TransitionDrawable | ||
3 | import androidx.appcompat.app.AppCompatActivity | 5 | import androidx.appcompat.app.AppCompatActivity |
4 | import android.os.Bundle | 6 | import android.os.Bundle |
5 | import android.util.Log | 7 | import android.util.Log |
8 | +import android.widget.Button | ||
9 | +import android.widget.ImageButton | ||
6 | import android.widget.Toast | 10 | import android.widget.Toast |
7 | import com.google.firebase.messaging.FirebaseMessaging | 11 | import com.google.firebase.messaging.FirebaseMessaging |
8 | import kotlinx.android.synthetic.main.activity_pushing.* | 12 | import kotlinx.android.synthetic.main.activity_pushing.* |
... | @@ -13,7 +17,6 @@ class PushingActivity : AppCompatActivity() { | ... | @@ -13,7 +17,6 @@ class PushingActivity : AppCompatActivity() { |
13 | super.onCreate(savedInstanceState) | 17 | super.onCreate(savedInstanceState) |
14 | setContentView(R.layout.activity_pushing) | 18 | setContentView(R.layout.activity_pushing) |
15 | 19 | ||
16 | - | ||
17 | subscribeButton.setOnClickListener { | 20 | subscribeButton.setOnClickListener { |
18 | Log.d(TAG, "Subscribing to weather topic") | 21 | Log.d(TAG, "Subscribing to weather topic") |
19 | // [START subscribe_topics] | 22 | // [START subscribe_topics] |
... | @@ -28,6 +31,7 @@ class PushingActivity : AppCompatActivity() { | ... | @@ -28,6 +31,7 @@ class PushingActivity : AppCompatActivity() { |
28 | } | 31 | } |
29 | // [END subscribe_topics] | 32 | // [END subscribe_topics] |
30 | } | 33 | } |
34 | + | ||
31 | } | 35 | } |
32 | companion object { | 36 | companion object { |
33 | 37 | ... | ... |
... | @@ -60,7 +60,7 @@ class RecommendActivity : AppCompatActivity() { | ... | @@ -60,7 +60,7 @@ class RecommendActivity : AppCompatActivity() { |
60 | memo!!.Policy, | 60 | memo!!.Policy, |
61 | memo!!.Policy, | 61 | memo!!.Policy, |
62 | 4.toFloat(), | 62 | 4.toFloat(), |
63 | - "0" | 63 | + "" |
64 | 64 | ||
65 | ) | 65 | ) |
66 | ) | 66 | ) |
... | @@ -93,7 +93,7 @@ class RecommendActivity : AppCompatActivity() { | ... | @@ -93,7 +93,7 @@ class RecommendActivity : AppCompatActivity() { |
93 | memo!!.Policy, | 93 | memo!!.Policy, |
94 | memo!!.Policy, | 94 | memo!!.Policy, |
95 | 4.toFloat(), | 95 | 4.toFloat(), |
96 | - "0" | 96 | + "" |
97 | 97 | ||
98 | ) | 98 | ) |
99 | ) | 99 | ) | ... | ... |
vip/app/src/main/res/drawable/edgemaking.xml
0 → 100644
1 | +<?xml version="1.0" encoding="utf-8"?> | ||
2 | +<layer-list xmlns:android="http://schemas.android.com/apk/res/android" > | ||
3 | + | ||
4 | + <item | ||
5 | + android:bottom="1dp" | ||
6 | + android:left="1dp" | ||
7 | + android:right="1dp" | ||
8 | + android:top="1dp"> | ||
9 | + <shape android:shape="rectangle" > | ||
10 | + <stroke | ||
11 | + android:width="1dp" | ||
12 | + android:color="#dcdcdc" /> | ||
13 | + | ||
14 | + <solid android:color="#FFF" /> | ||
15 | + </shape> | ||
16 | + </item> | ||
17 | + | ||
18 | +</layer-list> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
vip/app/src/main/res/drawable/heart_fill.png
0 → 100644
292 Bytes
538 Bytes
1 | +<?xml version="1.0" encoding="utf-8"?> | ||
2 | +<selector xmlns:android="http://schemas.android.com/apk/res/android"> | ||
3 | + | ||
4 | + <item android:state_checked="false" | ||
5 | + android:drawable="@drawable/heart_stroke" /> | ||
6 | + <item android:state_checked="true" | ||
7 | + android:drawable="@drawable/heart_fill" /> | ||
8 | +</selector> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
... | @@ -19,4 +19,19 @@ | ... | @@ -19,4 +19,19 @@ |
19 | app:layout_constraintEnd_toEndOf="parent" | 19 | app:layout_constraintEnd_toEndOf="parent" |
20 | app:layout_constraintStart_toStartOf="parent" | 20 | app:layout_constraintStart_toStartOf="parent" |
21 | app:layout_constraintTop_toTopOf="parent" /> | 21 | app:layout_constraintTop_toTopOf="parent" /> |
22 | + | ||
23 | + <ToggleButton | ||
24 | + android:id="@+id/toggleButton" | ||
25 | + android:layout_width="30dp" | ||
26 | + android:layout_height="30dp" | ||
27 | + android:layout_marginEnd="126dp" | ||
28 | + android:layout_marginBottom="98dp" | ||
29 | + android:text="ToggleButton" | ||
30 | + android:textOn="" | ||
31 | + android:textOff="" | ||
32 | + android:background="@drawable/toggle_selector" | ||
33 | + app:layout_constraintBottom_toBottomOf="parent" | ||
34 | + app:layout_constraintEnd_toEndOf="parent" /> | ||
35 | + | ||
36 | + | ||
22 | </androidx.constraintlayout.widget.ConstraintLayout> | 37 | </androidx.constraintlayout.widget.ConstraintLayout> |
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
... | @@ -39,6 +39,7 @@ | ... | @@ -39,6 +39,7 @@ |
39 | android:id="@+id/policyRecyclerView" | 39 | android:id="@+id/policyRecyclerView" |
40 | android:layout_width="match_parent" | 40 | android:layout_width="match_parent" |
41 | android:layout_height="500dp" | 41 | android:layout_height="500dp" |
42 | + android:layout_weight="1" | ||
42 | app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" | 43 | app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" |
43 | tools:listitem="@layout/item_policy" /> | 44 | tools:listitem="@layout/item_policy" /> |
44 | 45 | ... | ... |
... | @@ -45,20 +45,16 @@ | ... | @@ -45,20 +45,16 @@ |
45 | 45 | ||
46 | <androidx.recyclerview.widget.RecyclerView | 46 | <androidx.recyclerview.widget.RecyclerView |
47 | android:id="@+id/policyFieldRecyclerView" | 47 | android:id="@+id/policyFieldRecyclerView" |
48 | - android:layout_width="match_parent" | 48 | + android:layout_width="400dp" |
49 | android:layout_height="wrap_content" | 49 | android:layout_height="wrap_content" |
50 | + android:layout_gravity="center|center_vertical" | ||
51 | + android:layout_weight="1" | ||
52 | + android:padding="20dp" | ||
50 | app:layoutManager="androidx.recyclerview.widget.GridLayoutManager" | 53 | app:layoutManager="androidx.recyclerview.widget.GridLayoutManager" |
51 | - app:spanCount="3" | ||
52 | app:layout_constraintBottom_toBottomOf="@id/bottomNavigation" | 54 | app:layout_constraintBottom_toBottomOf="@id/bottomNavigation" |
55 | + app:spanCount="3" | ||
53 | tools:listitem="@layout/item_policyfield" /> | 56 | tools:listitem="@layout/item_policyfield" /> |
54 | 57 | ||
55 | - <FrameLayout | ||
56 | - android:layout_width="match_parent" | ||
57 | - android:layout_height="0dp" | ||
58 | - android:layout_weight="1" | ||
59 | - android:id="@+id/fragmentContainer" | ||
60 | - /> | ||
61 | - | ||
62 | <com.google.android.material.bottomnavigation.BottomNavigationView | 58 | <com.google.android.material.bottomnavigation.BottomNavigationView |
63 | android:id="@+id/bottomNavigation" | 59 | android:id="@+id/bottomNavigation" |
64 | android:layout_width="match_parent" | 60 | android:layout_width="match_parent" |
... | @@ -68,7 +64,7 @@ | ... | @@ -68,7 +64,7 @@ |
68 | app:itemIconTint="#29ABE2" | 64 | app:itemIconTint="#29ABE2" |
69 | app:itemTextColor="#29ABE2" | 65 | app:itemTextColor="#29ABE2" |
70 | app:labelVisibilityMode="labeled" | 66 | app:labelVisibilityMode="labeled" |
71 | - app:menu="@menu/bottom_nav_menu" /> | 67 | + app:menu="@menu/bottom_nav_menu" /> |
72 | 68 | ||
73 | </LinearLayout> | 69 | </LinearLayout> |
74 | 70 | ... | ... |
... | @@ -3,58 +3,70 @@ | ... | @@ -3,58 +3,70 @@ |
3 | xmlns:app="http://schemas.android.com/apk/res-auto" | 3 | xmlns:app="http://schemas.android.com/apk/res-auto" |
4 | xmlns:tools="http://schemas.android.com/tools" | 4 | xmlns:tools="http://schemas.android.com/tools" |
5 | android:layout_width="match_parent" | 5 | android:layout_width="match_parent" |
6 | - android:layout_height="100dp" | 6 | + android:layout_height="200dp" |
7 | - android:orientation="horizontal"> | 7 | + android:layout_margin="10dp" |
8 | + android:background="@drawable/edgemaking" | ||
9 | + android:orientation="horizontal" | ||
10 | + android:padding="10dp"> | ||
8 | 11 | ||
9 | 12 | ||
10 | <ImageView | 13 | <ImageView |
11 | android:id="@+id/policyImage" | 14 | android:id="@+id/policyImage" |
12 | - android:layout_width="wrap_content" | 15 | + android:layout_width="100dp" |
13 | - android:layout_height="wrap_content" | 16 | + android:layout_height="match_parent" |
14 | android:layout_weight="1" | 17 | android:layout_weight="1" |
15 | tools:srcCompat="@tools:sample/avatars" /> | 18 | tools:srcCompat="@tools:sample/avatars" /> |
16 | 19 | ||
17 | <LinearLayout | 20 | <LinearLayout |
18 | - android:layout_width="match_parent" | 21 | + android:layout_width="200dp" |
19 | android:layout_height="match_parent" | 22 | android:layout_height="match_parent" |
20 | - android:layout_weight="1" | 23 | + android:layout_weight="2" |
21 | - android:orientation="horizontal"> | 24 | + android:orientation="vertical"> |
22 | 25 | ||
23 | <LinearLayout | 26 | <LinearLayout |
24 | android:layout_width="match_parent" | 27 | android:layout_width="match_parent" |
25 | - android:layout_height="match_parent" | 28 | + android:layout_height="10dp" |
26 | - android:orientation="vertical"> | 29 | + android:layout_weight="1" |
30 | + android:orientation="horizontal"> | ||
27 | 31 | ||
28 | <TextView | 32 | <TextView |
29 | android:id="@+id/policyDday" | 33 | android:id="@+id/policyDday" |
30 | - android:layout_width="match_parent" | 34 | + android:layout_width="wrap_content" |
31 | android:layout_height="wrap_content" | 35 | android:layout_height="wrap_content" |
36 | + android:layout_weight="1" | ||
32 | android:text="TextView" /> | 37 | android:text="TextView" /> |
33 | 38 | ||
34 | - <TextView | 39 | + <ToggleButton |
35 | - android:id="@+id/policyHost" | 40 | + android:id="@+id/policyFavor" |
36 | - android:layout_width="match_parent" | 41 | + android:layout_width="30dp" |
37 | - android:layout_height="wrap_content" | 42 | + android:layout_height="30dp" |
38 | - android:text="TextView" /> | 43 | + android:layout_weight="0" |
39 | - | 44 | + android:background="@drawable/toggle_selector" |
40 | - <TextView | 45 | + android:textOff="" |
41 | - android:id="@+id/policyTitle" | 46 | + android:textOn="" /> |
42 | - android:layout_width="match_parent" | ||
43 | - android:layout_height="wrap_content" | ||
44 | - android:text="TextView" /> | ||
45 | - | ||
46 | - <RatingBar | ||
47 | - android:id="@+id/policyScore" | ||
48 | - android:layout_width="match_parent" | ||
49 | - android:layout_height="wrap_content" /> | ||
50 | </LinearLayout> | 47 | </LinearLayout> |
51 | 48 | ||
52 | <TextView | 49 | <TextView |
53 | - android:id="@+id/policyFavor" | 50 | + android:id="@+id/policyHost" |
54 | - android:layout_width="wrap_content" | 51 | + android:layout_width="match_parent" |
55 | - android:layout_height="wrap_content" | 52 | + android:layout_height="10dp" |
53 | + android:layout_weight="1" | ||
54 | + android:gravity="center" | ||
55 | + android:text="TextView" /> | ||
56 | + | ||
57 | + <TextView | ||
58 | + android:id="@+id/policyTitle" | ||
59 | + android:layout_width="match_parent" | ||
60 | + android:layout_height="10dp" | ||
56 | android:layout_weight="1" | 61 | android:layout_weight="1" |
62 | + android:gravity="center" | ||
57 | android:text="TextView" /> | 63 | android:text="TextView" /> |
58 | 64 | ||
65 | + <RatingBar | ||
66 | + android:id="@+id/policyScore" | ||
67 | + android:layout_width="240dp" | ||
68 | + android:layout_height="10dp" | ||
69 | + android:layout_gravity="center" | ||
70 | + android:layout_weight="1" /> | ||
59 | </LinearLayout> | 71 | </LinearLayout> |
60 | </LinearLayout> | 72 | </LinearLayout> |
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
1 | <?xml version="1.0" encoding="utf-8"?> | 1 | <?xml version="1.0" encoding="utf-8"?> |
2 | <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | 2 | <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" |
3 | xmlns:app="http://schemas.android.com/apk/res-auto" | 3 | xmlns:app="http://schemas.android.com/apk/res-auto" |
4 | - android:orientation="vertical" | ||
5 | android:layout_width="100dp" | 4 | android:layout_width="100dp" |
6 | android:layout_height="100dp" | 5 | android:layout_height="100dp" |
7 | android:layout_gravity="center" | 6 | android:layout_gravity="center" |
8 | - android:layout_margin="20dp" | 7 | + android:layout_margin="10dp" |
9 | - android:gravity="center"> | 8 | + android:gravity="center" |
9 | + android:orientation="vertical" | ||
10 | + android:padding="3dp"> | ||
10 | 11 | ||
11 | 12 | ||
12 | <ImageView | 13 | <ImageView |
13 | android:id="@+id/fieldIcon" | 14 | android:id="@+id/fieldIcon" |
14 | android:layout_width="match_parent" | 15 | android:layout_width="match_parent" |
15 | android:layout_height="wrap_content" | 16 | android:layout_height="wrap_content" |
17 | + android:layout_weight="1" | ||
18 | + android:adjustViewBounds="true" | ||
16 | app:layout_constraintLeft_toLeftOf="parent" | 19 | app:layout_constraintLeft_toLeftOf="parent" |
17 | app:layout_constraintRight_toRightOf="parent" | 20 | app:layout_constraintRight_toRightOf="parent" |
18 | - app:layout_constraintTop_toTopOf="parent" | 21 | + app:layout_constraintTop_toTopOf="parent" /> |
19 | - android:adjustViewBounds="true" | ||
20 | - android:layout_gravity="center"/> | ||
21 | 22 | ||
22 | <TextView | 23 | <TextView |
23 | android:id="@+id/fieldIconText" | 24 | android:id="@+id/fieldIconText" |
24 | android:layout_width="wrap_content" | 25 | android:layout_width="wrap_content" |
25 | android:layout_height="wrap_content" | 26 | android:layout_height="wrap_content" |
27 | + android:layout_gravity="center" | ||
28 | + android:gravity="center" | ||
26 | android:textSize="20sp" | 29 | android:textSize="20sp" |
27 | - app:layout_constraintTop_toBottomOf="@+id/fieldIcon" | ||
28 | app:layout_constraintLeft_toLeftOf="parent" | 30 | app:layout_constraintLeft_toLeftOf="parent" |
29 | app:layout_constraintRight_toRightOf="parent" | 31 | app:layout_constraintRight_toRightOf="parent" |
30 | - android:layout_gravity="center"/> | 32 | + app:layout_constraintTop_toBottomOf="@+id/fieldIcon" /> |
31 | 33 | ||
32 | </LinearLayout> | 34 | </LinearLayout> |
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
... | @@ -9,5 +9,6 @@ | ... | @@ -9,5 +9,6 @@ |
9 | android:id="@+id/imageview" | 9 | android:id="@+id/imageview" |
10 | android:layout_width="match_parent" | 10 | android:layout_width="match_parent" |
11 | android:layout_height="wrap_content" | 11 | android:layout_height="wrap_content" |
12 | + android:layout_weight="1" | ||
12 | tools:srcCompat="@tools:sample/avatars" /> | 13 | tools:srcCompat="@tools:sample/avatars" /> |
13 | </LinearLayout> | 14 | </LinearLayout> |
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
... | @@ -8,7 +8,7 @@ buildscript { | ... | @@ -8,7 +8,7 @@ buildscript { |
8 | 8 | ||
9 | } | 9 | } |
10 | dependencies { | 10 | dependencies { |
11 | - classpath 'com.android.tools.build:gradle:3.5.1' | 11 | + classpath 'com.android.tools.build:gradle:3.5.2' |
12 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" | 12 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" |
13 | classpath 'com.google.gms:google-services:4.3.2' | 13 | classpath 'com.google.gms:google-services:4.3.2' |
14 | // NOTE: Do not place your application dependencies here; they belong | 14 | // NOTE: Do not place your application dependencies here; they belong | ... | ... |
-
Please register or login to post a comment