Procházet zdrojové kódy

fix: changed 12 hour notation to be inline

sduduzog před 6 roky
rodič
revize
86d1fb313e

+ 1 - 5
app/src/main/java/com/sduduzog/slimlauncher/ui/main/HomeFragment.kt

@@ -138,15 +138,11 @@ class HomeFragment : BaseFragment(), OnLaunchAppListener {
                 ?.getBoolean(getString(R.string.prefs_settings_key_time_format), true)
         val date = Date()
         if (twenty4Hour as Boolean) {
-            val fWatchTime = SimpleDateFormat("h:mm", Locale.ROOT)
-            val fWatchTimeAP = SimpleDateFormat("aa", Locale.ROOT)
+            val fWatchTime = SimpleDateFormat("h:mm aa", Locale.ROOT)
             home_fragment_time.text = fWatchTime.format(date)
-            home_fragment_time_format.text = fWatchTimeAP.format(date)
-            home_fragment_time_format.visibility = View.VISIBLE
         } else {
             val fWatchTime = SimpleDateFormat("H:mm", Locale.ROOT)
             home_fragment_time.text = fWatchTime.format(date)
-            home_fragment_time_format.visibility = View.GONE
         }
         val fWatchDate = SimpleDateFormat("EEE, MMM dd", Locale.ROOT)
         home_fragment_date.text = fWatchDate.format(date)

+ 0 - 7
app/src/main/res/layout/home_fragment.xml

@@ -16,13 +16,6 @@
         android:textAppearance="@style/TextAppearance.AppCompat"
         android:textSize="@dimen/_40ssp" />
 
-    <TextView
-        android:id="@+id/home_fragment_time_format"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:textAppearance="@style/TextAppearance.AppCompat"
-        android:textSize="@dimen/_13sdp" />
-
     <TextView
         android:id="@+id/home_fragment_date"
         android:layout_width="wrap_content"

+ 0 - 9
app/src/main/res/xml/home_motion_scene.xml

@@ -124,15 +124,6 @@
             motion:layout_constraintHorizontal_bias="0.5"
             motion:layout_constraintStart_toStartOf="parent" />
 
-        <Constraint
-            android:id="@+id/home_fragment_time_format"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_marginTop="@dimen/_16sdp"
-            android:alpha="-1"
-            motion:layout_constraintStart_toEndOf="@+id/home_fragment_time"
-            motion:layout_constraintTop_toTopOf="@+id/home_fragment_time" />
-
         <Constraint
             android:id="@+id/home_fragment_date"
             android:layout_width="wrap_content"