Skip to content

Commit

Permalink
feat: title bar
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhuRuoLing committed Feb 22, 2024
1 parent 09172dd commit ad96317
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ class ECertV1DisplayActivity : DisplayActivity<ECertV1>(ECertV1::class.java) {
super.onCreate(savedInstanceState)
binding = ActivityEcertV1DisplayBinding.inflate(layoutInflater)
setContentView(binding.main)
setSupportActionBar(binding.toolbar)
binding.toolbar.setNavigationOnClickListener {
this.finish()
}
logI(data.toString())
signatureChecker = SignatureChecker(this, "ecert_v1")
displayCert()
Expand Down
19 changes: 12 additions & 7 deletions app/src/main/res/layout/activity_ecert_v1_display.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,19 @@
android:layout_height="match_parent"
android:orientation="vertical">

<com.google.android.material.textview.MaterialTextView
android:layout_width="wrap_content"
<com.google.android.material.appbar.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="20dp"
android:layout_marginTop="20dp"
android:text="@string/label_cert_info_title"
android:textAppearance="?textAppearanceTitleLarge"
android:textColor="?colorOnErrorContainer" />
android:fitsSystemWindows="true">

<com.google.android.material.appbar.MaterialToolbar
android:id="@+id/toolbar"
app:title="@string/label_cert_info_title"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
app:navigationIcon="@drawable/ic_baseline_arrow_back_24" />

</com.google.android.material.appbar.AppBarLayout>

<ScrollView
android:layout_width="match_parent"
Expand Down

0 comments on commit ad96317

Please sign in to comment.