布局文件,比较简单:
- <?xml version="1.0" encoding="utf-8"?>
- <LinearLayout xmlns:Android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent" android:layout_height="fill_parent"
- android:orientation="vertical">
- <ImageView android:id="@+id/dstImageView" android:scaleType="fitCenter"
- android:layout_width="fill_parent" android:layout_height="wrap_content"
- android:maxWidth="240px" android:maxHeight="240px" />
- <LinearLayout android:layout_width="fill_parent"
- android:layout_height="wrap_content" android:orientation="vertical">
- <LinearLayout android:layout_width="fill_parent"
- android:layout_height="wrap_content" android:orientation="horizontal"
- android:layout_alignParentBottom="true" android:gravity="center_vertical">
- <TextView android:layout_width="wrap_content"
- android:layout_height="wrap_content" android:text="@string/Saturation" />
- <!-- 定义一个拖动条,并改变它的滑块外观 -->
- <SeekBar android:id="@+id/Saturationseekbar"
- android:layout_width="fill_parent" android:layout_height="wrap_content"
- android:progress="100" android:max="200" />
- </LinearLayout>
- <LinearLayout android:layout_width="fill_parent"
- android:layout_height="wrap_content" android:orientation="horizontal"
- android:gravity="center_vertical">
- <TextView android:layout_width="wrap_content"
- android:layout_height="wrap_content" android:text="@string/Brightness" />
- <!-- 定义一个拖动条,并改变它的滑块外观 -->
- <SeekBar android:id="@+id/Brightnessseekbar"
- android:layout_width="fill_parent" android:layout_height="wrap_content"
- android:progress="127" android:max="255" />
- </LinearLayout>
- <LinearLayout android:layout_width="fill_parent"
- android:layout_height="wrap_content" android:orientation="horizontal"
- android:gravity="center_vertical">
- <TextView android:layout_width="wrap_content"
- android:layout_height="wrap_content" android:text="@string/Contrast" />
- <!-- 定义一个拖动条,并改变它的滑块外观 -->
- <SeekBar android:id="@+id/Contrastseekbar"
- android:layout_width="fill_parent" android:layout_height="wrap_content"
- android:progress="63" android:max="127" />
- </LinearLayout>
- </LinearLayout>
- </LinearLayout>
运行结果:

