Skip to content
This repository has been archived by the owner on Dec 4, 2023. It is now read-only.

Commit

Permalink
Merge pull request #8 from Lennoard/FEATURE-redesign
Browse files Browse the repository at this point in the history
Release v3.0.0
  • Loading branch information
Lennoard authored May 30, 2021
2 parents 74fe24c + e3b6e59 commit 0e1f7ef
Show file tree
Hide file tree
Showing 20 changed files with 187 additions and 64 deletions.
52 changes: 52 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,55 @@ app/src/main/main.iml
HEBFOptimizer.iml
.vs/*
.idea/gradle.xml

# Node artifact files
node_modules/

# Compiled Java class files
*.class

# Log files
*.log

# Maven
target/
dist/

# Unit test reports
TEST*.xml

# OS-specific files
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db

# Files for the ART/Dalvik VM
*.dex

# Android Studio Navigation editor temp files
.navigation/

# Android Studio captures folder
captures/

*.iml
.gradle
/local.properties
/build
/captures

# Version control
vcs.xml

# lint
lint/intermediates/
lint/generated/
lint/outputs/
lint/tmp/

#Signing config
/keystore.properties
25 changes: 25 additions & 0 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import org.jetbrains.kotlin.config.KotlinCompilerVersion
import java.util.Properties

plugins {
id("com.android.application")
Expand Down Expand Up @@ -35,11 +36,35 @@ android {
multiDexEnabled = true
}

signingConfigs {
create("release") {
val keyFile = rootProject.file("keystore.properties")
if (!keyFile.exists()) {
keyFile.createNewFile()
keyFile.writeText(buildString {
appendln("keyAlias=")
appendln("keyPassword=")
appendln("storeFile=/")
appendln("storePassword=")
})
}
val keystoreProps = Properties().apply {
load(keyFile.inputStream())
}

keyAlias = keystoreProps["keyAlias"] as? String ?: ""
keyPassword = keystoreProps["keyPassword"] as? String ?: ""
storeFile = file(keystoreProps["storeFile"] as? String ?: "/")
storePassword = keystoreProps["storePassword"] as? String ?: ""
}
}

buildTypes {
getByName("release") {
isDebuggable = false
isMinifyEnabled = true
isShrinkResources = true
signingConfig = signingConfigs.getByName("release")
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import android.widget.*
import androidx.appcompat.widget.Toolbar
import androidx.core.content.ContextCompat
import androidx.core.content.res.ResourcesCompat
import androidx.core.view.ViewCompat
import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentManager
import androidx.fragment.app.FragmentStatePagerAdapter
Expand Down Expand Up @@ -47,6 +48,7 @@ class AppIntroActivity : BaseActivity() {
setSupportActionBar(toolbar)
supportActionBar?.setDisplayHomeAsUpEnabled(false)
supportActionBar?.setDisplayShowTitleEnabled(false)
ViewCompat.setElevation(toolbar, 0F)

val tempFolder = K.HEBF.getTempDir(this)
if (!tempFolder.exists()) {
Expand All @@ -63,7 +65,7 @@ class AppIntroActivity : BaseActivity() {
titleTextSwitcher.setFactory {
val textView = TextView(this).apply {
textSize = 30f
setTextColor(Color.WHITE)
setTextColor(ContextCompat.getColor(context, R.color.colorOnSurface))
}

val layoutParams = FrameLayout.LayoutParams(
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/com/androidvip/hebf/views/DashCard.kt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class DashCard @JvmOverloads constructor(
context: Context,
attrs: AttributeSet? = null,
defStyle: Int = 0
) : MaterialCardView(context, attrs, defStyle) {
) : LinearLayout(context, attrs, defStyle) {

private val titleTextView: AppCompatTextView by lazy { findViewById(R.id.dashCardTitle) }
private val valueTextView: AppCompatTextView by lazy { findViewById(R.id.dashCardValue) }
Expand Down
12 changes: 10 additions & 2 deletions app/src/main/java/com/androidvip/hebf/views/ServiceState.kt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import androidx.core.content.ContextCompat
import androidx.core.view.forEach
import androidx.core.widget.ImageViewCompat
import com.androidvip.hebf.R
import com.androidvip.hebf.createVectorDrawable
import com.androidvip.hebf.runOnMainThread
import com.google.android.material.switchmaterial.SwitchMaterial
import com.topjohnwu.superuser.ShellUtils
Expand Down Expand Up @@ -50,8 +51,15 @@ class ServiceState @JvmOverloads constructor(
}
}

val icon = attributes.getDrawable(R.styleable.ServiceState_serviceIcon)
this.icon.setImageDrawable(icon)
runCatching {
val icon = attributes.getDrawable(R.styleable.ServiceState_serviceIcon)
this.icon.setImageDrawable(icon)
}.onFailure {
val iconId = attributes.getResourceId(
R.styleable.ServiceState_serviceIcon, R.drawable.ic_settings
)
this.icon.setImageDrawable(context.createVectorDrawable(iconId))
}
} finally {
attributes.recycle()
}
Expand Down
10 changes: 10 additions & 0 deletions app/src/main/res/drawable/ic_code.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M8.7,15.9L4.8,12l3.9,-3.9c0.39,-0.39 0.39,-1.01 0,-1.4 -0.39,-0.39 -1.01,-0.39 -1.4,0l-4.59,4.59c-0.39,0.39 -0.39,1.02 0,1.41l4.59,4.6c0.39,0.39 1.01,0.39 1.4,0 0.39,-0.39 0.39,-1.01 0,-1.4zM15.3,15.9l3.9,-3.9 -3.9,-3.9c-0.39,-0.39 -0.39,-1.01 0,-1.4 0.39,-0.39 1.01,-0.39 1.4,0l4.59,4.59c0.39,0.39 0.39,1.02 0,1.41l-4.59,4.6c-0.39,0.39 -1.01,0.39 -1.4,0 -0.39,-0.39 -0.39,-1.01 0,-1.4z"/>
</vector>
15 changes: 12 additions & 3 deletions app/src/main/res/layout/activity_about.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
android:background="@color/colorSurface"
app:layout_collapseMode="pin"
app:popupTheme="@style/AppTheme.PopupOverlay"
app:titleTextColor="@color/colorOnBackground"
app:title="@string/sobre" />
app:title="@string/sobre"
app:titleTextColor="@color/colorOnBackground" />

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

Expand Down Expand Up @@ -85,13 +85,22 @@
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/small_margin"
android:layout_marginEnd="@dimen/default_margin"
android:paddingBottom="@dimen/default_margin"
android:text="@string/hebf_sobre_sub"
android:textAppearance="@style/TextAppearance.HEBF.Body2"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="@+id/card_img_hebf"
app:layout_constraintTop_toBottomOf="@+id/appCompatTextView4" />

<com.google.android.material.button.MaterialButton
style="@style/AppMaterialButtonFlatColored"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/source_code"
app:icon="@drawable/ic_code"
android:layout_marginBottom="@dimen/default_margin"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="@+id/card_text_sobre"
app:layout_constraintTop_toBottomOf="@+id/card_text_sobre" />

</androidx.constraintlayout.widget.ConstraintLayout>

Expand Down
3 changes: 2 additions & 1 deletion app/src/main/res/layout/activity_app_intro.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
android:layout_height="?attr/actionBarSize"
android:background="@color/colorBackground"
app:layout_collapseMode="pin"
android:elevation="0dp"
app:popupTheme="@style/AppTheme.PopupOverlay" />

</com.google.android.material.appbar.CollapsingToolbarLayout>
Expand All @@ -55,7 +56,7 @@
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="240dp">
android:layout_marginTop="@dimen/collapsing_app_bar_height">

<com.androidvip.hebf.views.CustomViewPager
android:id="@+id/intro_pager"
Expand Down
6 changes: 5 additions & 1 deletion app/src/main/res/layout/fragment_battery.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
android:layout_marginRight="@dimen/default_margin"
android:outlineSpotShadowColor="@color/colorPrimary"
app:cardElevation="@dimen/default_margin_alt"
app:cardPreventCornerOverlap="false"
app:layout_constraintTop_toTopOf="parent">

<androidx.appcompat.widget.AppCompatImageView
Expand Down Expand Up @@ -162,8 +163,11 @@
android:layout_marginTop="@dimen/default_margin"
android:layout_marginRight="@dimen/default_margin"
android:outlineSpotShadowColor="@color/colorPrimary"
android:visibility="gone"
app:cardElevation="@dimen/default_margin_alt"
app:layout_constraintTop_toBottomOf="@id/lowRamFlag">
app:cardPreventCornerOverlap="false"
app:layout_constraintTop_toBottomOf="@id/lowRamFlag"
tools:visibility="visible">

<androidx.appcompat.widget.AppCompatImageView
android:layout_width="match_parent"
Expand Down
67 changes: 24 additions & 43 deletions app/src/main/res/layout/fragment_intro1.xml
Original file line number Diff line number Diff line change
@@ -1,50 +1,31 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
<androidx.constraintlayout.widget.ConstraintLayout 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:padding="4dp"
android:animateLayoutChanges="true"
tools:context=".ui.appintro.Intro1Fragment">
android:orientation="vertical"
android:padding="@dimen/medium_margin">

<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
android:padding="24dp"
android:layout_above="@+id/layout_intro_bottom">
<androidx.appcompat.widget.AppCompatImageView
android:layout_width="wrap_content"
android:layout_height="80dp"
app:layout_constraintBottom_toTopOf="@+id/appCompatTextView3"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/__suicide"
app:tint="?attr/colorOnSurface" />

<androidx.appcompat.widget.AppCompatImageView
android:layout_width="match_parent"
android:layout_height="80dp"
android:layout_gravity="center"
android:src="@drawable/__suicide"
app:tint="?attr/colorOnSurface"/>

</LinearLayout>

<LinearLayout
android:id="@+id/layout_intro_bottom"
android:layout_width="match_parent"
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/appCompatTextView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:gravity="center"
android:orientation="vertical"
android:paddingBottom="8dp"
android:paddingLeft="12dp"
android:paddingRight="12dp">

<androidx.appcompat.widget.AppCompatTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFamily="sans-serif-condensed"
android:gravity="center_horizontal"
android:textAppearance="@style/TextAppearance.HEBF.Body2"
android:padding="4dp"
android:text="@string/hebf_sobre_sub" />
</LinearLayout>

android:fontFamily="sans-serif-condensed"
android:gravity="center_horizontal"
android:padding="4dp"
android:text="@string/hebf_sobre_sub"
android:textAppearance="@style/TextAppearance.HEBF.Body2"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />

</RelativeLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
3 changes: 2 additions & 1 deletion app/src/main/res/layout/fragment_performance2.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
android:layout_marginTop="@dimen/small_margin"
android:layout_marginRight="@dimen/default_margin"
android:outlineSpotShadowColor="@color/colorPrimary"
app:cardElevation="@dimen/default_margin_alt">
app:cardElevation="@dimen/default_margin_alt"
app:cardPreventCornerOverlap="false">

<androidx.appcompat.widget.AppCompatImageView
android:layout_width="match_parent"
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values-ar/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -443,4 +443,5 @@
<string name="vip_force_device_idle">Force device-idle (Doze)</string>
<string name="you_are_not_logged_in">لم يتم دخولك</string>
<string name="apps_manager_system_apps">System apps</string>
<string name="source_code">مصدر الرمز</string>
</resources>
1 change: 1 addition & 0 deletions app/src/main/res/values-de/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -446,4 +446,5 @@
<string name="you_are_not_logged_in">Du bist nicht eingeloggt</string>
<string name="notification_settings">Benachrichtigungseinstellungen</string>
<string name="vip_smart_pixels">Smart Pixels</string>
<string name="source_code">Quellcode</string>
</resources>
21 changes: 21 additions & 0 deletions app/src/main/res/values-es/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -496,5 +496,26 @@
<string name="manufacturer">Fabricante</string>
<string name="brand">Marca</string>
<string name="scan">Escanear</string>
<string name="source_code">Código fuente</string>
<string name="title_dashboard">Tablero</string>
<string name="notifications">Notificaciones</string>
<string name="tune">Ajuste preciso</string>
<string name="statistics">Estadísticas</string>
<string name="battery_percentage">Porcentaje de batería</string>
<string name="vip_chart_no_data">Datos no disponibles. Habilite la recopilación de estadísticas en la configuración de VIP</string>
<string name="no_notifications">No Notificaciones</string>
<string name="legacy">Legado</string>
<string name="set_cpu_governor">Establecer el gobernador de la CPU</string>
<string name="eas_gov_warning">Advertencia: Parece que está utilizando un kernel EAS, de ser así, no intente cambiar esta opción.</string>
<string name="root_access_required">Se requiere acceso de root</string>
<string name="doze_sum">El modo Doze reduce el consumo de batería al diferir la CPU en segundo plano y la actividad de la red para las aplicaciones cuando el dispositivo no se usa durante largos períodos de tiempo hasta las ventanas de mantenimiento</string>
<string name="vip_allow_stats_collection">Permitir recopilación de estadísticas</string>
<string name="vip_allow_stats_collection_sum">Hace que VIP recopile información de la batería periódicamente para fines de informes</string>
<string name="vip_smart_pixels_sum">Apaga algunos píxeles de la pantalla para reducir el consumo de energía. La implementación depende del framework.</string>
<string name="vip_default_saver_sum">Activa el modo de ahorro de energía predeterminado de Android independientemente del nivel de batería</string>
<string name="vpi_cpu_sum">Cambiar el gobernador de la CPU cuando está activado</string>
<string name="vip_grayscale_sum">Activa el modo de escala de grises para ahorrar energía. Advertencia: esto anulará cualquier modo daltónico o configuración anterior de KCAL.</string>
<string name="vip_doze_sum">Fuerza el modo inactivo del dispositivo inmediatamente independientemente de cualquier estado anterior.</string>
<string name="vip_force_stop_sum">Forzar la detención de aplicaciones cuando está activado</string>

</resources>
1 change: 1 addition & 0 deletions app/src/main/res/values-hi/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -448,4 +448,5 @@
<string name="special_offer">विशेष पेशकश</string>
<string name="purchase_offer_warning">सीमित समय के लिए विशेष छूट के साथ प्रीमियम पैकेज प्राप्त करें!</string>
<string name="rootless_warning">आप रूटलेस मोड में हैं। कई विकल्प केवल रूट एक्सेस के साथ उपलब्ध हैं। फिर से सुपरयुसर अधिकारों का अनुरोध करने के लिए टैप करें।</string>
<string name="source_code">सोर्स कोड</string>
</resources>
1 change: 1 addition & 0 deletions app/src/main/res/values-in/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -462,5 +462,6 @@
<string name="battery_connection_ac">adaptor AC</string>
<string name="battery_connection_usb">USB</string>
<string name="battery_connection_wireless">pengisi daya nirkabel</string>
<string name="source_code">Kode sumber</string>

</resources>
1 change: 1 addition & 0 deletions app/src/main/res/values-pt/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -516,4 +516,5 @@
<string name="manufacturer">Fabricante</string>
<string name="brand">Marca</string>
<string name="scan">Escanear</string>
<string name="source_code">Código fonte</string>
</resources>
1 change: 1 addition & 0 deletions app/src/main/res/values-tr/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,7 @@
<string name="usage_stats_sum">Mevcut ön plan uygulamasını almak için kullanılır</string>
<string name="write_sys_settings">Sistem ayarlarını yaz</string>
<string name="write_sys_settings_sum">Parlaklığı ve ekran zaman aşımını değiştirmek için kullanılır</string>
<string name="source_code">Kaynak kodu</string>


</resources>
Loading

0 comments on commit 0e1f7ef

Please sign in to comment.