mirror of
https://github.com/libre-tube/LibreTube.git
synced 2025-04-28 16:00:31 +05:30
use material library inbuilts
This commit is contained in:
parent
31fee99282
commit
d6c3a77a98
@ -66,14 +66,6 @@ class AboutActivity : BaseActivity() {
|
|||||||
true
|
true
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.donate.setOnClickListener {
|
|
||||||
openLinkFromHref(DONATE_URL)
|
|
||||||
}
|
|
||||||
binding.donate.setOnLongClickListener {
|
|
||||||
onLongClick(DONATE_URL)
|
|
||||||
true
|
|
||||||
}
|
|
||||||
|
|
||||||
binding.github.setOnClickListener {
|
binding.github.setOnClickListener {
|
||||||
openLinkFromHref(GITHUB_URL)
|
openLinkFromHref(GITHUB_URL)
|
||||||
}
|
}
|
||||||
|
@ -17,7 +17,7 @@ class SettingsActivity : BaseActivity() {
|
|||||||
|
|
||||||
setContentView(binding.root)
|
setContentView(binding.root)
|
||||||
|
|
||||||
binding.backImageButton.setOnClickListener {
|
binding.toolbar.setNavigationOnClickListener {
|
||||||
onBackPressedDispatcher.onBackPressed()
|
onBackPressedDispatcher.onBackPressed()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -51,6 +51,6 @@ class SettingsActivity : BaseActivity() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun changeTopBarText(text: String) {
|
fun changeTopBarText(text: String) {
|
||||||
if (this::binding.isInitialized) binding.topBarTextView.text = text
|
if (this::binding.isInitialized) binding.toolbar.title = text
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -9,12 +9,19 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<com.google.android.material.appbar.MaterialToolbar
|
||||||
|
android:id="@+id/toolbar"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:navigationIcon="@drawable/ic_arrow_back"
|
||||||
|
app:title="@string/about" />
|
||||||
|
|
||||||
<com.google.android.material.imageview.ShapeableImageView
|
<com.google.android.material.imageview.ShapeableImageView
|
||||||
android:id="@+id/appIcon"
|
android:id="@+id/appIcon"
|
||||||
android:layout_width="90dp"
|
android:layout_width="90dp"
|
||||||
android:layout_height="90dp"
|
android:layout_height="90dp"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:layout_marginTop="50dp"
|
android:layout_marginTop="30dp"
|
||||||
android:src="@mipmap/ic_launcher_round"
|
android:src="@mipmap/ic_launcher_round"
|
||||||
app:shapeAppearanceOverlay="@style/CircleImageView" />
|
app:shapeAppearanceOverlay="@style/CircleImageView" />
|
||||||
|
|
||||||
@ -100,24 +107,6 @@
|
|||||||
|
|
||||||
</com.google.android.material.card.MaterialCardView>
|
</com.google.android.material.card.MaterialCardView>
|
||||||
|
|
||||||
<com.google.android.material.card.MaterialCardView
|
|
||||||
android:id="@+id/donate"
|
|
||||||
style="@style/AboutCard">
|
|
||||||
|
|
||||||
<LinearLayout style="@style/AboutItem">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
style="@style/AboutImageView"
|
|
||||||
android:src="@drawable/ic_donate" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
style="@style/AboutTextView"
|
|
||||||
android:text="@string/donate" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
</com.google.android.material.card.MaterialCardView>
|
|
||||||
|
|
||||||
<com.google.android.material.card.MaterialCardView
|
<com.google.android.material.card.MaterialCardView
|
||||||
android:id="@+id/license"
|
android:id="@+id/license"
|
||||||
style="@style/AboutCard">
|
style="@style/AboutCard">
|
||||||
|
@ -1,37 +1,20 @@
|
|||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<LinearLayout
|
<com.google.android.material.appbar.MaterialToolbar
|
||||||
|
android:id="@+id/toolbar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:paddingVertical="5dp">
|
app:navigationIcon="@drawable/ic_arrow_back"
|
||||||
|
app:title="@string/settings" />
|
||||||
|
|
||||||
<ImageButton
|
<FrameLayout
|
||||||
android:id="@+id/back_imageButton"
|
|
||||||
android:layout_width="27dp"
|
|
||||||
android:layout_height="27dp"
|
|
||||||
android:layout_marginVertical="10dp"
|
|
||||||
android:layout_marginLeft="15dp"
|
|
||||||
android:background="?android:selectableItemBackgroundBorderless"
|
|
||||||
android:backgroundTint="@android:color/transparent"
|
|
||||||
android:src="@drawable/ic_arrow_back" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/topBar_textView"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="center"
|
|
||||||
android:layout_marginLeft="25dp"
|
|
||||||
android:text="@string/settings"
|
|
||||||
android:textSize="20sp" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/settings"
|
android:id="@+id/settings"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="vertical" />
|
android:orientation="vertical" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
Loading…
x
Reference in New Issue
Block a user