April 2015
Beginner to intermediate
494 pages
10h 26m
English
Let's append a new component to our UI and implement the new image filter.
SeekBar and Button in res/activity_renderscript.xml:<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:a="http://schemas.android.com/apk/res/android"
a:layout_width="fill_parent" a:layout_height="fill_parent"
a:layout_weight="1" a:orientation="vertical" >
<LinearLayout
a:orientation="horizontal"
a:layout_width="fill_parent" a:layout_height="wrap_content" >
...
<SeekBar a:id="@+id/thresholdBar" a:max="100"
a:layout_gravity="center_vertical"
a:layout_width="128dp" a:layout_height="wrap_content" />
<Button a:id="@+id/thresholdButton" a:text="Threshold"
a:layout_width="wrap_content" a:layout_height="wrap_content"/> ...