Hello,
I am having trouble with with getting my application to function on android 1.5. It works fine in 1.6, 2.1, and 2.2 but whenever I attempt to run it in 1.5, I get an immediate force close with the LogCat output:
java.lang.RuntimeException: Unable to start activity
ComponentInfo{com.qrohlf.activites/com.qrohlf.activites.Book...
Hi guys,
I've spent so much time trying to figure this out. I'm building a dialog layout and trying to get the Title centered relative to the dialog while having 2 buttons on either side of the title. The buttons are to be 'gravity-ed' towards far left and far right.
The easy part is centering the dialog, OR doing the buttons far lef...
I have a xml-layout file main with two textviews A/B and a view C.
Than I have two other xml layout files option1 and option2.
Is it possible to load either option1 or option2 in run time via Java into C? If so, what function do I have to use?
...
I have a custom layout that draws a transparent rounded rectangle beneath its children. The problem is when I try to add it to my xml file, it doesn't show up. Also, when I try to add parameters to it (i.e. android:layout_width) the popup shows that none of them are available. The same thing happens to any child views I add. Can anyone h...
I am trying to refer to a custom View in the helloWorld XML layout but I get the following exception:
Error inflating class acme.my.MyTextView.
However, I am able to instantiate the view and add it to the main content view manually. The custom View is built from it's own XML layout. How do I get this to work?
public class MyTextView...
How do you use the Android default font sizes in xml?
I tried:
android:textAppearance="@android:style/TextAppearance_Large"
But I get:
error: Error: No resource found that
matches the given name (at
'textAppearance' with value
'@android:style/TextAppearance_Large').
...
Hi all,
Looking at the Facebook widget I realized its a 4x2 cell and this isn't one of the standard sizes. I have tried to re-create a widget of this size (either as 320x200 or 294x146 px) however the widget doesn't look good on all devices. The widget layout is :
<?xml version="1.0" encoding="utf-8"?>
<!-- Portrait -->
<RelativeLayo...
I understand how to create a custom Android control, and I believe I understand how to pull attributes for it from the Xml layout. I don't know, however, how to get any children elements from it.
Here's a visual example of what I'm trying to accomplish:
public class Menu extends LinearLayout
{
// Custom Code
}
public class MenuIte...
Hello,
I am working on a subclass of FrameLayout that is supposed to rotate all of its children by 90 degrees. I am doing this to overcome the landscape-only camera limitation present in android 2.1 and below, by having the activity be in landscape, but placing my camera overlay into this framelayout overlay to cause it to appear as if ...
Hi all,
I'm having some trouble trying to create a program for Android 2.1-update1 with a background of a specific size. It seems that the only option is to scale the image according to the device screen size/orientation.
Is there a way to create an empty LinearLayout (edit: with a specific size) behind the gui widgets and then set the...
As i have referred this site for Layout Tricks.
overthere one attribute is declared as android:layout_weight="1".
so my confusion is regarding android:layout_weight.
where is the exact use of android:layout_weight ?
Where should we use android:layout_weight ?
pls anybody focus their knowledge.
Thanx
...
Hello all,
I know i am doing a small mistake.
I am using LinearLayout and i want to place the "icon-image" at "Center".
I am using the following code:
<LinearLayout
android:id="@+id/LinearLayout01"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
...
Hello all,
I know we can set the following value to the anroid:gravity and android:layout_gravity :
center
center_vertical
center_horizontal , etc.
But i am confused regarding these both.
what is the difference between the usage of android:gravity and android:layout_gravity?
...
I followed this tutorial to create a color state list for a particular Android view. I just want it to highlight when clicked so the user knows why the screen just changed.
When the view is rendered, I get the following error:
org.xmlpull.v1.XmlPullParserException: Binary XML file line #3: tag requires a 'drawable' attribute or child...
Hi,
i have an EditText and a Button in my LinearLayout and i want to align them closely together so they see seem to belong together (edittext + micButton for speech input).
Now they don't have the same height and they aren't really aligned well (button seems to be a little lower than the EditText). I know I can apply a negative margin...
I'm using data to build elements of a ViewGroup. The ViewGroup are LinearLayouts, except the leaves, which are TextViews. Because Data draws the hierarchy, I inflate the LinearLayouts and TextViews from individual XML files programatically on the fly.
My Problem:
When I create a LinearLayout with the attribute wrap_content, then infla...
Please help me for going from main.xml to another layout by showing the main layout for 5 seconds with an image.
Only one image is there in main layout.
...
I have two problems with ListView+images.
I get the values for the list from an xml file which contains all necessary infos.
I need to set up a Listview. Every row should contain an icon and a title. The icon is a local drawable (shipped whith the app).
An example what I want to achieve can be found here: http://www.tutomobile.fr/wp-...
I'm just curious, who in the world names a class R ? Is there any history behind this convention?
Thanks,
Teja.
...
Looked at other posts but, haven't seen the answer I'm looking for...
I have two layouts: layout-port and layout-land.
If I run the app with emulator or device, either vertically or horizontally, the app runs fine with the correct layouts.
However, if I rotate either the emulator or device, the app exits. There's no crashing, perse',...