今天给大家分享一个关于图片的案例,先来张效果:
该效果是如何实现的呢?下面我给大家分享一下,“+ , -”是加,减清晰度,“< >”是上一张图片和下一张图片,
首先把你要展示的图片放入 项目--->res --->drawable中,在xml中把布局弄好,
<LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal" > <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="<" android:textSize="20dp" android:id="@+id/bu_main_par" android:onClick="per" /> <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="+"