Показаны сообщения с ярлыком xml. Показать все сообщения
Показаны сообщения с ярлыком xml. Показать все сообщения

четверг, 21 августа 2014 г.

XML shapes in Android L

This would work in pre-L android:


    android:shape="rectangle" >

            android:angle="270"
        android:color="@color/orange" />

            android:bottomLeftRadius="5dp"
        android:bottomRightRadius="5dp"
        android:topLeftRadius="5dp"
        android:topRightRadius="5dp" />




But in Android L you would see... nothing. To fix it you should always use selectors. You'd get the result this way:




   
           

           
       

пятница, 23 марта 2012 г.

LinearLayout inside the ScrollView

...
< ScrollView
android:layout_width="fill_parent"
android:layout_height="0dp"
android:layout_weight="1.0"

>
< LinearLayout
android:id="@+id/toucheble_layout"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:layout_alignParentBottom="true"
android:layout_below="@+id/calendar_footer"
android:orientation="vertical"
android:layout_weight="1.0"
>
...




LinearLayout не заполняет весь scrollView по высоте. Решение - добавить android:fillViewport="true" в ScrollView
___
И - да, GridView (как и ListView) не следует помещать в ScrollView, он сам по себе умеет прокручиваться.

пятница, 23 сентября 2011 г.

Парсинг xml. хозяйке на заметку

Если при парсинге xml средствами Android получаем XmlPullParserException "PI must not start with xml", причиной может послужить вот что