android-styles

Output: error: resource style/TextAppearance.Compat.Notification.Info (aka package_name:style/TextAppearance.Compat.Notification.Info) not found

前提是你 提交于 2019-11-29 13:34:53
After switching to Android Studio 3.2 canary I am getting the following build error. I have seen this post where the guy had a similar issue but no solution was mentioned over their. I want to try new material components and jetpack so is there any possibility where I don't have to switch back. com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource linking failed Output: error: resource style/TextAppearance.Compat.Notification.Info (aka com.nsnik.nrs.kotlintest.debug:style/TextAppearance.Compat.Notification.Info) not found. error: resource style/TextAppearance.Compat

Android: Add divider between items in RecyclerView

微笑、不失礼 提交于 2019-11-29 12:27:20
问题 I am using RecyclerView with rounded corner, to make it rounded corner I used below XML: view_rounded.xml:- <?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> <solid android:color="#008f8471"/> <stroke android:width="2dp" android:color="#ffffff" /> <corners android:radius="10dp"/> </shape> fragment_main.xml:- <android.support.v7.widget.RecyclerView android:id="@+id/recycler_view" android:layout_width="match

Custom Menu on button click as drop down

拈花ヽ惹草 提交于 2019-11-29 12:20:25
I am trying to implement the action bar functionality of the flipkart app. . For this I have successfully created a custom Action Bar but I am facing problems in showing the menu as drop down on overflow icon click. If I try Android Option Menu on button click then on I am getting the menu without icons (4.2.2) at the bottom center of my screen. Using a custom dialog or alert dialog fades the background and they also appear on the center of the screen. What should I do to get the functionality similar as shown in the image above? Haresh Chhelana Try this way,hope this will help you to solve

Android :android:configChanges value for Font Style change in Samsung Device

家住魔仙堡 提交于 2019-11-29 08:08:57
Want to handle the Font Style Change myself.what will be the value? Using the below values now.But the system kills the app and restarts . android:configChanges="orientation|keyboardHidden|fontScale|locale|layoutDirection|screenSize|screenLayout|mnc|mcc|uiMode|navigation|smallestScreenSize" Thanks Nitz I don't think this is possible, unfortunately. This seems to be using a different mechanism instead of configuration changes. Setting up a service to listen for android.intent.action.CONFIGURATION_CHANGED does not receive an Intent when a new font is selected in the dialog (but it does when the

EditText how to activate copy/paste popup without any actionbar?

天大地大妈咪最大 提交于 2019-11-29 05:35:31
I m under delphi and i use the android framework to create an edit. When i set the theme to Theme.DeviceDefault.Light.NoActionBar then i can select some text in my EditText and i have a popup with "select all/cut/copy/paste/etc" like you can see on the picture below. However, when i select Theme.Material.Light.NoActionBar or Theme.Holo.Light.NoActionBar then i can't select any text in my EditText (i have no right or left text selection handles) and off course i don't have any copy/paste popup Is their any way to have this copy/paste popup on Theme_Material_Light_NoActionBar ? Theme

Actionbarsherlock - change actionbar line colour

左心房为你撑大大i 提交于 2019-11-29 04:38:33
I am currently working on making my application compatible with pre 3.0 devices with the aid of actionbarsherlock. My application has a custom theme which overide Holo.light changing the blue to orange. I am wanting to change the blue line which appears under the actionbar to orange. With the official actionbar I managed this by overriding <item name="android:background">@drawable/ad_tab_unselected_holo</item> Unfortunately this does not seem to be working in actionbarsherlock 4. You need to do two things: The ABS 4 now mimics the standard Action bar with its attributes so you need to add -

Android Layout - when to use app: vs android:?

无人久伴 提交于 2019-11-29 02:52:17
问题 I've been writing some Android apps but I don't really understand when to use app: and when to use android: . When styles are not being applied the way they're supposed to, I use trial and error and sometimes find that using app: instead of android: solves the issue but I don't understand why. It'd be great if someone could point me in the right direction. Thanks! 回答1: You are talking about custom namespace.In android we can create custom views in additional to already available views. As per

How to pass AttributeSet when creating view programmatically in android

感情迁移 提交于 2019-11-29 02:50:01
I create programmatically like horizontalview then, how to pass AttributeSet in programmatically. My constructor looks like this: public HorizontalListView(Context context, AttributeSet attrs) { super(context, attrs); } I have try this: mHlvSimpleList= new HorizontalListView(mcontext,R.style.niceview); Error: The constructor HorizontalListView(Context, int) is undefined in style.xml <style name="niceview"> <item name="android:layout_width">wrap_content</item> <item name="android:layout_height">wrap_content</item> </style> How to pass AttributeSet in horizontalistview constructor matching

Dark actionbar with white dropdown menu from Holo Light

非 Y 不嫁゛ 提交于 2019-11-29 02:27:11
问题 I've got an custom theme with a parent @android:style/Theme.Holo.Light.DarkActionBar I want to change the dropdown menu into the white version (see image) I have looked up some examples, but they didn't work out for me, is it possible to just override the dropdown menu from the DarkActionBar with the light version? (I dont use the sherlock actionbar) 回答1: This worked for me. Hope it help: <style name="YOUR_DARK_AB_THEME"> <item name="android:actionBarWidgetTheme">@style/YourActionBarWidget<

values-21, values-22 or values-xx folder is gone after Android Studio 1.0

久未见 提交于 2019-11-29 01:53:38
问题 When I create a new project with API14 as minimum, then there is no values-21 or values-22 folder in my project. I don't see any styles.XML anywhere, so how should I put in XML code for just Lollipop? I use Android Studio 1.0.1, and I have SDK 21, 21.1.1, 24.0.2 installed. 回答1: Updated : Since API 22 has been released. API 23 is the same idea. Right click the RES folder Then type values-v22 as the directory name and choose xml as the resource type. If you do NOT see the values-v22 show up,