android-support-library

Password toggle button on TextInputEditText disappears after click in Support Library 25.1.0

喜夏-厌秋 提交于 2019-12-06 02:01:22
问题 I have a TextInputEditText in conjunction with TextInputLayout with android:inputType="textPassword" using app:passwordToggleEnabled="true" to show password toggle button in the TextInputEditText like next image: The problem is once I press the password toggle button, it disappears for ever. It was working well in com.android.support:design:24.2.0 version. am I missing something new? it's a bug? Some gradle project's setup: minSdkVersion 17 targetSdkVersion 25 compile 'com.android.support

When does “ActionBarDrawerToggle” show its “openDrawerContentDescRes” and “closeDrawerContentDescRes” strings?

折月煮酒 提交于 2019-12-06 01:06:29
问题 Background The CTOR of "ActionBarDrawerToggle" is as such: public ActionBarDrawerToggle (Activity activity, DrawerLayout drawerLayout, int openDrawerContentDescRes, int closeDrawerContentDescRes) or: public ActionBarDrawerToggle (Activity activity, DrawerLayout drawerLayout, Toolbar toolbar, int openDrawerContentDescRes, int closeDrawerContentDescRes) The documentation tells you about the strings parameters, that (here ) : String resources must be provided to describe the open/close drawer

How to set a custom color for the popup of action items, including of the overflow menu?

浪子不回头ぞ 提交于 2019-12-06 01:03:03
Background I'm working on adding some material design style for an app, so I've chosen a different color for the action bar and status bar. The problem For this, the theme of the app is of "Theme.AppCompat.Light.DarkActionBar", and added this to hide the action bar as I need to handle it as a toolbar: theme I've used: <style name="AppTheme" parent="@style/Theme.AppCompat.Light.DarkActionBar"> <item name="windowActionBar">false</item> <item name="windowNoTitle">true</item> <item name="windowActionModeOverlay">true</item> </style> layout I've used : <LinearLayout xmlns:android="http://schemas

How to remove top and bottom padding from android.support.v7.widget.Toolbar?

随声附和 提交于 2019-12-06 00:34:41
问题 I am trying to place a SlidingTabLayout inside my android.support.v7.widget.Toolbar but for some reason there is extra top and bottom padding in portrait layout. As shown in this screenshot: In landscape layout the android.support.v7.widget.Toolbar is shorter and the extra padding is gone: I am aware of the contentInsertStart and contentInsetEnd attributes but there does not appear to be anything for top and bottom. Here is my layout: <android.support.design.widget.AppBarLayout xmlns:android=

Android - cannot find TextView inside SearchWidget when using Android Support library

╄→尐↘猪︶ㄣ 提交于 2019-12-05 23:46:31
I used following snippet to find TextView inside SearchView widget. int autoCompleteTextViewID = getResources().getIdentifier("android:id/search_src_text", null, null); mQueryTextView = (AutoCompleteTextView) searchView.findViewById(autoCompleteTextViewID); However when switching to android.support.v7.appcompat support library, it does not work any more. I guess it is because support library does not use android: prefix for "android:id/search_src_text", but I have no idea what should it be. I tried getResources().getIdentifier("android.support.v7.appcompat:id/search_src_text", null, null); P.S

Android Studio wizard for Fragments and other templates

﹥>﹥吖頭↗ 提交于 2019-12-05 23:15:38
Every time I create a new Fragment in my Android Studio for the project, it creates android.support.v4.app.Fragment , which is not what I want. Also, it alsways triggers a gradle update. How to set default Fragment to android.app.Fragment when creating new one with wizard and get rid of gradle updates? For future readers! As CommonsWare mentioned in comments changing the templates may not last longer as Android Studio updates may overwrite them. So you may create your own custom file templates as described in following article. https://riggaroo.co.za/custom-file-templates-android-studio/ Here

ViewRootImpl.setPausedForTransition(boolean) NullPointerException in ActivityTransitionCoordinator when transition to other Activity invoked too early

て烟熏妆下的殇ゞ 提交于 2019-12-05 21:58:36
问题 In my Android app, I have a splash screen where I do some setup and loading. My app uses default explode as a windowEnterTransition and a windowExitTransition and a changeImageTransform plus changeBounds transition set as a windowSharedElementEnterTransition and windowSharedElementExitTransition . For convenience, I start the next Activity using a static method where I pass the current Activity as a Context and a shared element. The code is provided in the second part of this post. One of the

Styling the SearchView Widget using support library v21

隐身守侯 提交于 2019-12-05 21:58:36
问题 I'm trying to style the SearchView widget using the new AppCompat v21, but I'm facing some problems. No matter what layout I set on "suggestionRowLayout" attribute, it does nothing at all. The suggestion dropdown list of the SearchView remains the same way. Other problem that I'm having is when the "accent color" is the same color as the "primary color", in the searchview is impossible to distinguish where is the caret. Do you know how can I change the accent color in the SearchView to only

Workaround for Using Different Versions of Android Support Libraries

谁说胖子不能爱 提交于 2019-12-05 21:56:48
This is in reference to a warning message appearing in build.gradle file: All com.android.support libraries must use the exact same version specification (mixing versions may lead to runtime crashes) I'm well aware of this and use identical versions in my own code / build. However this isn't the case when it comes to some 3rd party libraries that I use. Sometimes 3rd party libraries use older versions, and some other ones use newer versions - so updating your version of support libraries will not resolve the issue. There are also scenarios where you may not want to up upgrade versions of

How to fit the tab width screen in android

我与影子孤独终老i 提交于 2019-12-05 21:41:14
I implement the tab layout using android support library and it looks like Here the tab width is not fit with screen and my layout is <LinearLayout 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="match_parent" android:orientation="vertical"> <android.support.design.widget.TabLayout android:id="@+id/sliding_tabs" android:layout_width="match_parent" android:layout_height="wrap_content" app:tabMode="scrollable" /> <android.support.v4.view.ViewPager android:id="@+id/viewpager"