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.appTitle = "???"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
binding.appIcon.setImageDrawable(logic.platformIntegration.getAppIcon(packageName))
|
||||||
|
|
||||||
blockingReason.observe(this, Observer {
|
blockingReason.observe(this, Observer {
|
||||||
if (it == BlockingReason.None) {
|
if (it == BlockingReason.None) {
|
||||||
activity!!.finish()
|
activity!!.finish()
|
||||||
|
|
|
@ -88,33 +88,46 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content">
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:padding="8dp"
|
android:orientation="horizontal"
|
||||||
android:orientation="vertical"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
<TextView
|
<ImageView
|
||||||
android:textAppearance="?android:textAppearanceMedium"
|
android:id="@+id/app_icon"
|
||||||
tools:text="Evil App"
|
tools:src="@mipmap/ic_launcher"
|
||||||
android:text="@{appTitle}"
|
android:layout_margin="8dp"
|
||||||
android:layout_width="match_parent"
|
android:layout_gravity="center_vertical"
|
||||||
android:layout_height="wrap_content" />
|
android:layout_width="48dp"
|
||||||
|
android:layout_height="48dp" />
|
||||||
|
|
||||||
<TextView
|
<LinearLayout
|
||||||
tools:text="verbotene Apps"
|
android:padding="8dp"
|
||||||
android:visibility="@{TextUtils.isEmpty(appCategoryTitle) ? View.GONE : View.VISIBLE}"
|
android:orientation="vertical"
|
||||||
android:textAppearance="?android:textAppearanceMedium"
|
|
||||||
android:text="@{appCategoryTitle}"
|
|
||||||
android:layout_width="match_parent"
|
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
|
<TextView
|
||||||
tools:text="com.evil.app"
|
tools:text="verbotene Apps"
|
||||||
android:textAppearance="?android:textAppearanceMedium"
|
android:visibility="@{TextUtils.isEmpty(appCategoryTitle) ? View.GONE : View.VISIBLE}"
|
||||||
android:text="@{packageName}"
|
android:textAppearance="?android:textAppearanceMedium"
|
||||||
android:layout_width="match_parent"
|
android:text="@{appCategoryTitle}"
|
||||||
android:layout_height="wrap_content" />
|
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>
|
</LinearLayout>
|
||||||
</androidx.cardview.widget.CardView>
|
</androidx.cardview.widget.CardView>
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue