我正在使用ImageView和HorizontalScrollView创建布局.它看起来像下面的图像..
当用户在HorizontalScrollView上单击其中一个图像时,它将在ImageView上显示更大的图像.
到目前为止,我的代码如下
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<ImageView
android:id="@+id/imageViewTop"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_alignParentTop="true"
/>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
>
<HorizontalScrollView
android:id="@+id/mainHorizontalScrollView"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:background="@color/orange"
>
<ImageView
android:id="@+id/image1"
android:layout_width="150dp"
android:layout_height="150dp"
android:scaleType="fitXY"
android:src="@drawable/pic1"
android:padding="15dp"
></ImageView>
<ImageView
android:id="@+id/image2"
android:layout_width="150dp"
android:layout_height="150dp"
android:scaleType="fitXY"
android:src="@drawable/pic2"
android:padding="15dp"
></ImageView>
</LinearLayout>
</HorizontalScrollView>
</RelativeLayout>
Run Code Online (Sandbox Code Playgroud)
上面的代码使ImageView填满整个屏幕..我想要的是ImageView填充未被HorizontalScrollView填充的剩余屏幕..怎么做?
我正试图从两个表中获取数据.这是我的代码:
select p.nim, p.title, s.name, p.year, substring(p.abstrak, 1, 100), p.path, p.status
from student s
join project p
on s.nim = p.nim
where p.title like "%foot%"
or p.title like "%ball%" and p.status = 'active'
Run Code Online (Sandbox Code Playgroud)
这个想法不是获取处于非活动状态的数据.但是此查询会以非活动状态返回数据.
我在这做错了什么?