Skip to content

Commit

Permalink
Revert to 2.1.1 for F-Droid
Browse files Browse the repository at this point in the history
  • Loading branch information
jackdevey committed Mar 18, 2021
1 parent cdf1a11 commit 3be5108
Show file tree
Hide file tree
Showing 97 changed files with 1,338 additions and 1,887 deletions.
7 changes: 1 addition & 6 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,6 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

### 2.1.1 - (2021-02-28)

This update fixes a crash with devices that have installed with an aab.

Only affects apps installed via the play store.

### 2.1.0 - (2021-02-28)

#### Added
Expand Down
82 changes: 36 additions & 46 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -50,71 +50,61 @@ android {
}

dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])

// AndroidX
implementation 'androidx.annotation:annotation:1.2.0-rc01'
implementation 'androidx.appcompat:appcompat:1.3.0-beta01'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.0-alpha2'
implementation 'androidx.coordinatorlayout:coordinatorlayout:1.1.0'
implementation 'androidx.core:core-ktx:1.5.0-beta03'
implementation 'androidx.preference:preference-ktx:1.1.1'
implementation 'androidx.recyclerview:recyclerview:1.2.0-beta02'
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.2.0-alpha01'
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation 'com.quiph.ui:recyclerviewfastscroller:1.0.0'
implementation 'nl.joery.animatedbottombar:library:1.0.9'
implementation 'org.greenrobot:eventbus:3.2.0'
implementation 'androidx.viewpager2:viewpager2:1.1.0-alpha01'
implementation 'com.google.android.material:material:1.3.0'

// AboutLibraries - https://github.com/mikepenz/AboutLibraries
implementation 'com.mikepenz:aboutlibraries-core:8.8.4'
// AboutLibraries
implementation 'com.mikepenz:aboutlibraries-core:8.8.3'

// Android Iconics - https://github.com/mikepenz/Android-Iconics
def iconics_version = "5.2.8"
implementation "com.mikepenz:iconics-core:$iconics_version"
implementation "com.mikepenz:iconics-views:$iconics_version"
implementation 'com.mikepenz:google-material-typeface-rounded:4.0.0.1-kotlin@aar'
implementation 'com.mikepenz:octicons-typeface:11.1.0.0-kotlin@aar'

// AnimatedBottomBar - https://github.com/Droppers/AnimatedBottomBar
implementation 'nl.joery.animatedbottombar:library:1.0.9'

// AppIntro - https://github.com/AppIntro/AppIntro
// AppIntro
implementation 'com.github.AppIntro:AppIntro:6.1.0'

// Eventbus - https://github.com/greenrobot/EventBus
implementation 'org.greenrobot:eventbus:3.2.0'
// Material components
implementation 'com.google.android.material:material:1.3.0'
implementation 'androidx.cardview:cardview:1.0.0'

// Lifecycle components
def lifecycle_version = "2.3.0"
implementation "androidx.lifecycle:lifecycle-livedata-ktx:$lifecycle_version"
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle_version"
// Sheets
def sheets_version = "2.1.3"
implementation "com.maxkeppeler.sheets:core:$sheets_version"
implementation "com.maxkeppeler.sheets:input:$sheets_version"
implementation "com.maxkeppeler.sheets:color:$sheets_version"
implementation "com.maxkeppeler.sheets:options:$sheets_version"
implementation "com.maxkeppeler.sheets:time:$sheets_version"

// AppCompat
implementation 'androidx.appcompat:appcompat:1.3.0-beta01'

// Material Drawer - https://github.com/mikepenz/MaterialDrawer
def drawer_version = "8.3.3"
implementation "com.mikepenz:materialdrawer:$drawer_version"
implementation "com.mikepenz:materialdrawer-iconics:$drawer_version"
// Preference
implementation 'androidx.preference:preference-ktx:1.1.1'

// Navigation components
def nav_version = "2.3.4"
def nav_version = "2.3.3"
implementation "androidx.navigation:navigation-fragment-ktx:$nav_version"
implementation "androidx.navigation:navigation-ui-ktx:$nav_version"

// RecyclerView-FastScroller - https://github.com/quiph/RecyclerView-FastScroller
implementation 'com.quiph.ui:recyclerviewfastscroller:1.0.0'
// Lifecycle components
def lifecycle_version = "2.3.0"
implementation "androidx.lifecycle:lifecycle-livedata-ktx:$lifecycle_version"
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle_version"

// Sheets - https://github.com/maxkeppeler/sheets
def sheets_version = "2.1.3"
implementation "com.maxkeppeler.sheets:core:$sheets_version"
implementation "com.maxkeppeler.sheets:input:$sheets_version"
implementation "com.maxkeppeler.sheets:color:$sheets_version"
implementation "com.maxkeppeler.sheets:options:$sheets_version"
implementation "com.maxkeppeler.sheets:time:$sheets_version"
// Recycler View
implementation 'androidx.recyclerview:recyclerview:1.2.0-beta02'

// Android KTX
implementation 'androidx.core:core-ktx:1.5.0-beta02'

// [Testing] Basic
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3-alpha04'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0-alpha04'

// Xplosion - https://github.com/BanDev/Xplosion
implementation 'uk.bandev:xplosion:1.0.5'
// Swipe to refresh
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.2.0-alpha01'

implementation 'com.github.BanDev:Xplosion:1.0.4'
}
5 changes: 2 additions & 3 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity
android:name=".activities.MainActivity"
android:name=".activities.Main"
android:label="@string/title_activity_main"
android:theme="@style/AppTheme.MainActivity" />

Expand Down Expand Up @@ -49,7 +49,6 @@
android:name=".activities.About"
android:label="@string/about"
android:theme="@style/About" />
<activity android:name=".activities.Migrate" />
<activity
android:name=".activities.TimerActivity"
android:theme="@style/Settings" />
Expand All @@ -58,7 +57,7 @@
android:label="@string/title_activity_settings"
android:theme="@style/Settings" />
<activity
android:name=".activities.IntroActivity" />
android:name=".activities.Intro" />
<activity
android:name=".activities.AboutLibraries" />

Expand Down
62 changes: 32 additions & 30 deletions app/src/main/java/org/bandev/buddhaquotes/activities/About.kt
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,12 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.

package org.bandev.buddhaquotes.activities

import android.graphics.Color
import android.os.Bundle
import android.view.View
import android.view.ViewGroup
import android.widget.ArrayAdapter
import android.widget.ListView
import androidx.appcompat.app.AppCompatActivity
import com.mikepenz.iconics.IconicsDrawable
import com.mikepenz.iconics.typeface.library.googlematerial.RoundedGoogleMaterial
import com.mikepenz.iconics.utils.colorInt
import com.mikepenz.iconics.utils.sizeDp
import org.bandev.buddhaquotes.R
import org.bandev.buddhaquotes.core.Colours
import org.bandev.buddhaquotes.core.Compatibility
Expand All @@ -45,47 +43,51 @@ class About : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)

// Set theme, navigation bar and language
Colours().setAccentColour(this, window, resources)
Compatibility().setNavigationBarColourDefault(this, window, resources)
Languages(baseContext).setLanguage()

// Setup view binding
binding = ActivityAboutBinding.inflate(layoutInflater)
setContentView(binding.root)

// Set accent colour, navigation bar and language
Colours().setAccentColour(this)
Colours().setStatusBar(this, window)
Compatibility().setNavigationBarColourDefault(this, window)
Languages(baseContext).setLanguage()

// Setup toolbar
setSupportActionBar(binding.toolbar)
with(binding.toolbar) {
navigationIcon =
IconicsDrawable(context, RoundedGoogleMaterial.Icon.gmr_arrow_back).apply {
colorInt = Color.WHITE
sizeDp = 16
}
setBackgroundColor(Colours().toolbarColour(context))
setNavigationOnClickListener {
onBackPressed()
}
binding.toolbar.setNavigationOnClickListener {
onBackPressed()
}

// Setup contributors array
val contributors = resources.getStringArray(R.array.contributors)
val contributorsAdapter = ArrayAdapter(this, R.layout.layout_list_item, contributors)
with(binding.contributorsList) {
adapter = contributorsAdapter
divider = null
isClickable = false
}
binding.contributorsList.adapter = contributorsAdapter
binding.contributorsList.divider = null
binding.contributorsList.isClickable = false
justifyListViewHeightBasedOnChildren(binding.contributorsList)

// Setup translators array
val translators = resources.getStringArray(R.array.translators)
val translatorsAdapter = ArrayAdapter(this, R.layout.layout_list_item, translators)
with(binding.translatorsList) {
adapter = translatorsAdapter
divider = null
isClickable = false
binding.translatorsList.adapter = translatorsAdapter
binding.translatorsList.divider = null
binding.translatorsList.isClickable = false
justifyListViewHeightBasedOnChildren(binding.translatorsList)
}

private fun justifyListViewHeightBasedOnChildren(listView: ListView) {
val adapter = listView.adapter ?: return
val vg: ViewGroup = listView
var totalHeight = 0
for (i in 0 until adapter.count) {
val listItem: View = adapter.getView(i, null, vg)
listItem.measure(0, 0)
totalHeight += listItem.measuredHeight + 10
}
val par = listView.layoutParams
par.height = totalHeight + listView.dividerHeight * (adapter.count - 1)
listView.layoutParams = par
listView.requestLayout()
}

override fun onBackPressed() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.

package org.bandev.buddhaquotes.activities

import android.graphics.Color
import android.os.Build
import android.os.Bundle
import android.text.Html
Expand All @@ -32,10 +31,6 @@ import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import com.mikepenz.aboutlibraries.Libs
import com.mikepenz.aboutlibraries.entity.Library
import com.mikepenz.iconics.IconicsDrawable
import com.mikepenz.iconics.typeface.library.googlematerial.RoundedGoogleMaterial
import com.mikepenz.iconics.utils.colorInt
import com.mikepenz.iconics.utils.sizeDp
import org.bandev.buddhaquotes.R
import org.bandev.buddhaquotes.core.Colours
import org.bandev.buddhaquotes.core.Compatibility
Expand All @@ -54,9 +49,8 @@ class AboutLibraries : AppCompatActivity() {
super.onCreate(savedInstanceState)

// Set theme, navigation bar and language
Colours().setAccentColour(this)
Colours().setStatusBar(this, window)
Compatibility().setNavigationBarColourDefault(this, window)
Colours().setAccentColour(this, window, resources)
Compatibility().setNavigationBarColourDefault(this, window, resources)
Languages(baseContext).setLanguage()

// Setup view binding
Expand All @@ -65,16 +59,8 @@ class AboutLibraries : AppCompatActivity() {

// Setup toolbar
setSupportActionBar(binding.toolbar)
with(binding.toolbar) {
navigationIcon =
IconicsDrawable(context, RoundedGoogleMaterial.Icon.gmr_arrow_back).apply {
colorInt = Color.WHITE
sizeDp = 16
}
setBackgroundColor(Colours().toolbarColour(context))
setNavigationOnClickListener {
onBackPressed()
}
binding.toolbar.setNavigationOnClickListener {
finish()
}

with(binding.recyclerView) {
Expand All @@ -83,7 +69,6 @@ class AboutLibraries : AppCompatActivity() {
}
}

@Suppress("DEPRECATION")
class LibraryAdapter(private val itemList: List<Library>) :
RecyclerView.Adapter<LibraryAdapter.LibraryViewHolder>() {

Expand Down Expand Up @@ -112,7 +97,9 @@ class AboutLibraries : AppCompatActivity() {

if (library.author.isNotEmpty()) {
binding.authorTextView.text = library.author
} else binding.authorTextView.visibility = View.GONE
} else {
binding.authorTextView.visibility = View.GONE
}

val license = library.licenses?.firstOrNull()
if (license != null) {
Expand All @@ -123,7 +110,10 @@ class AboutLibraries : AppCompatActivity() {
license.licenseShortDescription,
Html.FROM_HTML_MODE_COMPACT
)
} else Html.fromHtml(license.licenseShortDescription)
} else {
@Suppress("DEPRECATION")
Html.fromHtml(license.licenseShortDescription)
}
} else {
binding.licenseNameTextView.visibility = View.GONE
binding.licenseDescriptionTextView.visibility = View.GONE
Expand Down
Loading

0 comments on commit 3be5108

Please sign in to comment.