0
0
Fork 0
mirror of https://github.com/YTVanced/VancedManager synced 2024-11-15 23:35:06 +00:00

layout updates

This commit is contained in:
X1nto 2020-05-04 17:51:51 +04:00
parent b13f8004ac
commit 68b748f20d
10 changed files with 109 additions and 154 deletions

View file

@ -6,6 +6,7 @@ import android.net.Uri
import android.os.Bundle import android.os.Bundle
import android.view.View import android.view.View
import android.widget.Button import android.widget.Button
import android.widget.ImageView
import androidx.navigation.findNavController import androidx.navigation.findNavController
import com.vanced.manager.R import com.vanced.manager.R
import com.vanced.manager.core.base.BaseFragment import com.vanced.manager.core.base.BaseFragment
@ -19,8 +20,6 @@ open class Home : BaseFragment() {
//Damn that's a lot of buttons //Damn that's a lot of buttons
val microginstallbtn = view.findViewById<Button>(R.id.microg_installbtn) val microginstallbtn = view.findViewById<Button>(R.id.microg_installbtn)
val microguninstallbtn = view.findViewById<Button>(R.id.microg_uninstallbtn)
val microgsettingsbtn = view.findViewById<Button>(R.id.microg_settingsbtn)
val vancedinstallbtn = view.findViewById<Button>(R.id.vanced_installbtn) val vancedinstallbtn = view.findViewById<Button>(R.id.vanced_installbtn)
val bravebtn = view.findViewById<Button>(R.id.brave_button) val bravebtn = view.findViewById<Button>(R.id.brave_button)
@ -30,6 +29,9 @@ open class Home : BaseFragment() {
val twitterbtn = view.findViewById<Button>(R.id.twitterbtn) val twitterbtn = view.findViewById<Button>(R.id.twitterbtn)
val redditbtn = view.findViewById<Button>(R.id.redditbtn) val redditbtn = view.findViewById<Button>(R.id.redditbtn)
val microguninstallbtn = view.findViewById<ImageView>(R.id.microg_uninstallbtn)
val microgsettingsbtn = view.findViewById<ImageView>(R.id.microg_settingsbtn)
//we need to check whether these apps are installed or not //we need to check whether these apps are installed or not
val microgStatus = pm?.let { isPackageInstalled("com.mgoogle.android.gms", it) } val microgStatus = pm?.let { isPackageInstalled("com.mgoogle.android.gms", it) }
val vancedStatus = pm?.let { isPackageInstalled("com.vanced.android.youtube", it) } val vancedStatus = pm?.let { isPackageInstalled("com.vanced.android.youtube", it) }

View file

@ -1,6 +1,6 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android" <vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp" android:width="29dp"
android:height="24dp" android:height="29dp"
android:viewportWidth="24.0" android:viewportWidth="24.0"
android:viewportHeight="24.0"> android:viewportHeight="24.0">
<path <path

View file

@ -27,25 +27,50 @@
android:textSize="24sp" android:textSize="24sp"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toTopOf="@id/microg_title_buttons_barrier"
android:drawableStart="@drawable/ic_microg" android:drawableStart="@drawable/ic_microg"
android:drawablePadding="8dp"/> android:drawablePadding="8dp"/>
<com.google.android.material.button.MaterialButton
android:id="@+id/microg_installbtn"
style="@style/Widget.AppCompat.Button.Borderless.Colored"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFamily="@font/exo_semibold"
android:text="@string/install"
android:textAllCaps="false"
android:textColor="#ffffff"
app:backgroundTint="?colorPrimary"
app:icon="@drawable/outline_cloud_download_24"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="1.0"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toTopOf="@id/microg_uninstallbtn"
android:scrollbars="none"/>
<androidx.constraintlayout.widget.Barrier
android:id="@+id/microg_title_buttons_barrier"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:barrierDirection="bottom"
app:constraint_referenced_ids="microg_title, microg_installbtn"/>
<LinearLayout <LinearLayout
android:id="@+id/microg_remote_latest_version" android:id="@+id/microg_remote_latest_version"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/microg_title" app:layout_constraintTop_toBottomOf="@+id/microg_title_buttons_barrier"
app:layout_constraintBottom_toTopOf="@id/linearLayout2"> app:layout_constraintBottom_toTopOf="@id/linearLayout2">
<TextView <TextView
android:id="@+id/microg_latest" android:id="@+id/microg_latest"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:fontFamily="@font/exo_semibold" android:fontFamily="@font/exo"
android:text="@string/latest" android:text="@string/latest"
android:textColor="?attr/colorOnSurfaceVariant" android:textColor="?attr/colorOnSurfaceVariant"
android:textSize="14sp" /> android:textSize="13sp" />
<TextView <TextView
android:id="@+id/microg_latest_version" android:id="@+id/microg_latest_version"
@ -70,10 +95,10 @@
android:id="@+id/microg_installed" android:id="@+id/microg_installed"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:fontFamily="@font/exo_semibold" android:fontFamily="@font/exo"
android:text="@string/installed" android:text="@string/installed"
android:textColor="?attr/colorOnSurfaceVariant" android:textColor="?attr/colorOnSurfaceVariant"
android:textSize="14sp" /> android:textSize="13sp" />
<TextView <TextView
android:id="@+id/microg_installed_version" android:id="@+id/microg_installed_version"
@ -86,49 +111,26 @@
</LinearLayout> </LinearLayout>
<com.google.android.material.button.MaterialButton <ImageView
android:id="@+id/microg_installbtn"
style="@style/Widget.AppCompat.Button.Borderless.Colored"
android:layout_width="wrap_content"
android:layout_height="40dp"
android:fontFamily="@font/exo_semibold"
android:text="@string/install"
android:textAllCaps="false"
android:textColor="#ffffff"
app:backgroundTint="?colorPrimary"
app:icon="@drawable/outline_cloud_download_24"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="1.0"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toTopOf="@id/microg_uninstallbtn"
android:scrollbars="none"/>
<com.google.android.material.button.MaterialButton
android:id="@+id/microg_settingsbtn" android:id="@+id/microg_settingsbtn"
style="@style/Widget.AppCompat.Button.Borderless.Colored"
android:layout_width="30dp" android:layout_width="30dp"
android:layout_height="40dp" android:layout_height="40dp"
android:layout_marginEnd="8dp" android:layout_marginEnd="8dp"
android:fontFamily="@font/exo_semibold" android:tint="?colorPrimary"
app:backgroundTint="?colorPrimary" android:clickable="true"
app:icon="@drawable/ic_settings_black_24dp" app:srcCompat="@drawable/ic_settings_black_24dp"
app:iconGravity="textStart"
app:iconPadding="0dp"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@id/microg_uninstallbtn" app:layout_constraintEnd_toStartOf="@id/microg_uninstallbtn"
android:scrollbars="none"/> android:scrollbars="none"/>
<com.google.android.material.button.MaterialButton <ImageView
android:id="@+id/microg_uninstallbtn" android:id="@+id/microg_uninstallbtn"
style="@style/Widget.AppCompat.Button.Borderless.Colored"
android:layout_width="30dp" android:layout_width="30dp"
android:layout_height="40dp" android:layout_height="40dp"
android:fontFamily="@font/exo_semibold" android:fontFamily="@font/exo_semibold"
app:iconPadding="0dp" app:srcCompat="@drawable/ic_delete_black_24dp"
android:textAllCaps="false" android:tint="@color/Red"
app:backgroundTint="?attr/colorError" android:clickable="true"
app:icon="@drawable/ic_delete_black_24dp"
app:iconGravity="textStart"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/microg_installbtn" app:layout_constraintTop_toBottomOf="@id/microg_installbtn"

View file

@ -37,16 +37,52 @@
android:textSize="24sp" android:textSize="24sp"
app:layout_constraintStart_toEndOf="@id/home_vanced_logo" app:layout_constraintStart_toEndOf="@id/home_vanced_logo"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toTopOf="@id/vanced_remote_latest_version" app:layout_constraintBottom_toTopOf="@id/vanced_title_buttons_barrier"
android:layout_marginStart="8dp"/> android:layout_marginStart="8dp"/>
<com.google.android.material.button.MaterialButton
android:id="@+id/vanced_installbtn"
style="@style/Widget.AppCompat.Button.Borderless.Colored"
app:backgroundTint="?colorPrimary"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/install"
android:textAllCaps="false"
android:textColor="#ffffff"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintHorizontal_bias="1.0"
android:fontFamily="@font/exo_semibold"
app:icon="@drawable/outline_cloud_download_24"
android:scrollbars="none"/>
<androidx.constraintlayout.widget.Barrier
android:id="@+id/vanced_title_buttons_barrier"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:barrierDirection="bottom"
app:constraint_referenced_ids="home_vanced_logo, vanced_title, vanced_installbtn"/>
<ImageView
android:id="@+id/vanced_uninstallbtn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:iconPadding="0dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@id/vanced_title_buttons_barrier"
android:clickable="true"
app:srcCompat="@drawable/ic_delete_black_24dp"
android:tint="@color/Red"
android:scrollbars="none"/>
<LinearLayout <LinearLayout
android:id="@+id/vanced_remote_latest_version" android:id="@+id/vanced_remote_latest_version"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintBottom_toTopOf="@id/linearLayout2" app:layout_constraintBottom_toTopOf="@id/linearLayout2"
app:layout_constraintTop_toBottomOf="@+id/vanced_title"> app:layout_constraintTop_toBottomOf="@+id/vanced_title_buttons_barrier">
<TextView <TextView
android:id="@+id/vanced_latest" android:id="@+id/vanced_latest"
@ -54,8 +90,8 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/latest" android:text="@string/latest"
android:textColor="?attr/colorOnSurfaceVariant" android:textColor="?attr/colorOnSurfaceVariant"
android:fontFamily="@font/exo_semibold" android:fontFamily="@font/exo"
android:textSize="14sp" /> android:textSize="13sp" />
<TextView <TextView
android:id="@+id/vanced_latest_version" android:id="@+id/vanced_latest_version"
@ -73,8 +109,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/vanced_remote_latest_version" app:layout_constraintTop_toBottomOf="@id/vanced_remote_latest_version">
app:layout_constraintBottom_toBottomOf="parent">
<TextView <TextView
android:id="@+id/vanced_installed" android:id="@+id/vanced_installed"
@ -82,8 +117,8 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/installed" android:text="@string/installed"
android:textColor="?attr/colorOnSurfaceVariant" android:textColor="?attr/colorOnSurfaceVariant"
android:fontFamily="@font/exo_semibold" android:fontFamily="@font/exo"
android:textSize="14sp" /> android:textSize="13sp" />
<TextView <TextView
android:id="@+id/vanced_installed_version" android:id="@+id/vanced_installed_version"
@ -96,39 +131,6 @@
</LinearLayout> </LinearLayout>
<com.google.android.material.button.MaterialButton
android:id="@+id/vanced_installbtn"
style="@style/Widget.AppCompat.Button.Borderless.Colored"
app:backgroundTint="?colorPrimary"
android:layout_width="wrap_content"
android:layout_height="40dp"
android:text="@string/install"
android:textAllCaps="false"
android:textColor="#ffffff"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toTopOf="@id/vanced_uninstallbtn"
app:layout_constraintHorizontal_bias="1.0"
android:fontFamily="@font/exo_semibold"
app:icon="@drawable/outline_cloud_download_24"
android:scrollbars="none"/>
<com.google.android.material.button.MaterialButton
android:id="@+id/vanced_uninstallbtn"
style="@style/Widget.AppCompat.Button.Borderless.Colored"
android:layout_width="30dp"
android:layout_height="40dp"
android:fontFamily="@font/exo_semibold"
app:iconPadding="0dp"
android:textAllCaps="false"
app:backgroundTint="?attr/colorError"
app:icon="@drawable/ic_delete_black_24dp"
app:iconGravity="textStart"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@id/vanced_installbtn"
android:scrollbars="none"/>
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
</com.google.android.material.card.MaterialCardView> </com.google.android.material.card.MaterialCardView>

View file

@ -1,64 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<resources>
<!-- Global Strings -->
<string name="close">Close</string>
<string name="security_context">Please make sure you downloaded app from vanced.app, Vanced Discord server or GitHub</string>
<string name="unsupported_version_context">I don\'t know how but you probably installed Vanced Manager on unsupported Android version. The app will now close</string>
<string name="welcome">Welcome</string>
<string name="whoops">Whoops!</string>
<!-- Main Activity -->
<string name="title_about">About</string>
<string name="title_home">Home</string>
<string name="title_install">Install</string>
<string name="title_settings">Settings</string>
<!-- Home Page -->
<string name="brave_browser">Brave Browser</string>
<string name="changelogs">Changelogs</string>
<string name="install">Install</string>
<string name="installed">Installed:</string>
<string name="latest">Latest:</string>
<string name="loading">Loading…</string>
<string name="n_a">N/A</string>
<string name="network_error">Network connection unavailable</string>
<string name="reddit">Reddit</string>
<string name="update">Update</string>
<string name="useful_links">Useful Links</string>
<string name="vanced_medias">Vanced on Social Media</string>
<string name="website">Website</string>
<string name="website_text">The official website of Vanced</string>
<string name="support_us">Support us by downloading Brave</string>
<!-- Settings -->
<string name="accent_color">Accent Color</string>
<string name="accent_color_summary">Choose your preferred accent color</string>
<string name="check_updates">Check for updates</string>
<string name="category_interface">Interface</string>
<string name="category_manager">Manager</string>
<string name="theme">Theme</string>
<string name="theme_summary">Choose your preferred theme</string>
<string name="push_notifications">Push Notifications</string>
<string name="push_notifications_summary">Receive push notifications when update is released</string>
<string name="re_check">Re-check</string>
<string name="update_center">Update Center</string>
<!-- Install Page -->
<string name="choose_preferred_language">Choose your preferred language for Vanced</string>
<string name="choose_preferred_language_note">Note: if you install anything other than English, English will still be installed as an additional language</string>
<string name="choose_preferred_theme">Choose your preferred theme for Vanced</string>
<string name="choose_preferred_variant">Choose your preferred variant for Vanced</string>
<string name="finish">Finish</string>
<string name="install_light_black">Light + Black</string>
<string name="install_light_dark">Light + Dark</string>
<string name="install_nonroot">Non-root</string>
<string name="install_root">Root</string>
<string name="next">Next</string>
<!-- About Page -->
<string name="manager_devs">Manager Devs</string>
<string name="sources">Sources</string>
<string name="vanced_team">Vanced Team</string>
</resources>

View file

@ -33,11 +33,18 @@
<!-- Settings --> <!-- Settings -->
<string name="accent_color">აქცენტის ფერი</string> <string name="accent_color">აქცენტის ფერი</string>
<string name="accent_blue">ლურჯი</string>
<string name="accent_color_summary">Cაირჩიეთ სასურველი აქცენტის ფერი</string> <string name="accent_color_summary">Cაირჩიეთ სასურველი აქცენტის ფერი</string>
<string name="accent_green">მწვანე</string>
<string name="accent_red">წითელი</string>
<string name="accent_yellow">ყვითელი</string>
<string name="check_updates">განახლებების შემოწმება</string> <string name="check_updates">განახლებების შემოწმება</string>
<string name="category_interface">ინტერფეისი</string> <string name="category_interface">ინტერფეისი</string>
<string name="category_manager">მენეჯერი</string> <string name="category_manager">მენეჯერი</string>
<string name="theme">თემა</string> <string name="theme">თემა</string>
<string name="theme_follow">სისტემაზე დაფუძნებული</string>
<string name="theme_dark">მუქი თემა</string>
<string name="theme_light">ღია თემა</string>
<string name="theme_summary">აირჩიეთ სასურველი თემა</string> <string name="theme_summary">აირჩიეთ სასურველი თემა</string>
<string name="push_notifications">შეტყობინებები</string> <string name="push_notifications">შეტყობინებები</string>
<string name="push_notifications_summary">მიიღეთ შეტყობინება როდესაც განახლება გამოვა</string> <string name="push_notifications_summary">მიიღეთ შეტყობინება როდესაც განახლება გამოვა</string>

View file

@ -8,9 +8,9 @@
</string-array> </string-array>
<string-array name="theme_modes_values"> <string-array name="theme_modes_values">
<item>LIGHT</item> <item>@string/theme_light</item>
<item>DARK</item> <item>@string/theme_dark</item>
<item>FOLLOW</item> <item>@string/theme_follow</item>
</string-array> </string-array>
<string-array name="languages"> <string-array name="languages">
@ -24,10 +24,10 @@
</string-array> </string-array>
<string-array name="accent_color"> <string-array name="accent_color">
<item>Blue</item> <item>@string/accent_blue</item>
<item>Red</item> <item>@string/accent_red</item>
<item>Green</item> <item>@string/accent_green</item>
<item>Yellow</item> <item>@string/accent_yellow</item>
</string-array> </string-array>
<string-array name="syke"> <string-array name="syke">

View file

@ -12,5 +12,6 @@
<color name="Black">#000000</color> <color name="Black">#000000</color>
<color name="White">#ffffff</color> <color name="White">#ffffff</color>
<color name="Red">#CC0047</color>
</resources> </resources>

View file

@ -7,7 +7,5 @@
<string name="twitter" translatable="false">Twitter</string> <string name="twitter" translatable="false">Twitter</string>
<string name="vanced" translatable="false">Vanced</string> <string name="vanced" translatable="false">Vanced</string>
<string name="microg" translatable="false">MicroG</string> <string name="microg" translatable="false">MicroG</string>
<string name="shortcut_settings" translatable="false">Settings</string>
<string name="shortcut_install" translatable="false">Install</string>
</resources> </resources>

View file

@ -33,11 +33,18 @@
<!-- Settings --> <!-- Settings -->
<string name="accent_color">Accent Color</string> <string name="accent_color">Accent Color</string>
<string name="accent_blue">Blue</string>
<string name="accent_color_summary">Choose your preferred accent color</string> <string name="accent_color_summary">Choose your preferred accent color</string>
<string name="accent_green">Green</string>
<string name="accent_red">Red</string>
<string name="accent_yellow">Yellow</string>
<string name="check_updates">Check for updates</string> <string name="check_updates">Check for updates</string>
<string name="category_interface">Interface</string> <string name="category_interface">Interface</string>
<string name="category_manager">Manager</string> <string name="category_manager">Manager</string>
<string name="theme">Theme</string> <string name="theme">Theme</string>
<string name="theme_follow">Follow System</string>
<string name="theme_dark">Dark Theme</string>
<string name="theme_light">Light Theme</string>
<string name="theme_summary">Choose your preferred theme</string> <string name="theme_summary">Choose your preferred theme</string>
<string name="push_notifications">Push Notifications</string> <string name="push_notifications">Push Notifications</string>
<string name="push_notifications_summary">Receive push notifications when update is released</string> <string name="push_notifications_summary">Receive push notifications when update is released</string>