完全出现在模拟器中但不在真实设备上

时间:2016-08-09 05:39:09

标签: android android-studio android-fragments android-emulator

我尝试在真实设备中运行我的应用,但这是问题所在:

it looks like this in my emulator

but it looks like this when i try to real device

请参阅链接以供参考。

应该是什么问题?

这里是我的布局代码:

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical">

    <FrameLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal">

        <ImageView
            android:id="@+id/test_image"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:contentDescription="@string/menu_display_image"
            android:src="@drawable/iinterior"></ImageView>

        <View
            android:layout_width="fill_parent"
            android:layout_height="60dp"
            android:layout_gravity="top"
            android:background="#AA000000"></View>

        <TextView
            android:id="@+id/title"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_gravity="top|right"
            android:padding="10dp"
            android:text="@string/text_goes_here"
            android:textColor="@android:color/white"
            android:textSize="30dp" />

    </FrameLayout>

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal">

        <Button
            android:id="@+id/fragment_button_center"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_gravity="top"
            android:layout_weight="50"
            android:background="@drawable/butt_purple"
            android:padding="5dp"
            android:shadowColor="@android:color/white"
            android:shadowDx="1"
            android:shadowDy="1"
            android:shadowRadius="10"
            android:text="@string/add_to_my_menu"
            android:textSize="18dp" />

        <Button
            android:id="@+id/fragment_button_left"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_gravity="top"
            android:layout_weight="50"
            android:background="@drawable/butt_other"
            android:padding="5dp"
            android:shadowColor="@android:color/white"
            android:shadowDx="1"
            android:shadowDy="1"
            android:shadowRadius="10"
            android:text="View Order State"
            android:textSize="18dp" />
    </LinearLayout>

    <TextView
        android:id="@+id/description"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_gravity="center"
        android:padding="10dp"
        android:text="@string/restaurant_description"
        android:textSize="20dp" />
</LinearLayout>

0 个答案:

没有答案
相关问题