android-appcompat

Is any difference between a MaterialButton and a simple Button?

≯℡__Kan透↙ 提交于 2019-12-18 09:03:33
问题 If I set Theme.MaterialComponents.Light as my main theme, will be any difference between these two buttons if I use them in an xml layout? <Button /> <com.google.android.material.button.MaterialButton /> As I saw they behave both as MaterialButtons. If I want to get the behavior of the old plain button, I have to use: <androidx.appcompat.widget.AppCompatButton /> Thanks in advance! 回答1: If you are using a Material Theme there is no difference between <Button /> and <com.google.android

How to delete or change the searchview icon inside the SearchView actionBar?

☆樱花仙子☆ 提交于 2019-12-18 05:14:16
问题 How to remove or change the search view icon inside the edittext? I am using the Appcompat library. I used the below code to modify and remove but it's not working: SearchManager searchManager = (SearchManager) getSystemService(Context.SEARCH_SERVICE); searchView.setSearchableInfo(searchManager.getSearchableInfo(getComponentName())); View search_mag_icon = (View)searchView.findViewById(android.support.v7.appcompat.R.id.search_mag_icon); search_mag_icon.setBackgroundResource(R.drawable.ic_stub

how to use material design features in api lower than 21 in eclipse?

大城市里の小女人 提交于 2019-12-18 05:13:33
问题 there are many questions regarding this but not even single helped me. So please tell me how to enable material design features in eclipse. i have also imported appcompat_v7 library in project but it does not create a folder with name values_v21 which helps in using those feature i think. So please help me out in this here is my styles.xml file <?xml version="1.0" encoding="utf-8"?> <resources> <style name="AppTheme" parent="@style/Theme.AppCompat.Light.DarkActionBar"> <item name="android

Didn't find class “android.support.v7.internal.widget.TintManager” on path: DexPathList

隐身守侯 提交于 2019-12-18 04:44:09
问题 I have updated support libraries to version 23.0.1 and started getting this error. Didn't find class "android.support.v7.internal.widget.TintManager" on path: DexPathList. I have used many third party libraries in the application.Would that cause this issue? Gradle file: apply plugin: 'com.android.application' repositories { mavenCentral() maven { url 'http://maven.stickerpipe.com/artifactory/stickerfactory' } } android { compileSdkVersion 23 buildToolsVersion '23.0.1' defaultConfig {

AppCompatEditText.getpParent() inside TextInputLayout returns FrameLayout

半世苍凉 提交于 2019-12-18 03:22:25
问题 I am creating simple AppCompatEditText adding OnFocusChangeListener and putting it in the simple TextInputLayout. When AppCompatEditText loosing focus it's content should be validate by isValidParam method. It worked till yesterday, when I used rev.23.0.3 But now, when I used rev.24.0.2, it gives error as below on the 1st row of isValidParam method. java.lang.ClassCastException: android.widget.FrameLayout cannot be cast to android.support.design.widget.TextInputLayout I checked in debugging

android:layout_height=“?attr/actionBarSize” is not working with support:design:23.0.0' library

爱⌒轻易说出口 提交于 2019-12-18 03:11:57
问题 If I set android:layout_height="56dp" , I can see the toolbar in graphical layout. But when I set like the below, <android.support.v7.widget.Toolbar android:id="@+id/toolbar" android:layout_width="match_parent" android:layout_height="?attr/actionBarSize" android:background="@color/purple" android:gravity="center_vertical" android:minHeight="?attr/actionBarSize" app:layout_scrollFlags="scroll|enterAlways" app:popupTheme="@style/ThemeOverlay.AppCompat.Light"> </android.support.v7.widget.Toolbar

android:layout_height=“?attr/actionBarSize” is not working with support:design:23.0.0' library

喜你入骨 提交于 2019-12-18 03:11:19
问题 If I set android:layout_height="56dp" , I can see the toolbar in graphical layout. But when I set like the below, <android.support.v7.widget.Toolbar android:id="@+id/toolbar" android:layout_width="match_parent" android:layout_height="?attr/actionBarSize" android:background="@color/purple" android:gravity="center_vertical" android:minHeight="?attr/actionBarSize" app:layout_scrollFlags="scroll|enterAlways" app:popupTheme="@style/ThemeOverlay.AppCompat.Light"> </android.support.v7.widget.Toolbar

The Activity's LayoutInflater already has a Factory installed so we can not install AppCompat's

妖精的绣舞 提交于 2019-12-18 03:02:03
问题 I'm using AppCompat library (com.android.support:appcompat-v7:22.1.0) in my app. I created an ActionBar in a fragment. When I click in a menu item it shows an Alert Dialog. Here is my code: @Override public boolean onOptionsItemSelected(MenuItem item) { // Handle item selection switch (item.getItemId()) { case R.id.action_new: showFilterDialog(); return true; case R.id.action_send: new sendInventoryTask().execute(); return true; default: return super.onOptionsItemSelected(item); } } And my

How to add cardview in layout xml in AndroidX

旧街凉风 提交于 2019-12-17 22:57:44
问题 How to add cardview in layout xml in AndroidX After upgraded to AndroidX <android.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_margin="5dp"> gives a error The following classes could not be found: - android.support.v7.widget.CardView (Fix Build Path, Edit XML, Create Class) dependencies { implementation 'androidx

Set OnClick Listener on Action Bar Title in Android

帅比萌擦擦* 提交于 2019-12-17 22:46:03
问题 I am working on android application where I am using ActionBar so there one is navigation drawer icon to open it and title of ActionBar in ActionBar . I want to set a click listener on title of ActionBar such that it start a new Activity and set click listener different on navigation drawer icon to open navigation drawer menu. I achieved a click on navigation drawer icon but when I click on title of ActionBar title also then it open the navigation drawer menu. Is there any way to set