Skip to content

Commit

Permalink
Merge pull request #1463 from osodebailar/fix/fix-for-missing-actionb…
Browse files Browse the repository at this point in the history
…ar-and-wrong_number-picker-color

#1425 fix for missing Actionbar , wrong colors of numbepicker in profilhelper
  • Loading branch information
MilosKozak committed Mar 19, 2022
2 parents 3212e9d + 12656be commit e1bcad2
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 10 deletions.
2 changes: 0 additions & 2 deletions app/src/main/java/info/nightscout/androidaps/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,6 @@ class MainActivity : NoSplashAppCompatActivity() {

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
// temp while switch is not public
setTheme(R.style.AppTheme)
Iconify.with(FontAwesomeModule())
LocaleHelper.update(applicationContext)
binding = ActivityMainBinding.inflate(layoutInflater)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class ProfileHelperActivity : NoSplashAppCompatActivity() {

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)

setTheme(R.style.AppTheme)
binding = ActivityProfilehelperBinding.inflate(layoutInflater)
setContentView(binding.root)

Expand Down
7 changes: 5 additions & 2 deletions app/src/main/res/layout/activity_profilehelper.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:background="?attr/defaultbackground"
android:orientation="horizontal">

Expand Down Expand Up @@ -46,6 +45,7 @@
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:hint="@string/profiletype"
android:textColorHint="?attr/tabBgColorSelected"
app:boxStrokeColor="?attr/tabBgColorSelected">
Expand All @@ -54,7 +54,6 @@
android:id="@+id/profiletype"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:clickable="true"
android:cursorVisible="false"
android:focusable="false"
Expand Down Expand Up @@ -83,13 +82,15 @@
android:layout_width="150dp"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_marginTop="4dp"
android:text="@string/age"
android:textAppearance="@style/TextAppearance.AppCompat.Medium" />

<info.nightscout.androidaps.utils.ui.NumberPicker
android:id="@+id/age"
android:layout_width="130dp"
android:layout_height="40dp"
android:layout_marginTop="4dp"
android:layout_marginBottom="2dp"
app:customContentDescription="@string/age" />

Expand All @@ -106,13 +107,15 @@
android:layout_width="150dp"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_marginTop="1dp"
android:text="@string/tdd_total"
android:textAppearance="@style/TextAppearance.AppCompat.Medium" />

<info.nightscout.androidaps.utils.ui.NumberPicker
android:id="@+id/tdd"
android:layout_width="130dp"
android:layout_height="40dp"
android:layout_marginTop="1dp"
android:layout_marginBottom="2dp"
app:customContentDescription="@string/tdd_total" />

Expand Down
4 changes: 2 additions & 2 deletions core/src/main/res/values-night/styles.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:ns2="http://schemas.android.com/tools">

<style name="AppTheme" parent="Theme.MaterialComponents.DayNight.NoActionBar">
<style name="AppTheme" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/secondaryColorDefault</item>
Expand Down Expand Up @@ -230,7 +230,7 @@
</style>

<!-- The launcher theme. It sets the main window background to the launch_screen drawable -->
<style name="AppTheme.Launcher" parent="AppTheme">
<style name="AppTheme.Launcher" parent="AppTheme.NoActionBar">
<item name="android:windowBackground">@drawable/launch_screen</item>
<!-- Optional, on Android 5+ you can modify the colorPrimaryDark color to match the windowBackground color for further branding-->
<!-- <item name="colorPrimaryDark">@android:color/white</item> -->
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<color name="overviewPillColorDefault">#1c171c</color>
<color name="colorOnPrimaryDefault">#FFFFFF</color>

<color name="defaultbackground">#999999</color>
<color name="defaultbackground">#424242</color>
<color name="defaulttextcolor">#B3FFFFFF</color>

<!-- Tabs-->
Expand Down
4 changes: 2 additions & 2 deletions core/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:ns2="http://schemas.android.com/tools">

<style name="AppTheme" parent="Theme.MaterialComponents.Light.NoActionBar">
<style name="AppTheme" parent="Theme.MaterialComponents.Light.DarkActionBar">
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@android:color/holo_blue_light</item>
Expand Down Expand Up @@ -230,7 +230,7 @@
</style>

<!-- The launcher theme. It sets the main window background to the launch_screen drawable -->
<style name="AppTheme.Launcher" parent="AppTheme">
<style name="AppTheme.Launcher" parent="AppTheme.NoActionBar">
<item name="android:windowBackground">@drawable/launch_screen</item>
<!-- Optional, on Android 5+ you can modify the colorPrimaryDark color to match the windowBackground color for further branding-->
<!-- <item name="colorPrimaryDark">@android:color/white</item> -->
Expand Down

0 comments on commit e1bcad2

Please sign in to comment.