diff --git a/.idea/deploymentTargetDropDown.xml b/.idea/deploymentTargetDropDown.xml new file mode 100644 index 00000000..a8dfede7 --- /dev/null +++ b/.idea/deploymentTargetDropDown.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/build.gradle b/app/build.gradle index 30c979ca..e01fcc26 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -12,8 +12,8 @@ android { applicationId "com.starry.greenstash" minSdk 24 targetSdk 32 - versionCode 9 - versionName "1.8" + versionCode 10 + versionName "1.9" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" javaCompileOptions { diff --git a/app/src/main/java/com/starry/greenstash/others/ExpandableListView.java b/app/src/main/java/com/starry/greenstash/others/ExpandableListView.java deleted file mode 100644 index 97032ded..00000000 --- a/app/src/main/java/com/starry/greenstash/others/ExpandableListView.java +++ /dev/null @@ -1,49 +0,0 @@ -package com.starry.greenstash.others; - -import android.content.Context; -import android.util.AttributeSet; -import android.view.ViewGroup; -import android.widget.ListView; - - -public class ExpandableListView extends ListView { - - boolean expanded = false; - - public ExpandableListView(Context context) { - super(context); - } - - public ExpandableListView(Context context, AttributeSet attrs) { - super(context, attrs); - } - - public ExpandableListView(Context context, AttributeSet attrs, int defStyle) { - super(context, attrs, defStyle); - } - - public boolean isExpanded() { - return expanded; - } - - public void setExpanded(boolean expanded) { - this.expanded = expanded; - } - - @Override - public void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { - // HACK! TAKE THAT ANDROID! - if (isExpanded()) { - // Calculate entire height by providing a very large height hint. - // But do not use the highest 2 bits of this integer; those are - // reserved for the MeasureSpec mode. - int expandSpec = MeasureSpec.makeMeasureSpec(Integer.MAX_VALUE >> 2, MeasureSpec.AT_MOST); - super.onMeasure(widthMeasureSpec, expandSpec); - - ViewGroup.LayoutParams params = getLayoutParams(); - params.height = getMeasuredHeight(); - } else { - super.onMeasure(widthMeasureSpec, heightMeasureSpec); - } - } -} diff --git a/app/src/main/java/com/starry/greenstash/others/ExpandableListView.kt b/app/src/main/java/com/starry/greenstash/others/ExpandableListView.kt new file mode 100644 index 00000000..5679d86c --- /dev/null +++ b/app/src/main/java/com/starry/greenstash/others/ExpandableListView.kt @@ -0,0 +1,32 @@ +package com.starry.greenstash.others + +import android.content.Context +import android.util.AttributeSet +import android.widget.ListView + +class ExpandableListView : ListView { + var isExpanded = false + + constructor(context: Context?) : super(context) + constructor(context: Context?, attrs: AttributeSet?) : super(context, attrs) + constructor(context: Context?, attrs: AttributeSet?, defStyle: Int) : super( + context, + attrs, + defStyle + ) + + public override fun onMeasure(widthMeasureSpec: Int, heightMeasureSpec: Int) { + // HACK! TAKE THAT ANDROID! + if (isExpanded) { + // Calculate entire height by providing a very large height hint. + // But do not use the highest 2 bits of this integer; those are + // reserved for the MeasureSpec mode. + val expandSpec = MeasureSpec.makeMeasureSpec(Int.MAX_VALUE shr 2, MeasureSpec.AT_MOST) + super.onMeasure(widthMeasureSpec, expandSpec) + val params = layoutParams + params.height = measuredHeight + } else { + super.onMeasure(widthMeasureSpec, heightMeasureSpec) + } + } +} \ No newline at end of file diff --git a/fastlane/metadata/android/en-US/changelogs/10.txt b/fastlane/metadata/android/en-US/changelogs/10.txt new file mode 100644 index 00000000..80ac2a1d --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/10.txt @@ -0,0 +1,3 @@ +- Some under the hood improvements & fixes. +- Updated few dependencies. +- We now have a telegram group! Join us at https://t.me/PotApps \ No newline at end of file