Book Image

Android NDK: Beginner's Guide

By : Sylvain Ratabouil
Book Image

Android NDK: Beginner's Guide

By: Sylvain Ratabouil

Overview of this book

Table of Contents (18 chapters)
Android NDK Beginner's Guide Second Edition
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Time for action – combining Intrinsics and scripts together


Let's improve our project to apply a new combined filter.

  1. Add a new Combine Button in res/activity_renderscript.xml, as follows:

    <?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" >
        ...
        <Button a:"d="@+id/thresholdBut"on" a:te"t="Thresh"ld"
          a:layout_wid"h="wrap_cont"nt" a:layout_heig"t="wrap_cont"nt"/>
        <Button a:"d="@+id/combineBut"on" a:te"t="Comb"ne"
          a:layout_wid"h="wrap_cont"nt" a:layout_heig"t="wrap_cont"nt"/>
      </LinearLayout>
      <LinearLayout 
        a:baselineAlign"d="t"ue" a:orientati"n="horizon"al"
        a:layout_wid"h="fill_par"nt" a:layout_heig"t="fill_par"nt" >
        ...
      </LinearLayout...