fixed dark mode issues
This commit is contained in:
@@ -6,6 +6,7 @@ import android.util.Log
|
||||
import android.view.View
|
||||
import android.widget.Toast
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.appcompat.app.AppCompatDelegate
|
||||
import androidx.lifecycle.lifecycleScope
|
||||
import kotlinx.coroutines.launch
|
||||
import sh.sar.gridflow.databinding.ActivityLoginBinding
|
||||
@@ -26,6 +27,9 @@ class LoginActivity : AppCompatActivity() {
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
|
||||
// Force system theme (follows device dark mode setting)
|
||||
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM)
|
||||
|
||||
Log.d(TAG, "LoginActivity onCreate")
|
||||
|
||||
binding = ActivityLoginBinding.inflate(layoutInflater)
|
||||
|
@@ -4,6 +4,7 @@ import android.os.Bundle
|
||||
import android.view.Menu
|
||||
import android.widget.TextView
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.appcompat.app.AppCompatDelegate
|
||||
import androidx.drawerlayout.widget.DrawerLayout
|
||||
import androidx.navigation.findNavController
|
||||
import androidx.navigation.ui.AppBarConfiguration
|
||||
@@ -22,6 +23,9 @@ class MainActivity : AppCompatActivity() {
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
|
||||
// Force system theme (follows device dark mode setting)
|
||||
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM)
|
||||
|
||||
binding = ActivityMainBinding.inflate(layoutInflater)
|
||||
setContentView(binding.root)
|
||||
|
@@ -4,7 +4,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fillViewport="true"
|
||||
android:background="@color/white">
|
||||
android:background="?android:attr/colorBackground">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
@@ -35,7 +35,7 @@
|
||||
android:text="GridFlow"
|
||||
android:textSize="28sp"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@color/black"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
android:layout_marginBottom="8dp" />
|
||||
|
||||
<TextView
|
||||
@@ -43,7 +43,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Your Personal Fenaka Client"
|
||||
android:textSize="14sp"
|
||||
android:textColor="@color/black"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
android:alpha="0.7" />
|
||||
|
||||
</LinearLayout>
|
||||
@@ -150,7 +150,7 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@color/black"
|
||||
android:background="?android:attr/textColorSecondary"
|
||||
android:alpha="0.3" />
|
||||
|
||||
<TextView
|
||||
@@ -158,7 +158,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:text="OR"
|
||||
android:textSize="14sp"
|
||||
android:textColor="@color/black"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
android:alpha="0.7"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp" />
|
||||
@@ -167,7 +167,7 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@color/black"
|
||||
android:background="?android:attr/textColorSecondary"
|
||||
android:alpha="0.3" />
|
||||
|
||||
</LinearLayout>
|
||||
|
@@ -5,6 +5,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fillViewport="true"
|
||||
android:background="?android:attr/colorBackground"
|
||||
tools:context=".ui.home.HomeFragment">
|
||||
|
||||
<LinearLayout
|
||||
@@ -21,7 +22,7 @@
|
||||
android:layout_marginBottom="24dp"
|
||||
android:textSize="24sp"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@color/black"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
android:lineSpacingExtra="4dp"
|
||||
tools:text="Welcome\nShihaam Abdul Rahman" />
|
||||
|
||||
@@ -32,14 +33,14 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="24dp"
|
||||
app:cardCornerRadius="12dp"
|
||||
app:cardElevation="2dp"
|
||||
app:cardBackgroundColor="#E8F5E8">
|
||||
app:cardElevation="2dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:padding="16dp"
|
||||
android:background="#E8F5E8"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
@@ -69,8 +70,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:text="More features coming soon..."
|
||||
android:textSize="14sp"
|
||||
android:textColor="@color/black"
|
||||
android:alpha="0.6"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
android:gravity="center"
|
||||
android:layout_marginTop="32dp" />
|
||||
|
||||
|
Reference in New Issue
Block a user