Page 123

Android Programming Cookbook

6.5

115 / 143

Create the strings.xml

Add a new xml file inside /res/values folder, with name strings.xml. We should have the res/values/stri ngs.xml file and paste the code below. strings.xml <resources> <string <string <string <string <string <string <string <string <string </resources >

6.6

name="app_name">AndroidMultitouchExample</string> name="noActionKey">Touch me!</string> name="onTouchKey">On Touch</string> name="onMoveKey">On Move</string> name="onReleaseKey">On Release</string> name="onPinchInKey">On Pinch In</string> name="onPinchOutKey">On Pinch Out</string> name="onSecondFingerOnLayout">On Second Finger Touch</string> name="onTwoFingersDragKey">On Two Fingers Drag</string>

Android Manifest

The AndroidManifest.xml of our project is simple and contains no special permissions: AndroidManifest.xml <manifest xmlns:android="https://schemas.android.com/apk/res/android" package="com.javacodegeeks.androidmultitouchexample"> <application android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:supportsRtl="true" android:theme="@style/AppTheme"> <activity android:name="com.javacodegeeks.androidmultitouchexample. â&#x2020;?AndroidMultitouchActivity" android:label="@string/app_name"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application> </manifest>

6.7

build.gradle

The build.gradle of our project is simple and contains no special permissions: build.gradle

SKY MAGZ  

This is Yahya Christian School Magazine