androidx

android:unable to make multiline chipgroup

风格不统一 提交于 2019-12-11 08:02:26
问题 I have a chipgroup within a relative layout along with a textview whose code is shown below. <RelativeLayout ... <TextView android:layout_width="30dp" android:layout_height="wrap_content" android:text="TextTitle" android:layout_alignParentStart="true" android:gravity="left" android:layout_marginTop="16dp" android:textColor="@android:color/white" android:textStyle="bold" android:textSize="14sp" android:id="@+id/tv" android:layout_toLeftOf="@id/cg" android:layout_alignBaseline="@id/cg" /> <com

What replaced appcompat-v7 in AndroidX

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-11 07:48:40
问题 After migrating a couple of my older projects over to AndroidX it as though three of my dependencies are deprecated: implementation 'com.android.support:appcompat-v7:28.0.0' implementation 'com.android.support:design:28.0.0' implementation 'com.android.support:cardview-v7:28.0.0' I haven't been able to find a replacement for these dependencies. Does AndroidX have an equivalent for these dependencies? 回答1: Use in the order: implementation 'androidx.appcompat:appcompat:1.0.2' implementation

Why am I seeing only decompiled source for an official android class? [closed]

╄→尐↘猪︶ㄣ 提交于 2019-12-11 06:20:26
问题 Closed . This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 20 days ago . Please note that I have previously installed Documentation for Android SDK via AS 3.5.2 SDK manager Consider the following inconsistent behavior whilst editing java source code ... import android.app.Fragment; // Deprecated! If I hover over Fragment I get extensive, beautifully-formatted JavaDoc

Androidx ServiceTestRule cannot find my service

烂漫一生 提交于 2019-12-11 05:39:31
问题 To be fair, I am not testing the service, but am using a service as part of my test classes to test a Bluetooth library. So my test class needs to create a service that invokes the Bluetooth library. The test class then needs to bind to this service to perform the tests. However, attempting to start the service always gives me the following error which leads to a Nullpointer exception W/ActivityManager: Unable to start service Intent { cmp=com.example.androidhdpadapter.test/com

Room persistence library (dependency issue), MVVM design pattern

a 夏天 提交于 2019-12-11 03:17:23
问题 Iam following MVVM tutorial and when adding Room dependency 1- I got this this error in compile: Note: Failed to read get kotlin metadata for [Ljava.lang.Object;@54d771f9 Note: Failed to read get kotlin metadata for [Ljava.lang.Object;@4c00a268 Note: Failed to read get kotlin metadata for [Ljava.lang.Object;@42104314 Note: Failed to read get kotlin metadata for [Ljava.lang.Object;@203b72ad 2- also this: (SOLVED) error: cannot find symbol class of when adding this code in MainActivity : public

How to style an app migrating to MaterialComponents, AndroidX and AppCompat

让人想犯罪 __ 提交于 2019-12-10 18:17:49
问题 I want to migrate to: androidx.appcompat:appcompat com.google.android.material:material And forget about support library dependencies, but I have some questions: Which style should I use for ProgressBar in order to maintain compatibility? v21: Widget.ProgressBar.Horizontal Support Library: Widget.AppCompat.ProgressBar When should I use compat styles vs materialcomponents styles? Like @style/TextAppearance.MaterialComponents.Body1 or TextAppearance.AppCompat.Title ? Im still confused about

No static method dispatchUnhandledKeyEventPre

好久不见. 提交于 2019-12-10 17:20:01
问题 My app crashes whenever i press the back button or the menu button. I'm using androidx and kotlin. Below is my logcat 07-06 18:47:25.538 22303-22303/com.mnkafe.mnkafe E/InputEventSender: Exception dispatching finished signal. 07-06 18:47:25.538 22303-22303/com.mnkafe.mnkafe E/MessageQueue-JNI: Exception in MessageQueue callback: handleReceiveCallback 07-06 18:47:25.558 22303-22303/com.mnkafe.mnkafe E/MessageQueue-JNI: java.lang.NoSuchMethodError: No static method dispatchUnhandledKeyEventPre

Failing to load next data with android Paging library

随声附和 提交于 2019-12-10 17:19:33
问题 I am trying to show call log list using Room-Paging-LiveData-ViewModel. Without paging my code works perfectly. And I want to use paging also. In my database I have total 25 call log record. The first 9 call log is showing in the list. By debugging I found that while reading data in view model via Dao , it is returning list of size 25. But only first 9 of these are non null. All other entries in the list is null. I am expecting the null data will refresh soon as this is a paged list. But the

Andoridx Room rx issue

若如初见. 提交于 2019-12-10 16:55:44
问题 I'm start to use latest androidx.room version that support io.reactivex return type. dependencies { def room_version = "2.1.0-alpha02" implementation "androidx.room:room-rxjava2:$room_version" kapt "androidx.room:room-compiler:$room_version" testImplementation "androidx.room:room-testing:$room_version" } Simple dao class @Dao interface UserDao : BaseDao<UserTable> { @Insert(onConflict = OnConflictStrategy.IGNORE) fun insertUser(user: UserTable):Maybe<Long> @Update fun updateUser(user

How to display menu item Icons on Android 9 in Floating Action Mode

亡梦爱人 提交于 2019-12-10 15:57:08
问题 I have an Android menu XML that resembles this:- <item android:id="@+id/action_share" android:orderInCategory="100" android:icon="@drawable/ic_social_share" app:showAsAction="always" android:title="" /> <item android:id="@+id/action_something_else" android:orderInCategory="200" android:icon="@drawable/ic_airplanemode_active_black_24dp" app:showAsAction="always" android:title="" /> My Android code resembles this:- private void startActionMode() { startActionMode(new android.view.ActionMode