android-support-library

Vector Drawables flag doesn't work on Support Library 24+

你。 提交于 2019-12-20 11:21:08
问题 Today, it seems as though Android Nougat was released. Thus, I am more excited than ever to optimize my app for the new features like split-screen. I would like to push a version of my app that targets SDK version 24 so that users aren't notified that my app may not work in split-screen. However, doing so means that I should also update to version 24 of the Support Library. Like many others, I experienced a problem when updating to version 23.2.0 of the Support Library. However, I followed

Toolbar Search Suggestions Theming

非 Y 不嫁゛ 提交于 2019-12-20 10:41:39
问题 I’m trying to change search suggestions to “light theme”. I’m using appcompat-v7:22.2.0 library and read about new feature for customizing search view widget (android.support.v7.widget.SearchView). FIRST TRY SECTION Toolbar <android.support.v7.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="?attr/colorPrimary" android

What is the ButtonBarLayout and how should we use it?

落花浮王杯 提交于 2019-12-20 10:29:54
问题 When I developed, I found a new widget called android.support.v7.widget.ButtonBarLayout unexpectedly. I tried to search it on the internet, but nothing was found, even on the official development documents site. In the meantime, I found two ButtonBarLayout when I search ButtonBarLayout everywhere in Android Studio , one is android.support.v7.widget.ButtonBarLayout and the other is com.android.internal.widget.ButtonBarLayout . I tried to read source codes of both, I found that they are the

How to use BottomSheetDialog?

爱⌒轻易说出口 提交于 2019-12-20 10:23:25
问题 I want to try BottomSheetDialog introduced in Android Support Library 23.2 but it doesn't seem to work correctly. Here is what the doc says: While BottomSheetBehavior captures the persistent bottom sheet case, this release also provides a BottomSheetDialog and BottomSheetDialogFragment to fill the modal bottom sheets use case. Simply replace AppCompatDialog or AppCompatDialogFragment with their bottom sheet equivalents to have your dialog styled as a bottom sheet. " So I changed my

Is it possible to make CursorAdapter be set in recycleview, just like ListView?

半腔热情 提交于 2019-12-20 09:48:53
问题 I didn't google out a solution till now to replace listview in my project, because I need to use the cursor linked with the sqlite. Old way as followed: listview.setAdapter(cursorAdapter) in this way, I can get the cursor to deal with data in database but now, recycleview.setAdapter(recycleview.adapter) it doesn't recognize the adapter extending BaseAdapter so anyone can give me a hand? 回答1: The new RecyclerView works with a new RecyclerView.Adapter base class. So it doesn't work with the

Snackbar and other animations stopped working on some Android devices

此生再无相见时 提交于 2019-12-20 08:49:53
问题 I have a very odd issue that I cannot figure out. I was not an issue until recently but I can't seem to revert back to prevent it. Also the other odd thing is it works on some devices and others it does not. The issue is animations. One in particular is snack bar. The snackbar should animate up and down but it is not. it just shows then hides. check video below to see issue. Video of issue Here is the Android code to animate the snackbar in if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE

Android support v7 app cannot be resolved error

泄露秘密 提交于 2019-12-20 07:28:42
问题 I am running eclipse juno on a 64 bit windows 8.1 machine, I have imported a project into eclipse, but the error i am facing is On reading about it, I came across the solution that I am supposed to configure the build path manually, but I am unable to do so since, Please help 回答1: In your screen shot I can see app-compact project imported; This should cause your problem. In better word: when you are using app.support.v7 libraries you must import app-compact project in your workspace and add

“You need to use a Theme.AppCompat theme (or descendant) with this activity” when using AppCompat theme

▼魔方 西西 提交于 2019-12-20 05:48:10
问题 I have a very strange problem with my app. After updating to the newest versions of Support libraries I get this error: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.app/com.example.app.MainActivity}: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity. This is where the exception is thrown: public class MainActivity extends AppCompatActivity { … @Override protected void onCreate(Bundle savedInstanceState

SVG/VectorDrawable issue in android

a 夏天 提交于 2019-12-20 05:41:14
问题 I have used svg files in my Android project. There are issues in Android 4.4 or lower versions. I have tried these solutions app:srcCompat , vectorDrawables.useSupportLibrary = true in gradle file and AppCompatDelegate.setCompatVectorFromResourcesEnabled(true); in static block of BaseActivity . Other than gridview, images are not shown in app . 回答1: Instead of using above 3 solutions, just replace your ImageView with android.support.v7.widget.AppCompatImageView . No need to do any extra

getSupportActionBar() returns Null in Android app

我们两清 提交于 2019-12-20 03:46:08
问题 I'm trying to make an action with tabs in Android Studio but getSupportActionBar() always returns null. I just want a simple actionbar with 3 tabs where i can click on but neither the actionbar or the tabs are appearing. This is my code : import android.os.Bundle; import android.support.v4.app.FragmentTransaction; import android.support.v7.app.ActionBar; import android.support.v7.app.AppCompatActivity; import android.util.Log; import android.view.Window; public class MainActivity extends