Adventech/sabbath-school-android

Support for Android 4.3

Closed this issue · 6 comments

Support for Android 4.3

Oh no, forget about this old stuff )

There are tons of old Samsung, Huawei, Xiaomi, etc phones that don't work as expected with 4.x. Especially with WebView.

For context these are the changes we need to make to support 4.3.

I did not manually test this yet so you can pull from this branch and see if it's worth it.

So far I could test the login screen.

  1. When clicking "anonymous" button the confirmation dialogue seems to be positioned in such a way that the buttons are unclickable (Yes, No). Somehow after few crashes they were clickable and I was able to press "Yes".

  2. Then it crashed with this exception:

06-06 11:20:15.336 25421-25421/com.cryart.sabbathschool E/AndroidRuntime: FATAL EXCEPTION: main
    android.content.res.Resources$NotFoundException: File res/drawable/bg_cover.xml from drawable resource ID #0x7f08005e. If the resource you are trying to use is a vector resource, you may be referencing it in an unsupported way. See AppCompatDelegate.setCompatVectorFromResourcesEnabled() for more info.
        at android.content.res.Resources.loadDrawable(Resources.java:2091)
        at android.content.res.Resources.getDrawable(Resources.java:695)
        at androidx.appcompat.widget.VectorEnabledTintResources.superGetDrawable(VectorEnabledTintResources.java:78)
        at androidx.appcompat.widget.ResourceManagerInternal.onDrawableLoadedFromResources(ResourceManagerInternal.java:353)
        at androidx.appcompat.widget.VectorEnabledTintResources.getDrawable(VectorEnabledTintResources.java:70)
        at androidx.core.content.ContextCompat.getDrawable(ContextCompat.java:457)
        at com.cryart.sabbathschool.lessons.ui.quarterlies.SSQuarterlyItemViewModel$Companion.placeholderDrawable(SSQuarterlyItemViewModel.kt:108)
        at com.cryart.sabbathschool.lessons.ui.quarterlies.SSQuarterlyItemViewModel$Companion.loadCover(SSQuarterlyItemViewModel.kt:99)
        at com.cryart.sabbathschool.lessons.ui.quarterlies.SSQuarterlyItemViewModel.loadCover(SSQuarterlyItemViewModel.kt)
        at com.cryart.sabbathschool.lessons.databinding.SsQuarterlyItemFeaturedBindingImpl.executeBindings(SsQuarterlyItemFeaturedBindingImpl.java:163)
        at androidx.databinding.ViewDataBinding.executeBindingsInternal(ViewDataBinding.java:473)
        at androidx.databinding.ViewDataBinding.executePendingBindings(ViewDataBinding.java:445)
        at com.cryart.sabbathschool.lessons.ui.quarterlies.SSQuarterliesAdapter.onBindViewHolder(SSQuarterliesAdapter.java:88)
        at androidx.recyclerview.widget.RecyclerView$Adapter.onBindViewHolder(RecyclerView.java:7065)
        at androidx.recyclerview.widget.RecyclerView$Adapter.bindViewHolder(RecyclerView.java:7107)
        at androidx.recyclerview.widget.RecyclerView$Recycler.tryBindViewHolderByDeadline(RecyclerView.java:6012)
        at androidx.recyclerview.widget.RecyclerView$Recycler.tryGetViewHolderForPositionByDeadline(RecyclerView.java:6279)
        at androidx.recyclerview.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:6118)
        at androidx.recyclerview.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:6114)
        at androidx.recyclerview.widget.LinearLayoutManager$LayoutState.next(LinearLayoutManager.java:2303)
        at androidx.recyclerview.widget.LinearLayoutManager.layoutChunk(LinearLayoutManager.java:1627)
        at androidx.recyclerview.widget.LinearLayoutManager.fill(LinearLayoutManager.java:1587)
        at androidx.recyclerview.widget.LinearLayoutManager.onLayoutChildren(LinearLayoutManager.java:665)
        at androidx.recyclerview.widget.RecyclerView.dispatchLayoutStep2(RecyclerView.java:4134)
        at androidx.recyclerview.widget.RecyclerView.dispatchLayout(RecyclerView.java:3851)
        at androidx.recyclerview.widget.RecyclerView.onLayout(RecyclerView.java:4404)
        at android.view.View.layout(View.java:14289)
        at android.view.ViewGroup.layout(ViewGroup.java:4562)
        at com.google.android.material.appbar.HeaderScrollingViewBehavior.layoutChild(HeaderScrollingViewBehavior.java:148)
        at com.google.android.material.appbar.ViewOffsetBehavior.onLayoutChild(ViewOffsetBehavior.java:43)
        at com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior.onLayoutChild(AppBarLayout.java:2003)
        at androidx.coordinatorlayout.widget.CoordinatorLayout.onLayout(CoordinatorLayout.java:918)
        at android.view.View.layout(View.java:14289)
        at android.view.ViewGroup.layout(ViewGroup.java:4562)
        at android.widget.FrameLayout.onLayout(FrameLayout.java:448)
        at android.view.View.layout(View.java:14289)
        at android.view.ViewGroup.layout(ViewGroup.java:4562)
        at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1671)
        at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1525)
        at android.widget.LinearLayout.onLayout(LinearLayout.java:1434)
        at android.view.View.layout(View.java:14289)
        at android.view.ViewGroup.layout(ViewGroup.java:4562)
    	at android.widget

Closing due to the decision to not support Android 4.x anymore