Search Results

Search found 2 results on 1 pages for 'andyandroid'.

Page 1/1 | 1 

  • layout messed up once spinner has entries

    - by AndyAndroid
    Hello, I have <LinearLayout android:id="@+id/LinearLayoutPlayer" xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content"> <Spinner android:id="@+id/Spinner01" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="100"></Spinner> <ToggleButton android:text="@+id/ToggleButton01" android:id="@+id/ToggleButton01" android:layout_height="wrap_content" android:layout_width="wrap_content" android:layout_weight="1"></ToggleButton> </LinearLayout> Which displays a spinner and next to it a toggle button. Everything okay so far. Of course the spinner need some entries, so I add to the spinner the attribute: android:entries="@array/myentries" The problem now is that the toggle button is a bit lower than the spinner and the botton of the toggle button is cut off, maybe 3 or 5 lines of pixels. Anyone an idea what is wrong here? Android is version 2.2 Thanks!

    Read the article

  • background picture for textview

    - by AndyAndroid
    Hi, I have a textview and a nine-patch image. Assigning this image in the xml editor to the tag "background" works as desired. Now I want to set this image dynamically in the coding, I thought myTextView.setBackgroundDrawable(mydrawable); would be the right thing to do. My png is in res/drawable. The API says that mydrawable needs to be an object of type drawable R.drawable.myninepatch is of type int. So my problem is that I have to convert from that int to a drawable somehow. Then I thought I can use a constructor NinePatchDrawable mydrawable = new NinePatchDrawable(); But I am again not able to construct such an object. Anyone an idea? Thanks.

    Read the article

1