Skip to content

Commit 9fe7d57

Browse files
author
Damahe Code
committed
Initial commit
1 parent ebb0850 commit 9fe7d57

File tree

137 files changed

+58869
-1649
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

137 files changed

+58869
-1649
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,11 @@ A Collection on all Jetpack compose UI Layouts, Demo screens to see it's potenti
5252
```more features coming soon```
5353

5454
## Screenshots
55+
<!--
5556
| <img src="assets/screenshots/preference-screen.png" width="200"/> | <img src="assets/screenshots/preference-screen-dark.png" width="200"/> | <img src="assets/screenshots/profile-screen.png" width="200"/> | <img src="assets/screenshots/template-screen.png" width="200"/> |
5657
|:---:|:---:|:---:|:---:|
5758
| Preference Screen | Preference Screen Dark | Profile Screen | Template Screen |
59+
-->
5860

5961

6062

app/build.gradle.kts

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
/*
2+
* Copyright (c) 2024 damahecode.
3+
*
4+
* This program is free software; you can redistribute it and/or
5+
* modify it under the terms of the GNU General Public License
6+
* as published by the Free Software Foundation; either version 2
7+
* of the License, or (at your option) any later version.
8+
*
9+
* This program is distributed in the hope that it will be useful,
10+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
* GNU General Public License for more details.
13+
*
14+
* You should have received a copy of the GNU General Public License
15+
* along with this program; if not, write to the Free Software
16+
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17+
*/
18+
119
plugins {
220
alias(libs.plugins.androidApplication)
321
alias(libs.plugins.kotlinAndroid)
@@ -13,8 +31,8 @@ android {
1331
applicationId = "com.code.damahe.jetpack.compose.ui"
1432
minSdk = libs.versions.minSdk.get().toInt()
1533
targetSdk = libs.versions.targetSdk.get().toInt()
16-
versionCode = 121
17-
versionName = "1.2.1"
34+
versionCode = 123
35+
versionName = "1.2.3"
1836

1937
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
2038
vectorDrawables {
@@ -67,18 +85,16 @@ dependencies {
6785

6886
implementation(project(":core:resource"))
6987
implementation(project(":material-theme"))
70-
implementation(project(":core:preference"))
71-
implementation(project(":core:feature"))
88+
implementation(project(":core:system"))
89+
implementation(project(":core:ui"))
7290

7391
implementation(libs.androidx.activity.compose)
7492
implementation(libs.androidx.core.splashscreen)
7593
implementation(libs.androidx.compose.ui.tooling.preview)
7694
debugImplementation(libs.androidx.compose.ui.tooling)
95+
implementation(libs.accompanist.adaptive)
7796
implementation(libs.androidx.compose.material3)
7897
implementation(libs.androidx.compose.material3.window.size)
79-
implementation(libs.accompanist.systemuicontroller)
80-
implementation(libs.androidx.navigation.compose)
81-
implementation(libs.androidx.tracing.ktx)
8298

8399
implementation(libs.hilt.android)
84100
ksp(libs.hilt.android.compiler)

app/src/androidTest/java/com/code/damahe/ExampleInstrumentedTest.kt

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
/*
2+
* Copyright (c) 2024 damahecode.
3+
*
4+
* This program is free software; you can redistribute it and/or
5+
* modify it under the terms of the GNU General Public License
6+
* as published by the Free Software Foundation; either version 2
7+
* of the License, or (at your option) any later version.
8+
*
9+
* This program is distributed in the hope that it will be useful,
10+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
* GNU General Public License for more details.
13+
*
14+
* You should have received a copy of the GNU General Public License
15+
* along with this program; if not, write to the Free Software
16+
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17+
*/
18+
119
package com.code.damahe
220

321
import androidx.test.platform.app.InstrumentationRegistry
@@ -19,6 +37,6 @@ class ExampleInstrumentedTest {
1937
fun useAppContext() {
2038
// Context of the app under test.
2139
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
22-
assertEquals("com.example.myapplication", appContext.packageName)
40+
assertEquals("com.code.damahe", appContext.packageName)
2341
}
2442
}

app/src/main/AndroidManifest.xml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,6 @@
2020
</intent-filter>
2121
</activity>
2222

23-
<activity
24-
android:name="com.code.damahe.activity.PreferenceActivity"
25-
android:theme="@style/Theme.DCode.Material"
26-
android:exported="true">
27-
</activity>
2823
</application>
2924

3025
</manifest>
Lines changed: 45 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,43 @@
1+
/*
2+
* Copyright (c) 2024 damahecode.
3+
*
4+
* This program is free software; you can redistribute it and/or
5+
* modify it under the terms of the GNU General Public License
6+
* as published by the Free Software Foundation; either version 2
7+
* of the License, or (at your option) any later version.
8+
*
9+
* This program is distributed in the hope that it will be useful,
10+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
* GNU General Public License for more details.
13+
*
14+
* You should have received a copy of the GNU General Public License
15+
* along with this program; if not, write to the Free Software
16+
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17+
*/
18+
119
package com.code.damahe.activity
220

21+
import android.content.res.Configuration
322
import android.os.Bundle
423
import androidx.activity.compose.setContent
524
import androidx.compose.material3.windowsizeclass.ExperimentalMaterial3WindowSizeClassApi
625
import androidx.compose.material3.windowsizeclass.calculateWindowSizeClass
26+
import androidx.compose.runtime.Composable
27+
import androidx.compose.ui.tooling.preview.Preview
728
import androidx.core.splashscreen.SplashScreen.Companion.installSplashScreen
829
import androidx.core.view.WindowCompat
9-
import com.code.damahe.app.Activity
10-
import com.code.damahe.app.MainContent
30+
import com.code.damahe.material.app.DCodeActivity
31+
import com.code.damahe.material.app.MainContent
32+
import com.code.damahe.material.theme.DCodeAppTheme
1133
import com.code.damahe.material.viewmodel.ThemeUiState.Loading
1234
import com.code.damahe.material.viewmodel.ThemeUiState.Success
13-
import com.code.damahe.screen.NavMainScreen
35+
import com.code.damahe.ui.screen.MainScreen
36+
import com.google.accompanist.adaptive.calculateDisplayFeatures
1437

15-
@OptIn(ExperimentalMaterial3WindowSizeClassApi::class)
16-
class MainActivity : Activity() {
38+
class MainActivity : DCodeActivity() {
1739

40+
@OptIn(ExperimentalMaterial3WindowSizeClassApi::class)
1841
override fun onCreate(savedInstanceState: Bundle?) {
1942
val splashScreen = installSplashScreen()
2043
super.onCreate(savedInstanceState)
@@ -26,7 +49,6 @@ class MainActivity : Activity() {
2649
when (themeUiState) {
2750
Loading -> true
2851
is Success -> false
29-
else -> false
3052
}
3153
}
3254

@@ -36,12 +58,27 @@ class MainActivity : Activity() {
3658

3759
setContent {
3860
MainContent(themeUiState = themeUiState) {
39-
NavMainScreen(
40-
windowSizeClass = calculateWindowSizeClass(this)
61+
val windowSize = calculateWindowSizeClass(this)
62+
val displayFeatures = calculateDisplayFeatures(this)
63+
64+
MainScreen(
65+
windowSize = windowSize,
66+
displayFeatures = displayFeatures
4167
)
4268
}
4369
}
4470
}
4571
}
4672

4773

74+
@Preview(
75+
showSystemUi = true,
76+
uiMode = Configuration.UI_MODE_NIGHT_NO,
77+
showBackground = true,
78+
)
79+
@Composable
80+
fun PreviewScreen() {
81+
DCodeAppTheme {
82+
//MainScreen()
83+
}
84+
}

app/src/main/java/com/code/damahe/activity/PreferenceActivity.kt

Lines changed: 0 additions & 26 deletions
This file was deleted.

app/src/main/java/com/code/damahe/navigation/NavAppState.kt

Lines changed: 0 additions & 108 deletions
This file was deleted.

app/src/main/java/com/code/damahe/navigation/main/MainBottomNavDest.kt

Lines changed: 0 additions & 25 deletions
This file was deleted.

0 commit comments

Comments
 (0)