android-xml

'Failed to find style mapViewStyle' error persists

六月ゝ 毕业季﹏ 提交于 2019-11-29 13:07:47
I've been working on this app for almost a year now (senior project) when it just decided to break a few days ago. My application has been developed using Eclipse version 3.7.2 64bit targeting Froyo Android 2.2, using my Windows 7 64bit pc. So far I have tried: rearranging the uses-library tag in the manifest file rewriting the map xml file deleting the R.java file and refreshing placing the mapview element within a layout reinstalling eclipse and the android-sdk cleaning the project creating a style.xml file and referencing it deploying on a actual device reverting back to previous code and

Android menu line break

主宰稳场 提交于 2019-11-29 12:44:22
I have the following Android menu XML file: <?xml version="1.0" encoding="utf-8"?> <menu xmlns:android="http://schemas.android.com/apk/res/android"> <item android:id="@+id/programma" android:icon="@android:drawable/ic_menu_agenda" android:title="@string/programma" /> <item android:id="@+id/settings" android:icon="@android:drawable/ic_menu_preferences" android:title="@string/settings" /> <item android:id="@+id/help" android:icon="@android:drawable/ic_menu_help" android:title="@string/help" /> </menu> That gives me three menu buttons on one line. However, I want to divide them in two lines, with

How to avoid space between imageview and gridview in linearlayout

浪尽此生 提交于 2019-11-29 11:54:16
I have a image view and grid view in my .xml file. When I am executing this file its getting some space between grid view and image view. How to avoid this space...can any one help me to solve this problem. thanks in advance... my xml code is: android:layout_width="0px" android:layout_height="0px"> </Button> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content"> <ImageView android:id="@+id/prevMonth" android:src="@drawable/cal_left_arrow_off2" android:layout_width="wrap

showAsAction = “always” is ignored in Toolbar

ぐ巨炮叔叔 提交于 2019-11-29 11:01:48
After switching to toolbar there is a problem with menu icons. Although I set for a menu item android:showAsAction="always" it does not show the icon, I can only find it clicking on the popup icon. This is myActivity public class myActivity extends AppCompatActivity{ ......... public void onCreate(....){ ............. Toolbar toolbar = (Toolbar) findViewById(....); setSupportActionBar(toolbar); } ............ public boolean onCreateOptionsMenu(Menu menu{ getMenuInflater().inflate(R.menu.menu, menu); return super.onCreateOptionsMenu(menu); } ............. } menu.xml <menu xmlns:android="http:/

Android card view has thin gray line in between cards

╄→尐↘猪︶ㄣ 提交于 2019-11-29 04:36:42
I have an android List view which shows card-like views, and as you can see in this picture, there is a thin gray line between my cards: How can I get rid of the gray line? My xml to achieve this card view is like this: <?xml version="1.0" encoding="utf-8"?> <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="6dp" android:layout_marginRight="6dp" android:layout_marginTop="4dp" android

Popup menu with icon on Android

南楼画角 提交于 2019-11-29 04:23:20
My menu xml code menu.xml : <?xml version="1.0" encoding="utf-8"?><menu xmlns:android="http://schemas.android.com/apk/res/android"> <!-- Single menu item Set id, icon and Title for each menu item --> <item android:id="@+id/back" android:icon="@drawable/back1" android:showAsAction="never" android:title="Back" /> <item android:id="@+id/My_Profile" android:icon="@drawable/myprofile" android:showAsAction="never" android:title="My Profile" /> <item android:id="@+id/Job_Alert" android:icon="@drawable/jobalert4" android:showAsAction="never" android:title="Job Alert !" /> <item android:id="@+id/saved

Android XML: android:elevation vs. app:elevation

痴心易碎 提交于 2019-11-29 02:56:00
When do I use android:elevation and when app:elevation ? What's the difference between those two? Hope I can help, Let's talk with an example: <android.support.design.widget.FloatingActionButton android:layout_height="wrap_content" android:layout_width="wrap_content" ... android:elevation="@dimen/elevation_medium" /> The android:elevation attribute will work from the API level 21 and upper. <android.support.design.widget.FloatingActionButton android:layout_height="wrap_content" android:layout_width="wrap_content" ... app:elevation="@dimen/elevation_medium" /> In this case the app:elevation

Android windowSoftInputMode=“adjustPan” scroll some more

≯℡__Kan透↙ 提交于 2019-11-29 01:47:16
问题 Consider the following example for a view: <LinearLayout> <EditText /> <Button /> </LinearLayout> And in in the manifest file: android:windowSoftInputMode="adjustPan" onfocus edittext, the soft keyboard covers a button like so: but I'd like it like this: How to scroll view a little more so that the button is visible? 回答1: I just found this post and saw it was unanswered. For the sake of helping others who may come use this in the manifest for activity android:windowSoftInputMode=

Custom Dialog size to match Theme.Holo.Light.Dialog

徘徊边缘 提交于 2019-11-29 01:34:35
问题 If I have an Activity that has it's theme set to Theme.Holo.Light.Dialog , it will scale great. It will fill the screen on phones in portrait mode almost entirely but in landscape mode it won't stretch unreasonably long. For example, in this picture from Google, you can see the dialog not filling the whole screen. It won't either collapse to match the width of the title like what will happen if you have your own Dialog build by having a class that extends the Dialog class. This is what will

What's the difference between @android: and ?android: [duplicate]

Deadly 提交于 2019-11-29 00:05:58
This question already has an answer here: What's the difference between “?android:” and “@android:” in an android layout xml file? 1 answer What's the difference between android:color="@android:color/black" and style="?android:attr/borderlessButtonStyle" What's the difference between the @ and ? ? This is one of those questions which is ungoogleable, or ogooglebar . Raghav Sood (from this answer and its comments) Prefixing the ID with a question mark indicates that you want to access a style attribute that's defined in a style theme, rather than hard-coding the attribute, as explained in