Skip to content

Commit 9e14073

Browse files
committed
feat: splash screen and app icon
1 parent da2f8d6 commit 9e14073

23 files changed

+80
-8
lines changed

app/build.gradle.kts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,4 +95,7 @@ dependencies {
9595

9696
// RecyclerView
9797
implementation(libs.androidx.recyclerview)
98+
99+
// Splash
100+
implementation(libs.androidx.splashscreen)
98101
}

app/src/main/AndroidManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
android:networkSecurityConfig="@xml/network_security_config"
1515
android:roundIcon="@mipmap/ic_launcher_round"
1616
android:supportsRtl="true"
17-
android:theme="@style/Theme.GetirLite"
17+
android:theme="@style/Theme.Getir.Splash"
1818
tools:targetApi="31">
1919
<activity
2020
android:name=".MainActivity"
143 KB
Loading

app/src/main/java/com/patika/getir_lite/MainActivity.kt

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import androidx.activity.SystemBarStyle
55
import androidx.activity.enableEdgeToEdge
66
import androidx.activity.viewModels
77
import androidx.appcompat.app.AppCompatActivity
8+
import androidx.core.splashscreen.SplashScreen.Companion.installSplashScreen
89
import androidx.core.view.ViewCompat
910
import androidx.core.view.WindowCompat
1011
import androidx.core.view.WindowInsetsCompat
@@ -13,24 +14,36 @@ import dagger.hilt.android.AndroidEntryPoint
1314
@AndroidEntryPoint
1415
class MainActivity : AppCompatActivity() {
1516

17+
/**
18+
* ViewModel providing data and functionality to the UI. It is lazily initialized
19+
* the first time it is used.
20+
*/
1621
private val productViewModel: ProductViewModel by viewModels()
1722

1823
override fun onCreate(savedInstanceState: Bundle?) {
24+
installSplashScreen()
25+
1926
super.onCreate(savedInstanceState)
2027
setContentView(R.layout.activity_main)
21-
productViewModel.initializeProductData()
2228
enableEdgeToEdge(
2329
statusBarStyle = SystemBarStyle.light(
2430
getColor(R.color.md_theme_light_primary),
2531
getColor(R.color.md_theme_light_surface),
2632
)
2733
)
34+
35+
productViewModel.initializeProductData()
36+
2837
WindowCompat.getInsetsController(window, window.decorView).isAppearanceLightStatusBars =
2938
false
3039

3140
handleInsets()
3241
}
3342

43+
/**
44+
* Handles the application of window insets to adjust the padding of the main view,
45+
* ensuring it does not overlap with system bars.
46+
*/
3447
private fun handleInsets() {
3548
ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.main)) { v, insets ->
3649
val systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars())
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
<vector xmlns:android="http://schemas.android.com/apk/res/android"
2+
android:width="200dp"
3+
android:height="200dp"
4+
android:viewportWidth="1000"
5+
android:viewportHeight="1000">
6+
7+
<group
8+
android:name="appIconGroup"
9+
android:pivotX="500"
10+
android:pivotY="500"
11+
android:scaleX="0.60"
12+
android:scaleY="0.60">
13+
14+
<path
15+
android:fillColor="#5D3EBB"
16+
android:pathData="M548,26C549.8,26.2 549.8,26.2 551.6,26.4C621.1,33.8 688.3,56.7 748,93C749.1,93.7 749.1,93.7 750.3,94.4C765.6,103.6 780.1,113.9 794,125C794.6,125.5 795.3,126 795.9,126.5C803.9,132.9 811.7,139.4 819.2,146.4C821.3,148.4 823.5,150.3 825.7,152.2C830.9,156.7 835.7,161.6 840.6,166.4C841.9,167.8 841.9,167.8 843.3,169.2C848.4,174.3 853.3,179.5 858,185C858.9,186.1 859.9,187.2 860.9,188.2C868.7,197.2 875.9,206.5 883,216C883.5,216.7 884.1,217.5 884.6,218.2C897.9,236 909.3,254.7 920,274C920.4,274.7 920.8,275.5 921.3,276.3C953.6,333.9 971.8,401.2 976,467C976.1,467.9 976.1,468.8 976.2,469.7C982,565.9 959.8,663.9 878,792C877.3,792.9 876.6,793.8 875.9,794.7C867.6,805.2 859,815.2 850,825C849.5,825.5 849,826.1 848.5,826.6C782,900 688.7,951.1 580.1,971.3C579.4,971.4 578.7,971.5 578,971.6C553,975.9 527.9,977.6 502.5,977.4C500.5,977.4 498.4,977.4 496.3,977.4C474,977.4 452,976.5 430,973C429.3,972.9 428.6,972.8 427.9,972.7C341.7,959.3 260.9,922.9 194,867C193.5,866.6 193,866.1 192.4,865.7C176.8,852.6 161.1,838.7 147.8,823.1C145.7,820.6 143.5,818.3 141.3,815.9C136,810.1 131.2,804.1 126.5,797.9C125,795.9 123.4,794 121.8,792C66.3,723 34.5,636.2 23,517C23,515.9 23,514.8 22.9,513.6C22.3,474.4 25.6,435.4 34,397C34.2,395.9 34.5,394.8 34.7,393.7C45.8,344.1 65.5,296.4 92,253C92.5,252.2 92.9,251.5 93.4,250.7C108.1,226.3 125.5,203.6 144.7,182.5C146,181.1 147.2,179.7 148.4,178.3C153.3,172.6 158.6,167.3 163.9,162C165.4,160.4 166.9,158.9 168.5,157.4C173.8,152.1 179.2,146.9 185,142C186.1,141 187.3,140 188.4,139C196,132.4 203.9,126 212,120C213,119.2 213,119.2 214,118.5C224.8,110.6 235.7,103.1 247,96C247.6,95.6 248.2,95.2 248.8,94.8C331.1,43.7 425.7,21 548,26Z" />
17+
18+
<path
19+
android:fillColor="#FDCF0E"
20+
android:pathData="M290.3,422.5C306.7,436.1 313.7,455.5 317,476C317.2,477 317.3,478.1 317.5,479.1C318.1,483.6 318.2,487.9 318.2,492.4C318.2,493.4 318.2,494.3 318.2,495.2C318.2,498.3 318.2,501.3 318.2,504.3C318.2,505.4 318.2,506.4 318.3,507.5C318.3,513.1 318.3,518.6 318.3,524.2C318.3,529.9 318.3,535.5 318.4,541.2C318.4,545.6 318.4,550.1 318.4,554.5C318.4,556.6 318.4,558.6 318.5,560.7C318.7,585.2 315.9,610.4 300,630C299.5,630.7 299,631.4 298.5,632.1C287.9,645.7 269.7,652.1 253.2,654.6C241.9,655.9 230.1,655.7 219,653C218.1,652.8 217.2,652.7 216.3,652.5C201.5,649.4 187.8,642.3 176,633C175.2,632.4 174.4,631.8 173.6,631.1C170.4,628.3 169.1,627 168.7,622.7C171.7,614.1 176,607.6 184,603C193.2,599.9 199.9,603.3 208.1,607.4C218.4,612.4 226.4,615.4 237.9,615.3C238.9,615.3 239.8,615.3 240.8,615.4C249.2,615.4 256.1,613.7 262.4,607.9C271.3,597.6 271.3,584.8 271.1,571.9C271.1,570.6 271.1,569.2 271.1,567.9C271.1,564.6 271,561.3 271,558C270.4,558.4 269.7,558.8 269,559.2C251.7,569.8 232.3,572.6 212.2,568.1C208.6,567 205.4,565.7 202,564C200.9,563.5 199.9,562.9 198.8,562.4C182,553.3 170.2,537.8 164.3,519.8C163,515.2 161.9,510.6 161,506C160.8,505.2 160.6,504.4 160.5,503.6C159.6,498.9 159.8,494.1 159.8,489.3C159.8,488.3 159.8,487.2 159.8,486.2C159.8,479.5 160.4,473.5 162,467C162.3,465.8 162.5,464.6 162.8,463.4C167.9,444.4 179.1,428.4 195.8,417.8C224.4,401.8 263.9,402 290.3,422.5Z" />
21+
22+
<path
23+
android:fillColor="#FDCF0E"
24+
android:pathData="M473.6,421.9C474.4,422.6 475.2,423.3 476,424C476.7,424.6 477.5,425.2 478.2,425.9C488.5,435.4 493.4,447.3 494.3,461.1C494.9,474.9 492,487.6 482.6,498C466.8,513.1 443.6,514.2 423.1,514.2C422,514.2 422,514.2 420.9,514.2C409.5,514.2 398.3,513.6 387,512C388.1,521.6 389.9,530.6 397.3,537.4C408.1,545.6 420.8,547.4 434,546C442.4,544.4 450.6,541.6 458.2,537.8C463.7,535.3 470.5,534.7 476.2,536.8C482.4,540.4 487.4,546.3 490,553C490.4,556.3 490.5,558.2 488.7,561C477.3,571 462.5,577.6 448,582C447.2,582.2 446.5,582.5 445.7,582.7C424.2,588.7 399.6,585.6 379.9,575.4C359,562.7 349,544 343,521C341.6,515.1 341.8,509.1 341.8,503C341.8,501 341.8,498.9 341.8,496.8C341.7,471.7 349.3,447.5 367.1,429.2C376.3,420.1 387.6,413.5 400,410C401,409.7 402,409.4 403.1,409.1C426.5,403.1 454.3,406.8 473.6,421.9Z" />
25+
26+
<path
27+
android:fillColor="#FDCF0E"
28+
android:pathData="M566,348C565.7,367.5 565.3,386.9 565,407C581.5,407 598,407 615,407C615,417.7 612.5,427.1 605,435C598.4,441.5 591.6,444.1 582.5,444.1C580.9,444.1 580.9,444.1 579.4,444.1C578.3,444.1 577.3,444.1 576.2,444.1C575.1,444.1 574,444.1 572.9,444C570.3,444 567.6,444 565,444C565.1,452.6 565.1,461.2 565.2,469.9C565.3,473.9 565.3,477.9 565.3,481.9C565.4,485.8 565.4,489.6 565.5,493.5C565.5,495 565.5,496.5 565.5,497.9C565.6,512.3 566.3,527.4 577.1,538.1C589,548.1 602.9,546.8 617.6,545.5C619.1,545.3 620.5,545.2 622,545C624.4,552.1 624.1,560.6 620.9,567.4C615.9,576.1 609.5,580.7 600,584C584.4,587.5 566,585.6 552,578C534.5,566.8 525.6,551 521,531C519.2,522.4 518.7,514.2 518.7,505.4C518.7,504.1 518.7,502.8 518.7,501.5C518.7,497.9 518.7,494.4 518.7,490.9C518.7,487.2 518.7,483.5 518.7,479.7C518.7,473.5 518.7,467.3 518.7,461C518.8,453.8 518.7,446.6 518.7,439.5C518.7,433.3 518.7,427.1 518.7,420.9C518.7,417.2 518.7,413.5 518.7,409.8C518.7,405.7 518.7,401.6 518.7,397.5C518.7,396.2 518.7,395 518.7,393.8C518.8,380.6 520.4,368.7 529.6,358.7C540,349 552.4,348 566,348Z" />
29+
30+
<path
31+
android:fillColor="#FDCF0E"
32+
android:pathData="M821.1,411.9C822.7,411.9 824.4,411.9 826,412C830,412 834,412 838,412C840.6,419.4 841.3,426.9 838.8,434.4C835.4,441.1 830.8,444.4 824,447C820.1,448.2 816.1,448.8 812,449.4C804.1,450.6 798.1,452 792.3,457.6C786.6,465.2 785.4,473.2 785.5,482.4C785.5,483.5 785.5,484.6 785.5,485.7C785.5,489.3 785.6,492.9 785.6,496.5C785.6,499 785.6,501.5 785.6,504C785.6,510.5 785.7,517.1 785.7,523.6C785.8,530.3 785.8,537 785.8,543.7C785.8,556.8 785.9,569.9 786,583C783.3,583 780.6,583.1 777.9,583.1C776.8,583.1 776.8,583.1 775.7,583.1C765.2,583.1 754.8,581.5 747,574C740.3,564.8 738.9,554.7 738.8,543.6C738.8,542.9 738.8,542.2 738.8,541.5C738.8,539.3 738.8,537 738.8,534.7C738.8,534 738.8,533.2 738.7,532.4C738.7,528.2 738.7,524 738.7,519.9C738.7,516.5 738.7,513.1 738.6,509.7C738.1,454.5 738.1,454.5 757.5,432.5C775.6,414.4 796.8,411.8 821.1,411.9Z" />
33+
34+
<path
35+
android:fillColor="#FED00D"
36+
android:pathData="M694,411C693.9,411.7 693.9,412.5 693.8,413.2C693.1,420.4 692.8,427.4 692.8,434.6C692.8,435.7 692.8,436.8 692.8,437.9C692.8,441.5 692.8,445 692.8,448.6C692.8,449.8 692.8,451 692.7,452.3C692.7,458.8 692.7,465.2 692.7,471.7C692.7,477 692.7,482.4 692.6,487.7C692.6,494.2 692.6,500.6 692.6,507.1C692.6,509.6 692.6,512 692.5,514.5C692.5,517.9 692.5,521.4 692.5,524.8C692.5,526.3 692.5,526.3 692.5,527.8C692.5,534.3 693.6,539.4 697,545C701.1,548.8 705.5,548.4 710.8,548.2C711.6,548.2 712.4,548.2 713.2,548.1C715.1,548.1 717.1,548.1 719,548C721.2,554.7 721.4,565.2 718.4,571.6C714.1,578.5 708.2,582 700.5,584.3C687.4,586.9 675.8,585.2 664.3,578.3C655.3,572 649.2,561.7 647,551C646.7,547.4 646.7,543.9 646.7,540.3C646.7,539.2 646.7,538.2 646.7,537.1C646.7,533.6 646.7,530.2 646.7,526.7C646.7,524.2 646.7,521.8 646.6,519.4C646.6,514.3 646.6,509.2 646.6,504.1C646.6,497.6 646.6,491.1 646.6,484.6C646.5,479.6 646.5,474.6 646.5,469.6C646.5,467.2 646.5,464.8 646.5,462.4C646.3,432.5 646.3,432.5 657.4,421.2C668.4,412 680.2,410.7 694,411Z" />
37+
38+
<path
39+
android:fillColor="#5E3FBA"
40+
android:pathData="M261,452C268.6,458.5 272,468.3 273,478C274,492.2 273.6,507.3 264.8,519.1C258.6,525.6 251.3,529.2 242.4,529.5C231.9,529.6 224.1,528.2 215.9,521.2C211.3,516.5 208.9,511.2 207,505C206.8,504.3 206.5,503.6 206.3,502.8C202.7,489.3 204.8,473.5 211.5,461.3C216,454.6 222.3,448.5 230.2,446.4C241.7,444.6 251.3,445.1 261,452Z" />
41+
42+
<path
43+
android:fillColor="#5E3FBA"
44+
android:pathData="M443.6,449.4C447.8,452.2 450.8,455.5 453,460C453.7,465 454.1,469.8 451.8,474.4C447.5,479.7 442.5,482.3 436,484C431.1,484.5 426.2,484.5 421.3,484.4C419.3,484.4 419.3,484.4 417.4,484.4C407.5,484.3 397.6,483.6 388,481C387.3,472 390.5,465 396,458C408.6,445.2 427.1,441.4 443.6,449.4Z" />
45+
46+
<path
47+
android:fillColor="#FDCF0F"
48+
android:pathData="M680.9,348.2C687.2,351.8 691.8,356 694.5,362.9C696.4,370.7 695.5,377.8 691.5,384.7C687.8,390.1 683.8,394.6 677.4,396.6C671.2,397.7 663.9,398.4 658.1,395.5C653.3,392.1 649.3,387.5 646.6,382.3C645.1,374 645.1,366.8 649.3,359.3C656.9,348.9 668.2,343.1 680.9,348.2Z" />
49+
</group>
50+
51+
</vector>
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
3-
<background android:drawable="@drawable/ic_launcher_background" />
4-
<foreground android:drawable="@drawable/ic_launcher_foreground" />
5-
<monochrome android:drawable="@drawable/ic_launcher_foreground" />
3+
<background android:drawable="@color/ic_launcher_background"/>
4+
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
65
</adaptive-icon>
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
3-
<background android:drawable="@drawable/ic_launcher_background" />
4-
<foreground android:drawable="@drawable/ic_launcher_foreground" />
5-
<monochrome android:drawable="@drawable/ic_launcher_foreground" />
3+
<background android:drawable="@color/ic_launcher_background"/>
4+
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
65
</adaptive-icon>
1014 Bytes
Loading
5.44 KB
Loading
1.62 KB
Loading

0 commit comments

Comments
 (0)