Sunday, 28 December 2014

margintop in frame layout not worked in layout-small xml



im used the xml code for three layout small,normall and large, margin top worked for normall and large in device but when test app in emulator with android version 2.2 margin top not worked how to use margin top in xml code?



<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/ScrollView01"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >




<LinearLayout

android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/wood"

>
<FrameLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<ImageView
android:layout_width="wrap_content"
android:layout_height="200dp"
android:src="@drawable/r"
android:adjustViewBounds="false"
android:paddingTop="30dp"
android:scaleType="fitXY"
android:id="@+id/im"
android:layout_marginTop="10dp"
android:layout_gravity="top"
/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal|top"
android:padding="10dip"
android:layout_marginTop="150dp"
android:background="#66ffffff"
android:textColor="#ffffffff"

android:text="Golden Gate"
/>
<ImageView
android:layout_width="wrap_content"
android:layout_height="200dp"
android:src="@drawable/r"
android:adjustViewBounds="false"
android:paddingTop="30dp"
android:scaleType="fitXY"

android:layout_alignParentTop="true"
android:layout_marginTop="10dp"

/>































</FrameLayout>

</LinearLayout>
</ScrollView>

1 comment: