Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes 2 #18

Merged
merged 33 commits into from
May 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
c85d683
changes data from app and refactoring
MalaRuparel2023 May 22, 2024
5367e60
changes Screenshot using primary color
MalaRuparel2023 May 23, 2024
7d3195c
sonar lint issue solve
MalaRuparel2023 May 23, 2024
fbe2d40
sonar lint issue solve
MalaRuparel2023 May 23, 2024
a29d191
sonar lint issue solve
MalaRuparel2023 May 24, 2024
cc5ed74
sonar lint issue solve
MalaRuparel2023 May 24, 2024
866c593
update gif
MalaRuparel2023 May 27, 2024
f6cacb7
update README.md
MalaRuparel2023 May 28, 2024
207edf5
update README.md
MalaRuparel2023 May 28, 2024
ae9f24b
update README.md
MalaRuparel2023 May 28, 2024
db39d2f
update README.md
MalaRuparel2023 May 28, 2024
56ea6df
update README.md
MalaRuparel2023 May 28, 2024
053ff46
update README.md
MalaRuparel2023 May 28, 2024
008b506
update README.md
MalaRuparel2023 May 28, 2024
3c70811
Update README.md
MalaRuparel2023 May 28, 2024
4fc669d
Update README.md
MalaRuparel2023 May 28, 2024
3b541f3
Update README.md
MalaRuparel2023 May 28, 2024
4914ba5
Update README.md
MalaRuparel2023 May 28, 2024
5438db2
Update README.md
MalaRuparel2023 May 28, 2024
e9b35e9
resolve conflict README.md
MalaRuparel2023 May 28, 2024
cd5ef0f
resolve theme issue
MalaRuparel2023 May 28, 2024
dfa0ec1
Merge remote-tracking branch 'origin/changes_2' into changes_2
MalaRuparel2023 May 28, 2024
e971c26
resolve theme issue
MalaRuparel2023 May 28, 2024
2a1b08e
Merge branch 'changes_2' into development
MalaRuparel2023 May 28, 2024
1c2e60f
Revert "resolve theme issue"
May 29, 2024
09cb3c3
Revert "resolve theme issue"
May 29, 2024
aab54f2
Revert "Revert "resolve theme issue""
sagarsmartsense May 29, 2024
4481184
Revert "Revert "resolve theme issue""
sagarsmartsense May 29, 2024
e632db7
Revert "resolve theme issue"
May 29, 2024
21a5390
Revert "resolve theme issue"
May 29, 2024
9ed06a7
Revert "Revert "resolve theme issue""
sagarsmartsense May 29, 2024
a5cf8fe
Revert "Revert "resolve theme issue""
sagarsmartsense May 29, 2024
ebc8c35
Merge remote-tracking branch 'origin/changes_2' into changes_2
MalaRuparel2023 May 29, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
408 changes: 240 additions & 168 deletions README.md

Large diffs are not rendered by default.

16 changes: 9 additions & 7 deletions app/src/main/java/com/ss/smartfilter/MainActivity.kt
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
package com.ss.smartfilter

import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import com.ss.smartfilter.databinding.ActivityMainBinding
import androidx.appcompat.app.AppCompatActivity
import androidx.compose.material3.Surface
import com.ss.smartfilter.screens.FilterScreen
import com.ss.smartfilterlib.SmartFilter
import com.ss.smartfilterlib.utils.toast
import com.ss.smartfilter.theme.smartFilterTheme


class MainActivity : ComponentActivity() {
private lateinit var binding: ActivityMainBinding
class MainActivity : AppCompatActivity() {

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContent {
FilterScreen()
smartFilterTheme() {
Surface {
FilterScreen()
}
}
}
}

Expand Down
11 changes: 4 additions & 7 deletions app/src/main/java/com/ss/smartfilter/theme/Color.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@ package com.ss.smartfilter.theme

import androidx.compose.ui.graphics.Color

val Purple80 = Color(0xFFD0BCFF)
val PurpleGrey80 = Color(0xFFCCC2DC)
val Pink80 = Color(0xFFEFB8C8)

val Purple40 = Color(0xFF6650a4)
val PurpleGrey40 = Color(0xFF625b71)
val Pink40 = Color(0xFF7D5260)
val purple200 = Color(0xFFBB86FC)
val purple500 = Color(0xFF6200EE)
val purple700 = Color(0xFF3700B3)
val teal200 = Color(0xFF03DAC5)
61 changes: 52 additions & 9 deletions app/src/main/java/com/ss/smartfilter/theme/Theme.kt
Original file line number Diff line number Diff line change
@@ -1,19 +1,62 @@
package com.ss.smartfilter.theme

import android.os.Build
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.darkColorScheme
import androidx.compose.material3.dynamicDarkColorScheme
import androidx.compose.material3.dynamicLightColorScheme
import androidx.compose.material3.lightColorScheme
import androidx.compose.runtime.Composable
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.platform.LocalContext

private val DarkColorScheme = darkColorScheme(
primary = Purple80,
secondary = PurpleGrey80,
tertiary = Pink80
private val DarkColorPalette = darkColorScheme(
primary = purple200,
secondary = teal200,
tertiary = purple700,
error = Color(0xFFB3261E),
background = Color(0xFF1C1B1F),
surface = Color(0xFF201F24),
onPrimary = Color.Black,
onSecondary = Color.White,
onBackground = Color(0xFFE6E1E5),
onSurface = Color(0xFFE6E1E5),
onError = Color.White
)

private val LightColorScheme = lightColorScheme(
primary = Purple40,
secondary = PurpleGrey40,
tertiary = Pink40

private val LightColorPalette = lightColorScheme(
primary = purple500,
secondary = teal200,
tertiary = purple700,
error = Color(0xFFF2B8B5),
surface = Color(0xFFE6E1E5),
background = Color(0xFFE6E1E5),
onPrimary = Color.White,
onSecondary = Color.White,
onBackground = Color(0xFF201F24),
onSurface = Color(0xFF201F24),
onError = Color(0xFF601410)
)

@Composable
fun smartFilterTheme(
darkTheme: Boolean = false,
dynamicColor: Boolean = true,
content: @Composable () -> Unit
) {
val colorScheme = when {
dynamicColor && Build.VERSION.SDK_INT >= Build.VERSION_CODES.S -> {
val context = LocalContext.current
if (darkTheme) dynamicDarkColorScheme(context) else dynamicLightColorScheme(context)
}

darkTheme -> DarkColorPalette
else -> LightColorPalette
}

MaterialTheme(
colorScheme = colorScheme,
typography = Typography,
content = content
)
}
2 changes: 1 addition & 1 deletion app/src/main/res/values-night/themes.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<resources xmlns:tools="http://schemas.android.com/tools">
<!-- Base application theme. -->
<style name="Theme.MultiLineRadioGroup" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
<style name="Theme.SmartFilter" parent="Theme.MaterialComponents.DayNight.NoActionBar">
<!-- Primary brand color. -->
<item name="colorPrimary">@color/purple_200</item>
<item name="colorPrimaryVariant">@color/colorPrimaryVariant</item>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values/themes.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>

<style name="Theme.SmartFilter" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
<style name="Theme.SmartFilter" parent="Theme.MaterialComponents.DayNight.NoActionBar">
<!-- Primary brand color. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryVariant">@color/colorPrimaryVariant</item>
Expand Down
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Binary file added preview/mad_score.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">

<solid android:color="@android:color/transparent" />
<solid android:color="@android:color/white" />

<stroke
android:width="1dp"
Expand Down
2 changes: 1 addition & 1 deletion ss-smart-filter/src/main/res/drawable/row_item_default.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@android:color/transparent" />
<solid android:color="@android:color/white" />
<stroke
android:width="0.2dp"
android:color="@color/white" />
Expand Down
Loading