android-5.0-lollipop

Disable Ripple on ListView

你离开我真会死。 提交于 2019-12-21 07:38:26
问题 In Android 5.0, my ListView produces a ripple effect when clicking a list item. Is there a way to disable this effect? Looking at the docs, I don't see any way (https://developer.android.com/reference/android/widget/ListView.html) 回答1: You can remove or replace the list selector using the android:listSelector property. The default list selector under Material is ?android:attr/selectableItemBackground which is a bounded ripple. <ListView ... android:listSelector="@drawable/my_list_selector" />

Android colorControlNormal xml attributes doesn't work pre-Lollipop

只谈情不闲聊 提交于 2019-12-21 07:31:31
问题 I've been trying to change the color of the EditText line on the bottom, but my EditText still doesn't wanna change the color, but it's using the style from Material . I've tried to change the color following these answer: link So I have an EditText with the Material form but not the colors I've set. I've put appcompat-v7 in my Gradle config file, and it's already working for the color primary. <style name="AppBaseTheme.MiddleTheme.Widget.EditText" parent="Theme.AppCompat.Light"> <item name=

Android L Elevation Effect in Pre L (only using elevation property)

蓝咒 提交于 2019-12-21 06:58:28
问题 I'm working on an App and want to have an elevation effect on ImageView or any View (!CardView in support library) in Pre L APIs. But i'm not able to achieve that what i tried is used android:elevation property but it doesn't have any effect (No elevation). I can't find any API, if someone point out any documentation to achieve this in Pre L or any snippet from Support library is highly appreciated. 回答1: If you want to set views in 3D shape, View.setElevation() and View.setTranslationZ() is a

Android Lollipop - Bypass lock screen for popup activity

拥有回忆 提交于 2019-12-21 06:30:03
问题 I have Activity1 which is a list screen of items. Each item can be viewed in a separate Activity2 which is displayed as a popup. Activity1 can be launched from the background and displayed even when the screen is locked. Activity1 may also choose to automatically display the contents of an item in the list screen by starting Activity2 . We can bypass the lock screen because both activities have the WindowManagerFlags.DismissKeyguard enabled in the OnCreate method. Before Android Lollipop

Android Lollipop - Bypass lock screen for popup activity

吃可爱长大的小学妹 提交于 2019-12-21 06:29:06
问题 I have Activity1 which is a list screen of items. Each item can be viewed in a separate Activity2 which is displayed as a popup. Activity1 can be launched from the background and displayed even when the screen is locked. Activity1 may also choose to automatically display the contents of an item in the list screen by starting Activity2 . We can bypass the lock screen because both activities have the WindowManagerFlags.DismissKeyguard enabled in the OnCreate method. Before Android Lollipop

Parent activity becomes invisible on exit transition

做~自己de王妃 提交于 2019-12-21 05:17:25
问题 I'm using API Level 21, testing on a Nexus 6. I have two activities: master + detail, each view has a fragment. When I select an item in the master list it transitions to the detail view. I have enabled view transitions in both master and detail, like this: getWindow().requestFeature(Window.FEATURE_CONTENT_TRANSITIONS); Transition ts = new Slide(Gravity.RIGHT); ts.setDuration(2500); getWindow().setEnterTransition(ts); getWindow().setExitTransition(ts); getWindow()

Remove row from RecyclerView

亡梦爱人 提交于 2019-12-21 04:42:31
问题 I have somehow implemented recycle view with the help of this post, now my requirement is to remove a row at runtime from this Recycle View. link - http://treyrobinson.net/blog/android-l-tutorials-part-3-recyclerview-and-cardview/ Please help me. Thanks. 回答1: Since we don't know how is your adaper and given the info in that link you can create a method in the adapter that removes an object: public void removeItem(int position) { mData.remove(position); notifyItemRemoved(position); } You can

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

ProgressBar Circle shows no progress on android L (API 21)

依然范特西╮ 提交于 2019-12-21 03:33:22
问题 I have a circular ProgressBar to count down time. It workes perfectly on kitkat and before, but on android L it always shows a full circle no matter what progress I set. Image layout.xml <ProgressBar android:id="@+id/progressBar1" style="?android:attr/progressBarStyleHorizontal" android:layout_width="100dp" android:layout_height="100dp" android:indeterminate="false" android:max="200" android:progress="100" android:progressDrawable="@drawable/progresscircle" /> progresscircle.xml <?xml version

ProgressBar Circle shows no progress on android L (API 21)

六月ゝ 毕业季﹏ 提交于 2019-12-21 03:33:14
问题 I have a circular ProgressBar to count down time. It workes perfectly on kitkat and before, but on android L it always shows a full circle no matter what progress I set. Image layout.xml <ProgressBar android:id="@+id/progressBar1" style="?android:attr/progressBarStyleHorizontal" android:layout_width="100dp" android:layout_height="100dp" android:indeterminate="false" android:max="200" android:progress="100" android:progressDrawable="@drawable/progresscircle" /> progresscircle.xml <?xml version