updated about menu

This commit is contained in:
X1nto 2021-02-15 22:28:34 +04:00
parent 1769d86a88
commit ae72720d42
9 changed files with 180 additions and 207 deletions

View File

@ -37,7 +37,7 @@ class AboutFragment : BindingFragment<FragmentAboutBinding>() {
@SuppressLint("ClickableViewAccessibility")
private fun dataBind() {
requireActivity().title = getString(R.string.title_about)
binding.aboutHeader.root.setOnClickListener {
binding.root.setOnClickListener {
showDialog(
AppInfoDialog.newInstance(
appName = getString(R.string.app_name),
@ -71,7 +71,7 @@ class AboutFragment : BindingFragment<FragmentAboutBinding>() {
}
false
}
binding.aboutSources.aboutGithubButton.setOnClickListener { viewModel.openUrl("https://github.com/YTVanced/VancedInstaller") }
binding.aboutSources.aboutLicenseButton.setOnClickListener { viewModel.openUrl("https://raw.githubusercontent.com/YTVanced/VancedInstaller/dev/LICENSE") }
binding.aboutGithubButton.setOnClickListener { viewModel.openUrl("https://github.com/YTVanced/VancedInstaller") }
binding.aboutLicenseButton.setOnClickListener { viewModel.openUrl("https://raw.githubusercontent.com/YTVanced/VancedInstaller/dev/LICENSE") }
}
}

View File

@ -1,5 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.core.widget.NestedScrollView
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_height="match_parent"
android:fillViewport="true"
@ -14,31 +16,178 @@
android:clipToPadding="false"
android:orientation="vertical">
<include
android:id="@+id/about_header"
layout="@layout/include_about_header"
<com.google.android.material.card.MaterialCardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/twelvedp" />
android:layout_marginTop="12dp"
app:cardCornerRadius="8dp">
<include
layout="@layout/include_about_vanced_devs"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/stdp" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/vanced_gradient"
android:orientation="vertical"
android:paddingVertical="8dp">
<include
layout="@layout/include_about_app_devs"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/stdp" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/app_name"
android:textAlignment="center"
android:textColor="#fff"
android:textSize="30sp" />
<include
android:id="@+id/about_sources"
layout="@layout/include_about_sources"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/stdp" />
<!--suppress AndroidDomInspection -->
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/versionName"
android:textAlignment="center"
android:textColor="#fff"
android:textSize="16sp" />
</LinearLayout>
</com.google.android.material.card.MaterialCardView>
<com.google.android.material.card.MaterialCardView
style="@style/MaterialCard"
app:cardBackgroundColor="?colorLinkBG"
android:layout_marginTop="12dp"
app:contentPaddingLeft="12dp"
app:contentPaddingRight="12dp"
app:contentPaddingTop="8dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<com.vanced.manager.ui.core.ThemedTextView
style="@style/CardTextHeader"
android:text="@string/vanced_team"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:text="@string/about_vanced_devs" />
</LinearLayout>
</com.google.android.material.card.MaterialCardView>
<com.google.android.material.card.MaterialCardView
style="@style/MaterialCard"
app:cardBackgroundColor="?colorLinkBG"
android:layout_marginTop="12dp"
app:contentPaddingLeft="12dp"
app:contentPaddingRight="12dp"
app:contentPaddingTop="8dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<com.vanced.manager.ui.core.ThemedTextView
style="@style/CardTextHeader"
android:text="@string/manager_dev"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:text="@string/about_app_devs" />
</LinearLayout>
</com.google.android.material.card.MaterialCardView>
<com.google.android.material.card.MaterialCardView
style="@style/MaterialCard"
app:cardBackgroundColor="?colorLinkBG"
android:layout_marginTop="12dp"
app:contentPaddingLeft="12dp"
app:contentPaddingRight="12dp"
app:contentPaddingTop="8dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<com.vanced.manager.ui.core.ThemedTextView
style="@style/CardTextHeader"
android:text="@string/other_contributors"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:text="@string/about_other_contributors" />
</LinearLayout>
</com.google.android.material.card.MaterialCardView>
<com.google.android.material.card.MaterialCardView
style="@style/MaterialCard"
app:cardBackgroundColor="?colorLinkBG"
android:layout_marginTop="12dp"
app:contentPaddingLeft="12dp"
app:contentPaddingRight="12dp"
app:contentPaddingTop="8dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<com.vanced.manager.ui.core.ThemedTextView
android:id="@+id/about_card_vancedTeam"
style="@style/CardTextHeader"
android:text="@string/sources"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<com.google.android.flexbox.FlexboxLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:alignItems="center"
app:flexDirection="row"
app:justifyContent="space_evenly">
<com.google.android.material.button.MaterialButton
android:id="@+id/about_github_button"
style="@style/SocialButtonStyle"
app:icon="@drawable/ic_github"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@id/about_license_button"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<com.google.android.material.button.MaterialButton
android:id="@+id/about_license_button"
style="@style/SocialButtonStyle"
android:text="@string/gpl"
android:textSize="21sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/about_github_button"
app:layout_constraintTop_toTopOf="parent" />
</com.google.android.flexbox.FlexboxLayout>
</LinearLayout>
</com.google.android.material.card.MaterialCardView>
</LinearLayout>

View File

@ -1,48 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<com.google.android.material.card.MaterialCardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
style="@style/MaterialCard"
app:cardBackgroundColor="?colorLinkBG"
app:contentPaddingLeft="16dp"
app:contentPaddingRight="16dp"
app:contentPaddingTop="8dp"
tools:ignore="HardcodedText">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<com.vanced.manager.ui.core.ThemedTextView
android:id="@+id/about_card_vancedTeam"
style="@style/CardTextHeader"
android:text="@string/manager_dev"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:text="Xinto (Main stuff)" />
<TextView
style="@style/AboutDevNames"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Koopah (Shell God)" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="AioiLight (GitHub)" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Logan (UI)" />
</LinearLayout>
</com.google.android.material.card.MaterialCardView>

View File

@ -1,34 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<com.google.android.material.card.MaterialCardView 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_height="wrap_content"
app:cardCornerRadius="8dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/vanced_gradient"
android:orientation="vertical"
android:paddingVertical="8dp">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/app_name"
android:textAlignment="center"
android:textColor="#fff"
android:textSize="30sp" />
<!--suppress AndroidDomInspection -->
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/versionName"
android:textAlignment="center"
android:textColor="#fff"
android:textSize="16sp" />
</LinearLayout>
</com.google.android.material.card.MaterialCardView>

View File

@ -1,53 +0,0 @@
<com.google.android.material.card.MaterialCardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:cardBackgroundColor="?colorLinkBG"
app:cardElevation="0dp"
app:contentPaddingBottom="8dp"
app:contentPaddingTop="2dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<com.vanced.manager.ui.core.ThemedTextView
android:id="@+id/about_card_vancedTeam"
style="@style/CardTextHeader"
android:layout_marginStart="16dp"
android:layout_marginTop="8dp"
android:text="@string/sources"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<com.google.android.flexbox.FlexboxLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:alignItems="center"
app:flexDirection="row"
app:justifyContent="space_evenly">
<com.google.android.material.button.MaterialButton
android:id="@+id/about_github_button"
style="@style/SocialButtonStyle"
app:icon="@drawable/ic_github"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@id/about_license_button"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<com.google.android.material.button.MaterialButton
android:id="@+id/about_license_button"
style="@style/SocialButtonStyle"
android:text="GPL"
android:textSize="21sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/about_github_button"
app:layout_constraintTop_toTopOf="parent"
tools:ignore="HardcodedText" />
</com.google.android.flexbox.FlexboxLayout>
</LinearLayout>
</com.google.android.material.card.MaterialCardView>

View File

@ -1,48 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<com.google.android.material.card.MaterialCardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
style="@style/MaterialCard"
app:cardBackgroundColor="?colorLinkBG"
app:contentPaddingLeft="16dp"
app:contentPaddingRight="16dp"
app:contentPaddingTop="8dp"
tools:ignore="HardcodedText">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<com.vanced.manager.ui.core.ThemedTextView
android:id="@+id/about_card_vancedTeam"
style="@style/CardTextHeader"
android:text="@string/vanced_team"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:text="xfileFIN" />
<TextView
style="@style/AboutDevNames"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="KevinX8" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="ZaneZam" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Laura Almeida" />
</LinearLayout>
</com.google.android.material.card.MaterialCardView>

View File

@ -8,6 +8,11 @@
<string name="nonroot">nonroot</string>
<string name="about_app_devs" translatable="false">Xinto (Main stuff)\nKoopah (Shell God)\nAioiLight (GitHub)\nLogan (UI)</string>
<string name="about_vanced_devs" translatable="false">xfileFIN\nKevinX8\nZaneZam\nLaura Almeida</string>
<string name="about_other_contributors" translatable="false">bhatVikrant (Website)\nbawm (Sponsorblock)</string>
<string name="gpl" translatable="false">GPL</string>
<!-- prefs -->
<string name="use_custom_tabs" translatable="false">use_custom_tabs</string>

View File

@ -104,6 +104,7 @@
<!-- About Page -->
<string name="manager_dev">Manager Devs</string>
<string name="other_contributors">Other Contributors</string>
<string name="sources">Sources</string>
<string name="vanced_team">Vanced Team</string>

View File

@ -37,6 +37,7 @@
<style name="SocialButtonStyle" parent="Widget.MaterialComponents.Button.TextButton">
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:background">@android:color/transparent</item>
<item name="backgroundTint">@android:color/transparent</item>
<item name="background">@android:color/transparent</item>
<item name="android:textColor">?colorLinkImage</item>