diff options
author | Alex Sakhartchouk <alexst@google.com> | 2011-02-18 09:12:30 -0800 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-02-18 09:12:30 -0800 |
commit | 3d9b77451540d67e55e970e2ecd4be7864f82ee3 (patch) | |
tree | 3118c0bbf0c03d4f6715ee6ca6501512caeaa50c /libs/rs | |
parent | 43f608f928cec782f0f7dad248f4430fe2581016 (diff) | |
parent | db217e0f02d6e719838576a54de9b7c59fa153fe (diff) | |
download | frameworks_base-3d9b77451540d67e55e970e2ecd4be7864f82ee3.zip frameworks_base-3d9b77451540d67e55e970e2ecd4be7864f82ee3.tar.gz frameworks_base-3d9b77451540d67e55e970e2ecd4be7864f82ee3.tar.bz2 |
Merge "Fix UI in image processing."
Diffstat (limited to 'libs/rs')
3 files changed, 131 insertions, 166 deletions
diff --git a/libs/rs/java/ImageProcessing/AndroidManifest.xml b/libs/rs/java/ImageProcessing/AndroidManifest.xml index 0fcbf1e..69a33bc 100644 --- a/libs/rs/java/ImageProcessing/AndroidManifest.xml +++ b/libs/rs/java/ImageProcessing/AndroidManifest.xml @@ -6,8 +6,7 @@ <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> <uses-sdk android:minSdkVersion="11" /> <application android:label="Image Processing"> - <activity android:name="ImageProcessingActivity" - android:screenOrientation="portrait"> + <activity android:name="ImageProcessingActivity"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> diff --git a/libs/rs/java/ImageProcessing/res/layout/main.xml b/libs/rs/java/ImageProcessing/res/layout/main.xml index c6ec729..b271b43 100644 --- a/libs/rs/java/ImageProcessing/res/layout/main.xml +++ b/libs/rs/java/ImageProcessing/res/layout/main.xml @@ -14,174 +14,140 @@ limitations under the License. --> -<merge xmlns:android="http://schemas.android.com/apk/res/android"> - +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:orientation="vertical" + android:layout_width="fill_parent" + android:layout_height="fill_parent"> <SurfaceView android:id="@+id/surface" android:layout_width="1dip" android:layout_height="1dip" /> - <ImageView android:id="@+id/display" android:layout_width="320dip" android:layout_height="266dip" /> + <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:orientation="horizontal" + android:layout_width="fill_parent" + android:layout_height="wrap_content"> + <Button + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/benchmark" + android:onClick="benchmark"/> + <TextView + android:id="@+id/benchmarkText" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:textSize="8pt" + android:text="@string/saturation"/> + </LinearLayout> + <ScrollView + android:layout_width="fill_parent" + android:layout_height="fill_parent"> + <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:orientation="vertical" + android:layout_width="fill_parent" + android:layout_height="fill_parent"> + <TextView + android:id="@+id/inSaturationText" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:textSize="8pt" + android:layout_marginLeft="10sp" + android:layout_marginTop="15sp" + android:text="@string/saturation"/> + <SeekBar + android:id="@+id/inSaturation" + android:layout_marginLeft="10sp" + android:layout_marginRight="10sp" + android:layout_width="match_parent" + android:layout_height="wrap_content"/> + <TextView + android:id="@+id/inGammaText" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:textSize="8pt" + android:layout_marginLeft="10sp" + android:layout_marginTop="15sp" + android:text="@string/gamma"/> + <SeekBar + android:id="@+id/inGamma" + android:layout_marginLeft="10sp" + android:layout_marginRight="10sp" + android:layout_width="match_parent" + android:layout_height="wrap_content"/> + <TextView + android:id="@+id/outWhiteText" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginLeft="10sp" + android:layout_marginTop="15sp" + android:textSize="8pt" + android:text="@string/out_white"/> + <SeekBar + android:id="@+id/outWhite" + android:layout_marginLeft="10sp" + android:layout_marginRight="10sp" + android:layout_width="match_parent" + android:layout_height="wrap_content"/> + <TextView + android:id="@+id/inWhiteText" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:textSize="8pt" + android:layout_marginLeft="10sp" + android:layout_marginTop="15sp" + android:text="@string/in_white"/> + <SeekBar + android:id="@+id/inWhite" + android:layout_marginLeft="10sp" + android:layout_marginRight="10sp" + android:layout_width="match_parent" + android:layout_height="wrap_content"/> + <TextView + android:id="@+id/outBlackText" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:textSize="8pt" + android:layout_marginLeft="10sp" + android:layout_marginTop="15sp" + android:text="@string/out_black"/> + <SeekBar + android:id="@+id/outBlack" + android:layout_marginLeft="10sp" + android:layout_marginRight="10sp" + android:layout_width="match_parent" + android:layout_height="wrap_content"/> + <TextView + android:id="@+id/inBlackText" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:textSize="8pt" + android:layout_marginLeft="10sp" + android:layout_marginTop="15sp" + android:text="@string/in_black"/> + <SeekBar + android:id="@+id/inBlack" + android:layout_marginLeft="10sp" + android:layout_marginRight="10sp" + android:layout_width="match_parent" + android:layout_height="wrap_content"/> + <TextView + android:id="@+id/blurText" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:textSize="8pt" + android:layout_marginLeft="10sp" + android:layout_marginTop="15sp" + android:text="@string/blur_description"/> + <SeekBar + android:id="@+id/radius" + android:layout_marginLeft="10sp" + android:layout_marginRight="10sp" + android:layout_width="match_parent" + android:layout_height="wrap_content"/> + </LinearLayout> + </ScrollView> +</LinearLayout> - <Button - android:layout_marginBottom="170dip" - android:layout_width="wrap_content" - android:layout_height="40dip" - android:text="@string/benchmark" - android:onClick="benchmark" - android:layout_gravity="bottom"/> - - <TextView - android:id="@+id/benchmarkText" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:textSize="18sp" - android:layout_marginLeft="100dip" - android:layout_marginBottom="175dip" - android:layout_gravity="bottom" - android:text="@string/saturation"/> - - <SeekBar - android:id="@+id/inSaturation" - android:layout_marginBottom="140dip" - android:layout_marginLeft="10dip" - android:layout_marginRight="10dip" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_gravity="bottom" /> - - <TextView - android:id="@+id/inSaturationText" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:textSize="18sp" - android:layout_marginLeft="50dip" - android:layout_marginBottom="142dip" - android:textColor="#000" - android:layout_gravity="bottom" - android:text="@string/saturation"/> - - <SeekBar - android:id="@+id/inGamma" - android:layout_marginBottom="110dip" - android:layout_marginLeft="10dip" - android:layout_marginRight="10dip" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_gravity="bottom" /> - - <TextView - android:id="@+id/inGammaText" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:textSize="18sp" - android:layout_marginLeft="50dip" - android:layout_marginBottom="112dip" - android:textColor="#000" - android:layout_gravity="bottom" - android:text="@string/gamma"/> - - <SeekBar - android:id="@+id/outWhite" - android:layout_marginBottom="80dip" - android:layout_marginLeft="170dip" - android:layout_marginRight="10dip" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_gravity="bottom" /> - - <TextView - android:id="@+id/outWhiteText" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:textSize="18sp" - android:layout_marginLeft="220dip" - android:layout_marginBottom="82dip" - android:textColor="#000" - android:layout_gravity="bottom" - android:text="@string/out_white"/> - - <SeekBar - android:id="@+id/inWhite" - android:layout_marginBottom="80dip" - android:layout_marginLeft="10dip" - android:layout_marginRight="170dip" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_gravity="bottom" /> - - <TextView - android:id="@+id/inWhiteText" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:textSize="18sp" - android:layout_marginLeft="50dip" - android:layout_marginBottom="82dip" - android:textColor="#000" - android:layout_gravity="bottom" - android:text="@string/in_white"/> - - <SeekBar - android:id="@+id/outBlack" - android:layout_marginBottom="50dip" - android:layout_marginLeft="170dip" - android:layout_marginRight="10dip" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_gravity="bottom" /> - - <TextView - android:id="@+id/outBlackText" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:textSize="18sp" - android:layout_marginLeft="220dip" - android:layout_marginBottom="52dip" - android:textColor="#000" - android:layout_gravity="bottom" - android:text="@string/out_black"/> - - <SeekBar - android:id="@+id/inBlack" - android:layout_marginBottom="50dip" - android:layout_marginLeft="10dip" - android:layout_marginRight="170dip" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_gravity="bottom" /> - - <TextView - android:id="@+id/inBlackText" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:textSize="18sp" - android:layout_marginLeft="50dip" - android:layout_marginBottom="52dip" - android:textColor="#000" - android:layout_gravity="bottom" - android:text="@string/in_black"/> - - <SeekBar - android:id="@+id/radius" - android:layout_marginBottom="10dip" - android:layout_marginLeft="10dip" - android:layout_marginRight="10dip" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_gravity="bottom" /> - - <TextView - android:id="@+id/blurText" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:textSize="18sp" - android:layout_marginLeft="50dip" - android:layout_marginBottom="12dip" - android:textColor="#000" - android:layout_gravity="bottom" - android:text="@string/blur_description"/> - -</merge>
\ No newline at end of file diff --git a/libs/rs/java/ImageProcessing/src/com/android/rs/image/ImageProcessingActivity.java b/libs/rs/java/ImageProcessing/src/com/android/rs/image/ImageProcessingActivity.java index 5de09f7..4f2f52ab 100644 --- a/libs/rs/java/ImageProcessing/src/com/android/rs/image/ImageProcessingActivity.java +++ b/libs/rs/java/ImageProcessing/src/com/android/rs/image/ImageProcessingActivity.java @@ -346,7 +346,7 @@ public class ImageProcessingActivity extends Activity mSaturationSeekBar.setProgress(50); mBenchmarkResult = (TextView) findViewById(R.id.benchmarkText); - mBenchmarkResult.setText("Benchmark not yet run"); + mBenchmarkResult.setText("Result: not run"); } public void surfaceCreated(SurfaceHolder holder) { @@ -430,7 +430,7 @@ public class ImageProcessingActivity extends Activity //long javaTime = javaFilter(); //mBenchmarkResult.setText("RS: " + t + " ms Java: " + javaTime + " ms"); - mBenchmarkResult.setText("RS: " + t + " ms"); + mBenchmarkResult.setText("Result: " + t + " ms"); mRadius = oldRadius; mScript.set_radius(mRadius); |