【发布时间】:2014-07-22 11:23:44
【问题描述】:
我正在编写一个 Android 应用程序,但遇到了一件奇怪的事情。也就是说,它是我的图标的可见性。它应该在屏幕的右侧。
当我把它放在左边时它是好的,它是这样可见的:
但是当我把它正确的时候,它看起来像这样:
我的代码如下所示:
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/_scrollview"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#ffffff"
android:fillViewport="true" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:padding="@dimen/space_medium" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="15dp" >
<TextView
android:id="@+id/_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:layout_marginLeft="10dp"
android:text="@string/title"
android:textColor="#666666"
android:textSize="20sp"/>
<ImageView
android:id="@+id/image"
android:layout_width="60dp"
android:layout_height="60dp"
android:gravity="top"
android:alpha=".50"
android:src="@drawable/paprika" />
</LinearLayout>
<TextView
android:id="@+id/description"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="15dp"
android:text="@string/description"
android:textColor="#666666" />
<Button
android:id="@+id/_view"
android:layout_width="fill_parent"
android:layout_height="@dimen/button"
android:layout_marginBottom="15dp"
android:layout_marginTop="@dimen/space_small"
android:background="@drawable/rect_rounded_light_blue"
android:text="Button"
android:textColor="#fff" />
</LinearLayout>
</ScrollView>
【问题讨论】:
标签: java xml android-layout icons