Skip to content

Commit 65b6931

Browse files
committed
feat: icons.
1 parent 356267c commit 65b6931

23 files changed

+98
-200
lines changed

app/src/main/java/cn/qhplus/emo/MainActivity.kt

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,36 +15,28 @@
1515
*/
1616
package cn.qhplus.emo
1717

18-
import android.graphics.Color
19-
import android.os.Build
2018
import android.os.Bundle
21-
import android.view.WindowManager
2219
import androidx.activity.ComponentActivity
2320
import androidx.activity.compose.setContent
2421
import androidx.compose.material3.windowsizeclass.ExperimentalMaterial3WindowSizeClassApi
2522
import androidx.compose.material3.windowsizeclass.calculateWindowSizeClass
2623
import androidx.core.view.WindowCompat
27-
import androidx.core.view.WindowInsetsCompat
2824
import androidx.lifecycle.lifecycleScope
2925
import cn.qhplus.emo.ui.EmoApp
3026
import kotlinx.coroutines.delay
3127
import kotlinx.coroutines.launch
3228

3329
@OptIn(ExperimentalMaterial3WindowSizeClassApi::class)
34-
class MainActivity: ComponentActivity() {
30+
class MainActivity : ComponentActivity() {
3531
override fun onCreate(savedInstanceState: Bundle?) {
3632
super.onCreate(savedInstanceState)
3733

3834
WindowCompat.setDecorFitsSystemWindows(window, false)
39-
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.P) {
40-
window.navigationBarDividerColor = Color.TRANSPARENT
41-
window.attributes.layoutInDisplayCutoutMode = WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES
42-
}
4335
setContent {
4436
EmoApp(calculateWindowSizeClass(this))
4537
}
4638
lifecycleScope.launch {
47-
delay(100)
39+
delay(50)
4840
window.setBackgroundDrawableResource(android.R.color.transparent)
4941
}
5042
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<vector android:height="131.25dp" android:viewportHeight="210"
2+
android:viewportWidth="440" android:width="275dp" xmlns:android="http://schemas.android.com/apk/res/android">
3+
<path android:fillColor="#dddddd" android:fillType="evenOdd" android:pathData="M105,30H335C376.42,30 410,63.58 410,105C410,146.42 376.42,180 335,180H105C68.72,180 38.46,154.24 31.5,120.01L89.75,121C98.03,121.14 104.86,114.54 105,106.25C105.14,97.97 98.54,91.14 90.25,91L31.5,90.01C38.45,55.77 68.71,30 105,30ZM0,105C0,47.01 47.01,0 105,0H335C392.99,0 440,47.01 440,105C440,162.99 392.99,210 335,210H105C47.01,210 0,162.99 0,105ZM331.5,42H240V169H331.5C366.57,169 395,140.57 395,105.5C395,70.43 366.57,42 331.5,42ZM141.22,50.04C137.08,45.38 130.5,43.77 124.67,45.98C118.85,48.19 115,53.77 115,60V151C115,159.28 121.72,166 130,166C138.28,166 145,159.28 145,151V99.48L157.49,113.54C160.3,116.71 164.32,118.54 168.55,118.58C172.79,118.63 176.84,116.88 179.72,113.77L194,98.32V151C194,159.28 200.72,166 209,166C217.28,166 224,159.28 224,151V60C224,53.83 220.22,48.28 214.47,46.03C208.72,43.78 202.18,45.28 197.99,49.82L168.93,81.25L141.22,50.04Z"/>
4+
</vector>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
33
<item android:drawable="@android:color/black"/>
4-
<item android:drawable="@mipmap/ic_launcher" android:gravity="center"/>
4+
<item android:drawable="@drawable/ic_logo" android:gravity="center"/>
55
</layer-list>
Lines changed: 5 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,10 @@
11
<vector xmlns:android="http://schemas.android.com/apk/res/android"
2-
xmlns:aapt="http://schemas.android.com/aapt"
32
android:width="108dp"
43
android:height="108dp"
54
android:viewportWidth="108"
65
android:viewportHeight="108">
7-
<path android:pathData="M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z">
8-
<aapt:attr name="android:fillColor">
9-
<gradient
10-
android:endX="85.84757"
11-
android:endY="92.4963"
12-
android:startX="42.9492"
13-
android:startY="49.59793"
14-
android:type="linear">
15-
<item
16-
android:color="#44000000"
17-
android:offset="0.0" />
18-
<item
19-
android:color="#00000000"
20-
android:offset="1.0" />
21-
</gradient>
22-
</aapt:attr>
23-
</path>
24-
<path
25-
android:fillColor="#FFFFFF"
26-
android:fillType="nonZero"
27-
android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z"
28-
android:strokeWidth="1"
29-
android:strokeColor="#00000000" />
30-
</vector>
6+
<path
7+
android:pathData="M39.89,44.68H68.11C73.2,44.68 77.32,48.8 77.32,53.89C77.32,58.97 73.2,63.09 68.11,63.09H39.89C35.43,63.09 31.72,59.93 30.87,55.73L38.01,55.85C39.03,55.87 39.87,55.06 39.89,54.04C39.9,53.02 39.09,52.19 38.08,52.17L30.87,52.05C31.72,47.84 35.43,44.68 39.89,44.68ZM27,53.89C27,46.77 32.77,41 39.89,41H68.11C75.23,41 81,46.77 81,53.89C81,61 75.23,66.77 68.11,66.77H39.89C32.77,66.77 27,61 27,53.89ZM67.68,46.15H56.45V61.74H67.68C71.99,61.74 75.48,58.25 75.48,53.95C75.48,49.64 71.99,46.15 67.68,46.15ZM44.33,47.14C43.82,46.57 43.02,46.37 42.3,46.64C41.59,46.91 41.11,47.6 41.11,48.36V59.53C41.11,60.55 41.94,61.37 42.95,61.37C43.97,61.37 44.8,60.55 44.8,59.53V53.21L46.33,54.93C46.67,55.32 47.17,55.55 47.69,55.55C48.21,55.56 48.7,55.34 49.06,54.96L50.81,53.07V59.53C50.81,60.55 51.63,61.37 52.65,61.37C53.67,61.37 54.49,60.55 54.49,59.53V48.36C54.49,47.61 54.03,46.93 53.32,46.65C52.62,46.37 51.81,46.56 51.3,47.11L47.73,50.97L44.33,47.14Z"
8+
android:fillColor="#222222"
9+
android:fillType="evenOdd"/>
10+
</vector>

app/src/main/res/drawable/ic_launcher_background.xml

Lines changed: 1 addition & 161 deletions
Original file line numberDiff line numberDiff line change
@@ -5,166 +5,6 @@
55
android:viewportWidth="108"
66
android:viewportHeight="108">
77
<path
8-
android:fillColor="#3DDC84"
8+
android:fillColor="#FFFFFF"
99
android:pathData="M0,0h108v108h-108z" />
10-
<path
11-
android:fillColor="#00000000"
12-
android:pathData="M9,0L9,108"
13-
android:strokeWidth="0.8"
14-
android:strokeColor="#33FFFFFF" />
15-
<path
16-
android:fillColor="#00000000"
17-
android:pathData="M19,0L19,108"
18-
android:strokeWidth="0.8"
19-
android:strokeColor="#33FFFFFF" />
20-
<path
21-
android:fillColor="#00000000"
22-
android:pathData="M29,0L29,108"
23-
android:strokeWidth="0.8"
24-
android:strokeColor="#33FFFFFF" />
25-
<path
26-
android:fillColor="#00000000"
27-
android:pathData="M39,0L39,108"
28-
android:strokeWidth="0.8"
29-
android:strokeColor="#33FFFFFF" />
30-
<path
31-
android:fillColor="#00000000"
32-
android:pathData="M49,0L49,108"
33-
android:strokeWidth="0.8"
34-
android:strokeColor="#33FFFFFF" />
35-
<path
36-
android:fillColor="#00000000"
37-
android:pathData="M59,0L59,108"
38-
android:strokeWidth="0.8"
39-
android:strokeColor="#33FFFFFF" />
40-
<path
41-
android:fillColor="#00000000"
42-
android:pathData="M69,0L69,108"
43-
android:strokeWidth="0.8"
44-
android:strokeColor="#33FFFFFF" />
45-
<path
46-
android:fillColor="#00000000"
47-
android:pathData="M79,0L79,108"
48-
android:strokeWidth="0.8"
49-
android:strokeColor="#33FFFFFF" />
50-
<path
51-
android:fillColor="#00000000"
52-
android:pathData="M89,0L89,108"
53-
android:strokeWidth="0.8"
54-
android:strokeColor="#33FFFFFF" />
55-
<path
56-
android:fillColor="#00000000"
57-
android:pathData="M99,0L99,108"
58-
android:strokeWidth="0.8"
59-
android:strokeColor="#33FFFFFF" />
60-
<path
61-
android:fillColor="#00000000"
62-
android:pathData="M0,9L108,9"
63-
android:strokeWidth="0.8"
64-
android:strokeColor="#33FFFFFF" />
65-
<path
66-
android:fillColor="#00000000"
67-
android:pathData="M0,19L108,19"
68-
android:strokeWidth="0.8"
69-
android:strokeColor="#33FFFFFF" />
70-
<path
71-
android:fillColor="#00000000"
72-
android:pathData="M0,29L108,29"
73-
android:strokeWidth="0.8"
74-
android:strokeColor="#33FFFFFF" />
75-
<path
76-
android:fillColor="#00000000"
77-
android:pathData="M0,39L108,39"
78-
android:strokeWidth="0.8"
79-
android:strokeColor="#33FFFFFF" />
80-
<path
81-
android:fillColor="#00000000"
82-
android:pathData="M0,49L108,49"
83-
android:strokeWidth="0.8"
84-
android:strokeColor="#33FFFFFF" />
85-
<path
86-
android:fillColor="#00000000"
87-
android:pathData="M0,59L108,59"
88-
android:strokeWidth="0.8"
89-
android:strokeColor="#33FFFFFF" />
90-
<path
91-
android:fillColor="#00000000"
92-
android:pathData="M0,69L108,69"
93-
android:strokeWidth="0.8"
94-
android:strokeColor="#33FFFFFF" />
95-
<path
96-
android:fillColor="#00000000"
97-
android:pathData="M0,79L108,79"
98-
android:strokeWidth="0.8"
99-
android:strokeColor="#33FFFFFF" />
100-
<path
101-
android:fillColor="#00000000"
102-
android:pathData="M0,89L108,89"
103-
android:strokeWidth="0.8"
104-
android:strokeColor="#33FFFFFF" />
105-
<path
106-
android:fillColor="#00000000"
107-
android:pathData="M0,99L108,99"
108-
android:strokeWidth="0.8"
109-
android:strokeColor="#33FFFFFF" />
110-
<path
111-
android:fillColor="#00000000"
112-
android:pathData="M19,29L89,29"
113-
android:strokeWidth="0.8"
114-
android:strokeColor="#33FFFFFF" />
115-
<path
116-
android:fillColor="#00000000"
117-
android:pathData="M19,39L89,39"
118-
android:strokeWidth="0.8"
119-
android:strokeColor="#33FFFFFF" />
120-
<path
121-
android:fillColor="#00000000"
122-
android:pathData="M19,49L89,49"
123-
android:strokeWidth="0.8"
124-
android:strokeColor="#33FFFFFF" />
125-
<path
126-
android:fillColor="#00000000"
127-
android:pathData="M19,59L89,59"
128-
android:strokeWidth="0.8"
129-
android:strokeColor="#33FFFFFF" />
130-
<path
131-
android:fillColor="#00000000"
132-
android:pathData="M19,69L89,69"
133-
android:strokeWidth="0.8"
134-
android:strokeColor="#33FFFFFF" />
135-
<path
136-
android:fillColor="#00000000"
137-
android:pathData="M19,79L89,79"
138-
android:strokeWidth="0.8"
139-
android:strokeColor="#33FFFFFF" />
140-
<path
141-
android:fillColor="#00000000"
142-
android:pathData="M29,19L29,89"
143-
android:strokeWidth="0.8"
144-
android:strokeColor="#33FFFFFF" />
145-
<path
146-
android:fillColor="#00000000"
147-
android:pathData="M39,19L39,89"
148-
android:strokeWidth="0.8"
149-
android:strokeColor="#33FFFFFF" />
150-
<path
151-
android:fillColor="#00000000"
152-
android:pathData="M49,19L49,89"
153-
android:strokeWidth="0.8"
154-
android:strokeColor="#33FFFFFF" />
155-
<path
156-
android:fillColor="#00000000"
157-
android:pathData="M59,19L59,89"
158-
android:strokeWidth="0.8"
159-
android:strokeColor="#33FFFFFF" />
160-
<path
161-
android:fillColor="#00000000"
162-
android:pathData="M69,19L69,89"
163-
android:strokeWidth="0.8"
164-
android:strokeColor="#33FFFFFF" />
165-
<path
166-
android:fillColor="#00000000"
167-
android:pathData="M79,19L79,89"
168-
android:strokeWidth="0.8"
169-
android:strokeColor="#33FFFFFF" />
17010
</vector>

app/src/main/res/drawable/ic_logo.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<vector android:height="131.25dp" android:viewportHeight="210"
2+
android:viewportWidth="440" android:width="275dp" xmlns:android="http://schemas.android.com/apk/res/android">
3+
<path android:fillColor="#222222" android:fillType="evenOdd" android:pathData="M105,30H335C376.42,30 410,63.58 410,105C410,146.42 376.42,180 335,180H105C68.72,180 38.46,154.24 31.5,120.01L89.75,121C98.03,121.14 104.86,114.54 105,106.25C105.14,97.97 98.54,91.14 90.25,91L31.5,90.01C38.45,55.77 68.71,30 105,30ZM0,105C0,47.01 47.01,0 105,0H335C392.99,0 440,47.01 440,105C440,162.99 392.99,210 335,210H105C47.01,210 0,162.99 0,105ZM331.5,42H240V169H331.5C366.57,169 395,140.57 395,105.5C395,70.43 366.57,42 331.5,42ZM141.22,50.04C137.08,45.38 130.5,43.77 124.67,45.98C118.85,48.19 115,53.77 115,60V151C115,159.28 121.72,166 130,166C138.28,166 145,159.28 145,151V99.48L157.49,113.54C160.3,116.71 164.32,118.54 168.55,118.58C172.79,118.63 176.84,116.88 179.72,113.77L194,98.32V151C194,159.28 200.72,166 209,166C217.28,166 224,159.28 224,151V60C224,53.83 220.22,48.28 214.47,46.03C208.72,43.78 202.18,45.28 197.99,49.82L168.93,81.25L141.22,50.04Z"/>
4+
</vector>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
33
<item android:drawable="@android:color/white"/>
4-
<item android:drawable="@mipmap/ic_launcher" android:gravity="center"/>
4+
<item android:drawable="@drawable/ic_logo" android:gravity="center"/>
55
</layer-list>
1.4 KB
Loading
-1.86 KB
Binary file not shown.
Loading
Binary file not shown.
Loading
-2.82 KB
Binary file not shown.
Loading
Binary file not shown.
2.65 KB
Loading
-3.75 KB
Binary file not shown.
Loading
Binary file not shown.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
Copyright 2022 emo Project
4+
5+
Licensed under the Apache License, Version 2.0 (the "License");
6+
you may not use this file except in compliance with the License.
7+
You may obtain a copy of the License at
8+
9+
http://www.apache.org/licenses/LICENSE-2.0
10+
11+
Unless required by applicable law or agreed to in writing, software
12+
distributed under the License is distributed on an "AS IS" BASIS,
13+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
See the License for the specific language governing permissions and
15+
limitations under the License.
16+
-->
17+
<resources>
18+
19+
<style name="Theme.Emo" parent="Theme.Material3.DayNight.NoActionBar">
20+
<item name="android:statusBarColor">@android:color/transparent</item>
21+
<item name="android:windowLightStatusBar">?attr/isLightTheme</item>
22+
</style>
23+
</resources>
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
Copyright 2022 emo Project
4+
5+
Licensed under the Apache License, Version 2.0 (the "License");
6+
you may not use this file except in compliance with the License.
7+
You may obtain a copy of the License at
8+
9+
http://www.apache.org/licenses/LICENSE-2.0
10+
11+
Unless required by applicable law or agreed to in writing, software
12+
distributed under the License is distributed on an "AS IS" BASIS,
13+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
See the License for the specific language governing permissions and
15+
limitations under the License.
16+
-->
17+
<resources>
18+
19+
<style name="Theme.Emo" parent="Theme.Material3.DayNight.NoActionBar">
20+
<item name="android:statusBarColor">@android:color/transparent</item>
21+
<item name="android:windowLightStatusBar">?attr/isLightTheme</item>
22+
<item name="android:navigationBarColor">@android:color/transparent</item>
23+
<item name="android:windowLightNavigationBar">?attr/isLightTheme</item>
24+
</style>
25+
</resources>

app/src/main/res/values/strings.xml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
Copyright 2022 emo Project
4+
5+
Licensed under the Apache License, Version 2.0 (the "License");
6+
you may not use this file except in compliance with the License.
7+
You may obtain a copy of the License at
8+
9+
http://www.apache.org/licenses/LICENSE-2.0
10+
11+
Unless required by applicable law or agreed to in writing, software
12+
distributed under the License is distributed on an "AS IS" BASIS,
13+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
See the License for the specific language governing permissions and
15+
limitations under the License.
16+
-->
117
<resources>
218
<string name="app_name">emo</string>
319
<string name="component">Component</string>

app/src/main/res/values/themes.xml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,23 @@
11
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
Copyright 2022 emo Project
4+
5+
Licensed under the Apache License, Version 2.0 (the "License");
6+
you may not use this file except in compliance with the License.
7+
You may obtain a copy of the License at
8+
9+
http://www.apache.org/licenses/LICENSE-2.0
10+
11+
Unless required by applicable law or agreed to in writing, software
12+
distributed under the License is distributed on an "AS IS" BASIS,
13+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
See the License for the specific language governing permissions and
15+
limitations under the License.
16+
-->
217
<resources>
318

419
<style name="Theme.Emo" parent="Theme.Material3.DayNight.NoActionBar">
5-
<item name="android:statusBarColor">@android:color/transparent</item>
6-
<item name="android:navigationBarColor">@android:color/transparent</item>
20+
<item name="android:statusBarColor">#4D000000</item>
721
</style>
822

923
<style name="Theme.Emo.Main">

0 commit comments

Comments
 (0)