android-appcompat

android:windowNoTitle will not hide actionbar with appcompat-v7 21.0.0

拈花ヽ惹草 提交于 2019-12-21 03:46:07
问题 I updated appcompat-v7 to lollipop version(21.0.0) then I can't hide ActionBar with following style that worked before. <style name="AppTheme.NoActionBar"> <item name="android:windowActionBar">false</item> <item name="android:windowNoTitle">true</item> </style> I set it to specific activity. <activity android:name=".NoActionBarActivity" android:theme="@style/AppTheme.NoActionBar"/> When I use appcompat-v7 20.0.0 version, actionbar will be hidden as it is intended. How can I hide actionbar

Error: failed to find target with hash string 'android-21'

女生的网名这么多〃 提交于 2019-12-21 03:43:06
问题 I want to change my compileSdkVersion from 23 to 21.So I have made following changes in the build.gradle but I am getting following error.How can I resolve this? failed to find target with hash string 'android-21' apply plugin: 'com.android.application' android { compileSdkVersion 21 buildToolsVersion "21.1.2" defaultConfig { applicationId "com.example.shalabh.fly" minSdkVersion 14 targetSdkVersion 21 versionCode 1 versionName "1.0" } buildTypes { release { minifyEnabled false proguardFiles

Should I use AppCompat v7 if minsdk is 14

橙三吉。 提交于 2019-12-21 03:41:08
问题 should I still use app compat v7 if my app has minSdk = 14? Is there any advantage with ActionBar in Android L ? Should I use android.support.v4.app.FragmentActivity from support v4 or should I use the android.app.Activity class (which has support for fragments since honeycomb)? Should I also use android.app.Fragment or android.support.v4.app.Fragment? I guess that I should use support v4 FragmentActivity and Fragment, but there is no need for app compat v7, right? What do you think? 回答1:

Should I use AppCompat v7 if minsdk is 14

喜夏-厌秋 提交于 2019-12-21 03:40:03
问题 should I still use app compat v7 if my app has minSdk = 14? Is there any advantage with ActionBar in Android L ? Should I use android.support.v4.app.FragmentActivity from support v4 or should I use the android.app.Activity class (which has support for fragments since honeycomb)? Should I also use android.app.Fragment or android.support.v4.app.Fragment? I guess that I should use support v4 FragmentActivity and Fragment, but there is no need for app compat v7, right? What do you think? 回答1:

Action Bar Icon hidden after SearchView expands

风格不统一 提交于 2019-12-21 03:33:18
问题 I want the icon beside the SearchView (the "cloud") stays visible even when the SearchView expands. This works properly for tablets but doesn't work in case of smaller devices like Nexus 5. I have set the showAsAction="always" for this menu item. Also, the SearchView has this attribute: showAsAction="ifRoom" . 回答1: try with this, works for me using appCompat v21 final MenuItem switchButton = menu.findItem(R.id.action_import); final MenuItem searchItem = menu.findItem(R.id.action_search);

Action Bar Icon hidden after SearchView expands

落花浮王杯 提交于 2019-12-21 03:33:07
问题 I want the icon beside the SearchView (the "cloud") stays visible even when the SearchView expands. This works properly for tablets but doesn't work in case of smaller devices like Nexus 5. I have set the showAsAction="always" for this menu item. Also, the SearchView has this attribute: showAsAction="ifRoom" . 回答1: try with this, works for me using appCompat v21 final MenuItem switchButton = menu.findItem(R.id.action_import); final MenuItem searchItem = menu.findItem(R.id.action_search);

TextInputLayout and EditText double hint issue

帅比萌擦擦* 提交于 2019-12-21 03:27:05
问题 I want to set the hint with java in EditText(which is in TextInputLayout). Code used for setting hint: aET = (EditText) findViewById(R.id.aET); aET.setHint("h?"); But even when edittext is focused, Hint is displayed twice(inside edittext also). Please let me know if anyone had faced and found some workaround when editText is focused... when editText is not focused.. EDIT[10th July 2015]: <android.support.design.widget.TextInputLayout android:id="@+id/aTIL" android:layout_width="match_parent"

Set RecyclerView edge glow pre-lollipop when using appcompat

做~自己de王妃 提交于 2019-12-21 02:53:09
问题 I'm looking for a way to style the color of the over scroll indicator in a RecyclerView pre-lollip when using the appcompat material theme. Internally it uses an EdgeEffect set to a internal styleable attribute that can't be set unless your already on lollipop (ironic). Using reflection doesn't work, setting the color of the EdgeEffect is only possible on lollipop too. On my API21 app it draws from the primary material color, on Kitkat it is white, before that it is holo blue and I'm looking

RecyclerView: java.lang.IndexOutOfBoundsException: Inconsistency detected. Invalid item position

╄→гoц情女王★ 提交于 2019-12-20 23:36:32
问题 I've started getting this crash reported on Crashlytics. I have no idea how to reproduce it but it all appears to be code internal to the RecyclerView . I think this comes from a RecyclerView I have which never really changes. The user can refresh it but then all items are replaced and notifyDataSetChanged is called. java.lang.IndexOutOfBoundsException: Inconsistency detected. Invalid item position 5(offset:5).state:7 at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition

RecyclerView: java.lang.IndexOutOfBoundsException: Inconsistency detected. Invalid item position

◇◆丶佛笑我妖孽 提交于 2019-12-20 23:35:07
问题 I've started getting this crash reported on Crashlytics. I have no idea how to reproduce it but it all appears to be code internal to the RecyclerView . I think this comes from a RecyclerView I have which never really changes. The user can refresh it but then all items are replaced and notifyDataSetChanged is called. java.lang.IndexOutOfBoundsException: Inconsistency detected. Invalid item position 5(offset:5).state:7 at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition