mirror of
https://codeberg.org/timelimit/opentimelimit-android.git
synced 2025-10-05 10:49:29 +02:00
Improve lockscreen design
This commit is contained in:
parent
f89974b561
commit
f0b912f929
3 changed files with 40 additions and 20 deletions
|
@ -104,4 +104,9 @@ class LockActivity : AppCompatActivity(), ActivityViewModelHolder {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onBackPressed() {
|
||||
// do nothing because going back would open the blocked app again
|
||||
// super.onBackPressed()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -91,6 +91,8 @@ class LockFragment : Fragment() {
|
|||
binding.appTitle = "???"
|
||||
}
|
||||
|
||||
binding.appIcon.setImageDrawable(logic.platformIntegration.getAppIcon(packageName))
|
||||
|
||||
blockingReason.observe(this, Observer {
|
||||
if (it == BlockingReason.None) {
|
||||
activity!!.finish()
|
||||
|
|
|
@ -88,33 +88,46 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
<LinearLayout
|
||||
android:padding="8dp"
|
||||
android:orientation="vertical"
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:textAppearance="?android:textAppearanceMedium"
|
||||
tools:text="Evil App"
|
||||
android:text="@{appTitle}"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
<ImageView
|
||||
android:id="@+id/app_icon"
|
||||
tools:src="@mipmap/ic_launcher"
|
||||
android:layout_margin="8dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp" />
|
||||
|
||||
<TextView
|
||||
tools:text="verbotene Apps"
|
||||
android:visibility="@{TextUtils.isEmpty(appCategoryTitle) ? View.GONE : View.VISIBLE}"
|
||||
android:textAppearance="?android:textAppearanceMedium"
|
||||
android:text="@{appCategoryTitle}"
|
||||
<LinearLayout
|
||||
android:padding="8dp"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
android:layout_height="wrap_content">
|
||||
<TextView
|
||||
android:textAppearance="?android:textAppearanceMedium"
|
||||
tools:text="Evil App"
|
||||
android:text="@{appTitle}"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<TextView
|
||||
tools:text="com.evil.app"
|
||||
android:textAppearance="?android:textAppearanceMedium"
|
||||
android:text="@{packageName}"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
<TextView
|
||||
tools:text="verbotene Apps"
|
||||
android:visibility="@{TextUtils.isEmpty(appCategoryTitle) ? View.GONE : View.VISIBLE}"
|
||||
android:textAppearance="?android:textAppearanceMedium"
|
||||
android:text="@{appCategoryTitle}"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<TextView
|
||||
tools:text="com.evil.app"
|
||||
android:textAppearance="?android:textAppearanceSmall"
|
||||
android:text="@{packageName}"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue