androidx

FragmentManager and androidx FragmentManager

天大地大妈咪最大 提交于 2020-08-21 07:39:30
问题 I'm trying to setup in my app that is using androidX. My problem is that when I try to work with PlaceAutocompleteFragment I get errors because it is a fragment from android.app.fragment and my parent fragment is an androidx fragment: androidx.fragment.app.Fragment so it uses a androidx.fragment.app.FragmentManager instead of a android.app.FragmentManager . How can I work with "old" fragments in androidX? 回答1: Add this to dependencies: implementation 'androidx.appcompat:appcompat:1.0.2' . Add

Getting Androidx library issue even though its not enabled in android project

▼魔方 西西 提交于 2020-08-06 06:09:51
问题 I am getting this issue This project uses AndroidX dependencies, but the 'android.useAndroidX' property is not enabled. Set this property to true in the gradle.properties file and retry. The following AndroidX dependencies are detected: androidx.annotation:annotation:1.1.0 I keep getting this error and I have been searching the internet to figure out what is wrong and I cannot find anything "And I can't use Androidx library in my project " 回答1: In many of the answers on SO on this problem it

Not able to load wordpress post content fully in webview in wordpress app on API Level 29. But it works fine on API Level 26

我怕爱的太早我们不能终老 提交于 2020-07-23 07:22:11
问题 I'm developing WordPress app which fetches post from Wordpress site & loads it in webview. I'm using "WP REST API" (fetch post data in JSON) & retrofit library. In API 26 app is working fine WordPress post is loading fully after migrating to androidx API 29 post content is loading only 1-3 lines in some post & in another post 10 lines. what can be the cause for this?, Contents are not getting loaded fully. After migrating to androidX post were not getting loaded I was getting an error ERR

Not able to load wordpress post content fully in webview in wordpress app on API Level 29. But it works fine on API Level 26

被刻印的时光 ゝ 提交于 2020-07-23 07:20:20
问题 I'm developing WordPress app which fetches post from Wordpress site & loads it in webview. I'm using "WP REST API" (fetch post data in JSON) & retrofit library. In API 26 app is working fine WordPress post is loading fully after migrating to androidx API 29 post content is loading only 1-3 lines in some post & in another post 10 lines. what can be the cause for this?, Contents are not getting loaded fully. After migrating to androidX post were not getting loaded I was getting an error ERR

Unable to get provider androidx.lifecycle.ProcessLifecycleOwnerInitializr

99封情书 提交于 2020-07-20 07:21:28
问题 Getting error while running app which have dependencies 'androidx.lifecycle:lifecycle-extensions:2.1.0-alpha03' and 'androidx.lifecycle:lifecycle-viewmodel:2.1.0-alpha03' on device with Android 4.4. Works fine in device with Android 6 App getting crashed with error java.lang.RuntimeException: Unable to get provider androidx.lifecycle.ProcessLifecycleOwnerInitializer: java.lang.ClassNotFoundException: Didn't find class "androidx.lifecycle.ProcessLifecycleOwnerInitializer" on path: DexPathList[

AndroidX Preference Screen shifted off center [duplicate]

為{幸葍}努か 提交于 2020-07-18 07:21:28
问题 This question already has answers here : Android: How to remove margin/padding in Preference Screen (17 answers) Closed 12 months ago . I have a preference screen in my app and it is shifted off center and the header text or data doesn't start from the left shown in the image below. I am initializing the settings fragment. I have not applied any visual changes or added any special attributes. There is no padding or margin in the parent activity. I also have a recycler view which is displayed

Cannot access 'androidx.lifecycle.HasDefaultViewModelProviderFactory' which is a supertype of 'FavoriteBottomDialogFragment'. Check your module cla

﹥>﹥吖頭↗ 提交于 2020-07-15 11:56:01
问题 I am getting error in the whole class that extends BottomSheetDialogFragment Cannot access 'androidx.lifecycle.HasDefaultViewModelProviderFactory' which is a supertype of 'FavoriteBottomDialogFragment'. Check your module classpath for missing or conflicting dependencies The class is in app module and this module implements two other modules : core and presentation-core build.gradle dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation project (':core')

Cannot get Switch menu item because R.id.* is different from menu items' internal ids

半城伤御伤魂 提交于 2020-07-10 10:28:38
问题 I am not able to use setOnCheckedChangeListener because getting a Switch menu item by id won't work as the resource id is different from the menu id. This is what I've got: Toolbar <?xml version="1.0" encoding="utf-8"?> <androidx.appcompat.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content" xmlns:app="http://schemas.android.com/apk/res-auto" android:theme="@style/Theme.AppCompat.Light.DarkActionBar"

What is the Jetpack Compose equivalent of RecyclerView or ListView?

巧了我就是萌 提交于 2020-07-09 14:34:05
问题 In Jetpack Compose, how can I display a large list of data while laying out only the visible items, instead of composing and laying out every item on the initial layout pass? This would be similar to RecyclerView and ListView in the View toolkit. One could use a for loop to place all of the components inside of a Column in a VerticalScroller , but this would result in dropped frames and poor performance on larger numbers of items. Note: this is intended as a canonical self-answered question

What is the Jetpack Compose equivalent of RecyclerView or ListView?

微笑、不失礼 提交于 2020-07-09 14:33:09
问题 In Jetpack Compose, how can I display a large list of data while laying out only the visible items, instead of composing and laying out every item on the initial layout pass? This would be similar to RecyclerView and ListView in the View toolkit. One could use a for loop to place all of the components inside of a Column in a VerticalScroller , but this would result in dropped frames and poor performance on larger numbers of items. Note: this is intended as a canonical self-answered question