Skip to content

Commit

Permalink
Rekado 4.1.1
Browse files Browse the repository at this point in the history
- Updated: Localization center moved to the "Crowdin".
- Updated: "Jungle" theme replaced with "Retro wave" theme.
- Updated: All payloads to the up-to-date versions.
- Updated: Overhaul design of the "Themes" screen.
- Updated: Icons and padding in whole app.
- Fixed: Title and description cut off in the "Tools" screen.
  • Loading branch information
MenosGrante committed Jan 26, 2021
1 parent bdcd082 commit 46fbc2b
Show file tree
Hide file tree
Showing 31 changed files with 85 additions and 263 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ This problem is in most cases not related to the used device, but to the cable o
This problems occurs on device with old USB-controllers installed in their devices (EHCI/USB 2.0). This is device-only problem, that can be fixed with installing additional kernel patches, what is not recommended to do yourself. Only devices with xHCI (USB 3.0) controllers supported now.

## Localization
All localization files moved to OneSky platform (which I am using for my other projects) and if you want to add/update/check any localization follow [this link](https://rekundevelopment.oneskyapp.com/collaboration/project?id=336657) to start. I will decline all pull requests with your localizations and will accept only OneSky versions, which I will manually add in new updates.
All localization files moved to Crowdin platform (which I am using for my other projects) and if you want to add/update/check any localization follow [this link](https://crowdin.com/project/rekado) to start. I will decline all pull requests with your localizations and will accept only Crowdin versions, which I will manually add in new updates.

## FAQ
**Does application require Root?**
Expand Down
18 changes: 8 additions & 10 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ android {
applicationId "com.pavelrekun.rekado"
minSdkVersion minimumSDKVersion
targetSdkVersion currentSDKVersion
versionCode 73
versionName "4.1"
versionCode 74
versionName "4.1.1"

archivesBaseName = "[$versionName] Rekado [${versionCode}]"
}
Expand Down Expand Up @@ -45,38 +45,36 @@ android {
noCompress 'bin'
}

viewBinding {
enabled = true
buildFeatures {
viewBinding = true
}

}

dependencies {

// Local
// Private libraries
implementation(name: 'magta', ext: 'aar')
implementation(name: 'penza', ext: 'aar')

// Google: AndroidX
implementation "androidx.core:core-ktx:$androidXCoreVersion"
implementation "androidx.recyclerview:recyclerview:$androidXRecyclerViewVersion"
implementation "androidx.browser:browser:$androidXBrowserVersion"
implementation "androidx.preference:preference:$androidXPreferencesVersion"
implementation "androidx.preference:preference-ktx:$androidXPreferencesVersion"
implementation "androidx.constraintlayout:constraintlayout:$androidXConstraintLayoutVersion"
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$androidXLifecycleVersion"
implementation "androidx.lifecycle:lifecycle-livedata-ktx:$androidXLifecycleVersion"
implementation "androidx.lifecycle:lifecycle-common-java8:$androidXLifecycleVersion"
implementation "androidx.navigation:navigation-fragment-ktx:$androixXNavigationVersion"
implementation "androidx.navigation:navigation-ui-ktx:$androixXNavigationVersion"

// Google: AndroidX KTX
implementation "androidx.core:core-ktx:$androidXCoreKTX"

// Google: Design
implementation "com.google.android.material:material:$materialComponentsVersion"
implementation "com.google.android:flexbox:$flexBoxLayoutVersion"

// Design
implementation "de.halfbit:edge-to-edge:$edgeToEdgeVersion"
implementation "dev.chrisbanes.insetter:insetter:$insetterVersion"

// Tools
implementation "org.greenrobot:eventbus:$eventBusVersion"
Expand Down
Binary file modified app/libs/magta.aar
Binary file not shown.
Binary file modified app/libs/penza.aar
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ import com.pavelrekun.rekado.base.BaseActivity
import com.pavelrekun.rekado.databinding.ActivityContainerSecondaryBinding
import com.pavelrekun.rekado.services.dialogs.DialogsShower
import com.pavelrekun.rekado.services.extensions.*
import de.halfbit.edgetoedge.Edge
import de.halfbit.edgetoedge.edgeToEdge
import dev.chrisbanes.insetter.applySystemWindowInsetsToPadding

class SecondaryContainerActivity : BaseActivity() {

Expand Down Expand Up @@ -46,9 +45,7 @@ class SecondaryContainerActivity : BaseActivity() {
DesignHelper.tintNavigationBar(this, Color.TRANSPARENT)
}

edgeToEdge {
binding.secondaryLayoutToolbar.fit { Edge.Top }
}
binding.secondaryLayoutToolbar.applySystemWindowInsetsToPadding(top = true)
}

private fun navigate() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ import com.pavelrekun.rekado.databinding.FragmentAboutBinding
import com.pavelrekun.rekado.services.Constants
import com.pavelrekun.rekado.services.extensions.viewBinding
import com.pavelrekun.rekado.services.utils.Utils
import de.halfbit.edgetoedge.Edge
import de.halfbit.edgetoedge.edgeToEdge
import dev.chrisbanes.insetter.applySystemWindowInsetsToPadding

class AboutFragment : BaseFragment(R.layout.fragment_about) {

Expand Down Expand Up @@ -40,9 +39,7 @@ class AboutFragment : BaseFragment(R.layout.fragment_about) {
}

private fun initEdgeToEdge() {
edgeToEdge {
binding.aboutLayoutContainer.fit { Edge.Bottom }
}
binding.aboutLayoutContainer.applySystemWindowInsetsToPadding(bottom = true)
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,11 @@ class PayloadsFragment : BaseFragment(R.layout.fragment_payloads) {
}

private fun initObservers() {
viewModel.isProgressShowing.observe(viewLifecycleOwner, Observer { isShowing ->
viewModel.isProgressShowing.observe(viewLifecycleOwner, { isShowing ->
if (isShowing) showProgress() else hideProgress()
})

viewModel.fetchConfigResult.observe(viewLifecycleOwner, Observer { result ->
viewModel.fetchConfigResult.observe(viewLifecycleOwner, { result ->
when (result) {
Result.SUCCESS -> {
DialogsShower.showPayloadsUpdatesDialog(requireBaseActivity(), result.config, viewModel)
Expand All @@ -86,7 +86,7 @@ class PayloadsFragment : BaseFragment(R.layout.fragment_payloads) {
}
})

viewModel.updatePayloadResult.observe(viewLifecycleOwner, Observer { result ->
viewModel.updatePayloadResult.observe(viewLifecycleOwner, { result ->
when (result) {
Result.SUCCESS -> {
updateList()
Expand All @@ -96,7 +96,7 @@ class PayloadsFragment : BaseFragment(R.layout.fragment_payloads) {
}
})

viewModel.downloadPayloadResult.observe(viewLifecycleOwner, Observer { result ->
viewModel.downloadPayloadResult.observe(viewLifecycleOwner, { result ->
when (result) {
Result.SUCCESS -> {
updateList()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,12 @@ import com.pavelrekun.rekado.R
import com.pavelrekun.rekado.base.BaseFragment
import com.pavelrekun.rekado.databinding.FragmentSerialCheckerBinding
import com.pavelrekun.rekado.services.Constants
import com.pavelrekun.rekado.services.utils.SerialUtils
import com.pavelrekun.rekado.services.extensions.getString
import com.pavelrekun.rekado.services.extensions.isEmpty
import com.pavelrekun.rekado.services.extensions.viewBinding
import com.pavelrekun.rekado.services.utils.SerialUtils
import com.pavelrekun.rekado.services.utils.Utils
import de.halfbit.edgetoedge.Edge
import de.halfbit.edgetoedge.edgeToEdge
import dev.chrisbanes.insetter.applySystemWindowInsetsToPadding

class SerialCheckerFragment : BaseFragment(R.layout.fragment_serial_checker) {

Expand Down Expand Up @@ -74,9 +73,7 @@ class SerialCheckerFragment : BaseFragment(R.layout.fragment_serial_checker) {
}

private fun initEdgeToEdge() {
edgeToEdge {
binding.serialCheckerLayoutContainer.fit { Edge.Bottom }
}
binding.serialCheckerLayoutContainer.applySystemWindowInsetsToPadding(bottom = true)
}

override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,19 @@ import android.view.View
import androidx.preference.CheckBoxPreference
import androidx.preference.ListPreference
import androidx.preference.Preference
import com.pavelrekun.magta.restartApp
import com.pavelrekun.penza.Penza
import com.pavelrekun.penza.services.helpers.SettingsDialogsHelper
import com.pavelrekun.rekado.R
import com.pavelrekun.rekado.base.BasePreferencesFragment
import com.pavelrekun.rekado.containers.PrimaryContainerActivity
import com.pavelrekun.rekado.services.dialogs.DialogsShower
import com.pavelrekun.rekado.services.extensions.openSettingsAppearanceThemesScreen
import com.pavelrekun.rekado.services.payloads.PayloadHelper
import com.pavelrekun.rekado.services.utils.LoginUtils
import com.pavelrekun.rekado.services.utils.PreferencesUtils
import com.pavelrekun.rekado.services.utils.Utils
import de.halfbit.edgetoedge.Edge
import de.halfbit.edgetoedge.edgeToEdge
import dev.chrisbanes.insetter.applySystemWindowInsetsToPadding

class SettingsFragment : BasePreferencesFragment(R.xml.preferences, R.string.navigation_settings) {

Expand Down Expand Up @@ -70,15 +71,15 @@ class SettingsFragment : BasePreferencesFragment(R.xml.preferences, R.string.nav
appearanceRandomize.setOnPreferenceClickListener {
SettingsDialogsHelper.showSettingsRestartDialog(requireBaseActivity()) {
Penza.randomizeTheme()
Utils.restartApplication(requireBaseActivity())
requireBaseActivity().restartApp(PrimaryContainerActivity::class)
}
true
}

appearanceReset.setOnPreferenceClickListener {
SettingsDialogsHelper.showSettingsRestartDialog(requireBaseActivity()) {
Penza.reset()
Utils.restartApplication(requireBaseActivity())
requireBaseActivity().restartApp(PrimaryContainerActivity::class)
}
true
}
Expand Down Expand Up @@ -140,9 +141,7 @@ class SettingsFragment : BasePreferencesFragment(R.xml.preferences, R.string.nav


private fun initEdgeToEdge() {
edgeToEdge {
listView.fit { Edge.Bottom }
}
listView.applySystemWindowInsetsToPadding(bottom = true)
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ import com.pavelrekun.rekado.base.BaseFragment
import com.pavelrekun.rekado.databinding.FragmentTranslatorsBinding
import com.pavelrekun.rekado.screens.translators_fragment.adapters.TranslatorsAdapter
import com.pavelrekun.rekado.services.extensions.viewBinding
import de.halfbit.edgetoedge.Edge
import de.halfbit.edgetoedge.edgeToEdge
import dev.chrisbanes.insetter.applySystemWindowInsetsToPadding

class TranslatorsFragment : BaseFragment(R.layout.fragment_translators) {

Expand Down Expand Up @@ -40,9 +39,7 @@ class TranslatorsFragment : BaseFragment(R.layout.fragment_translators) {
}

private fun initEdgeToEdge() {
edgeToEdge {
binding.translatorsData.fit { Edge.Bottom }
}
binding.translatorsData.applySystemWindowInsetsToPadding(bottom = true)
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ import android.widget.ArrayAdapter
import android.widget.Toast
import androidx.appcompat.app.AlertDialog
import com.google.android.material.dialog.MaterialAlertDialogBuilder
import com.pavelrekun.magta.restartApp
import com.pavelrekun.penza.services.helpers.SettingsDialogsHelper
import com.pavelrekun.rekado.BuildConfig
import com.pavelrekun.rekado.R
import com.pavelrekun.rekado.base.BaseActivity
import com.pavelrekun.rekado.containers.PrimaryContainerActivity
import com.pavelrekun.rekado.data.Config
import com.pavelrekun.rekado.databinding.DialogDonateBinding
import com.pavelrekun.rekado.databinding.DialogPayloadDownloadBinding
Expand Down Expand Up @@ -119,7 +120,7 @@ object DialogsShower {

fun showSettingsRestartDialog(activity: BaseActivity) {
SettingsDialogsHelper.showSettingsRestartDialog(activity) {
Utils.restartApplication(activity)
activity.restartApp(PrimaryContainerActivity::class)
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
package com.pavelrekun.rekado.services.utils

import android.content.Intent
import android.hardware.usb.UsbDevice
import android.net.Uri
import androidx.browser.customtabs.CustomTabsIntent
import androidx.core.app.ActivityCompat
import com.pavelrekun.rekado.base.BaseActivity
import com.pavelrekun.rekado.containers.PrimaryContainerActivity

object Utils {

Expand Down Expand Up @@ -37,12 +34,6 @@ object Utils {
return result.toString()
}

fun restartApplication(activity: BaseActivity) {
val intent = Intent(activity, PrimaryContainerActivity::class.java)
ActivityCompat.finishAffinity(activity)
activity.startActivity(intent)
}

fun isRCM(device: UsbDevice) = device.vendorId == RCM_DEVICE_ID && device.productId == RCM_VENDOR_ID

}
7 changes: 3 additions & 4 deletions app/src/main/res/drawable/ic_about_twitter.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@
xmlns:tools="http://schemas.android.com/tools"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
android:viewportWidth="96"
android:viewportHeight="96">

<path
android:fillColor="?attr/colorIcon"
android:pathData="M22.46 6c-0.77 0.35-1.6 0.58-2.46 0.69 0.88-0.53 1.56-1.37 1.88-2.38-0.83 0.5-1.75 0.85-2.72 1.05C18.37 4.5 17.26 4 16 4c-2.35 0-4.27 1.92-4.27 4.29 0 0.34 0.04 0.67 0.11 0.98C8.28 9.09 5.11 7.38 3 4.79 2.63 5.42 2.42 6.16 2.42 6.94c0 1.49 0.75 2.81 1.91 3.56-0.71 0-1.37-0.2-1.95-0.5v0.03c0 2.08 1.48 3.82 3.44 4.21-0.36 0.1-0.74 0.15-1.13 0.15-0.27 0-0.54-0.03-0.8-0.08 0.54 1.69 2.11 2.95 4 2.98-1.46 1.16-3.31 1.84-5.33 1.84-0.34 0-0.68-0.02-1.02-0.06C3.44 20.29 5.7 21 8.12 21 16 21 20.33 14.46 20.33 8.79c0-0.19 0-0.37-0.01-0.56 0.84-0.6 1.56-1.36 2.14-2.23z"
android:pathData="M46.27,25.29C49.87,18.53 58.17,14.65 65.66,16.4C69.08,17.2 71.9,19.46 75.18,20.63C79.5,20.33 83.37,18.02 87.52,16.93C85.54,20.36 82.92,23.33 80.06,26.05C82.46,25.71 84.85,25.34 87.25,25.04C85.08,27.57 82.51,29.78 80.62,32.54C79.61,36.03 79.9,39.73 79.25,43.29C76.67,59.62 63.85,73.61 47.94,77.93C34.81,81.99 20.1,79.9 8.65,72.31C16.71,71.94 25.46,71.95 32.05,66.56C28.44,65.46 24.61,64.72 21.37,62.67C19.02,61.09 17.45,58.65 15.87,56.37C19.62,56.3 23.37,56.33 27.12,56.02C23.15,54.08 18.83,52.51 15.68,49.3C13.6,47.18 12.66,44.3 11.67,41.58C15.17,42.42 18.74,43 22.35,43.13C19.27,40.08 15.52,37.55 13.35,33.71C11.16,29.63 12,24.83 12.84,20.5C17.3,24.31 21.32,28.77 26.59,31.51C31.77,34.4 37.66,35.82 43.57,36.05C44.18,32.41 44.5,28.6 46.27,25.29M55.44,26.44C50.45,30.8 52.43,38.12 51.9,43.94C44.89,44.4 37.89,43.7 31.02,42.37C32,51.68 37.32,59.64 43.48,66.37C42.37,68.14 41,69.73 39.89,71.5C43.78,70.79 47.69,69.94 51.28,68.24C65.05,62.1 74.03,46.3 71.59,31.34C70.11,24.4 60.55,21.63 55.44,26.44Z"
tools:fillColor="@color/colorBlack" />

</vector>
2 changes: 1 addition & 1 deletion app/src/main/res/layout/activity_container_primary.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
android:layout_height="wrap_content"
android:background="?android:attr/windowBackground"
android:elevation="0dp"
android:paddingStart="8dp"
android:paddingStart="24dp"
android:paddingEnd="8dp"
app:titleTextColor="?android:attr/textColorPrimary" />

Expand Down
6 changes: 4 additions & 2 deletions app/src/main/res/layout/fragment_about.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginStart="24dp"
android:layout_marginTop="16dp"
android:layout_marginEnd="24dp"
android:background="?attr/colorDivider" />

<com.google.android.material.card.MaterialCardView
Expand All @@ -75,7 +77,7 @@
android:orientation="vertical">

<TextView
style="@style/Widget.Text.Gilroy.Subtitle.Padding"
style="@style/Widget.Text.Subtitle.Padding"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/about_category_description" />
Expand Down Expand Up @@ -109,7 +111,7 @@
android:paddingBottom="16dp">

<TextView
style="@style/Widget.Text.Gilroy.Subtitle.Padding"
style="@style/Widget.Text.Subtitle.Padding"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/about_category_developer" />
Expand Down
8 changes: 4 additions & 4 deletions app/src/main/res/layout/fragment_instructions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
android:orientation="vertical">

<TextView
style="@style/Widget.Text.Gilroy.Subtitle.Padding"
style="@style/Widget.Text.Subtitle.Padding"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/instructions_category_cable" />
Expand Down Expand Up @@ -58,7 +58,7 @@
android:orientation="vertical">

<TextView
style="@style/Widget.Text.Gilroy.Subtitle.Padding"
style="@style/Widget.Text.Subtitle.Padding"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/instructions_category_payload" />
Expand Down Expand Up @@ -96,7 +96,7 @@
android:orientation="horizontal">

<TextView
style="@style/Widget.Text.Gilroy.Subtitle.Padding"
style="@style/Widget.Text.Subtitle.Padding"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
Expand Down Expand Up @@ -146,7 +146,7 @@
android:orientation="vertical">

<TextView
style="@style/Widget.Text.Gilroy.Subtitle.Padding"
style="@style/Widget.Text.Subtitle.Padding"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/instructions_category_final" />
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/fragment_payloads.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
android:orientation="vertical">

<TextView
style="@style/Widget.Text.Gilroy.Subtitle.Padding"
style="@style/Widget.Text.Subtitle.Padding"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/navigation_payloads" />
Expand Down
Loading

0 comments on commit 46fbc2b

Please sign in to comment.