diff --git a/.classpath b/.classpath deleted file mode 100644 index a4763d1..0000000 --- a/.classpath +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..77dd34d --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,14 @@ +version: 2 +updates: +- package-ecosystem: gradle + directory: "/" + schedule: + interval: daily + time: "11:00" + open-pull-requests-limit: 10 +- package-ecosystem: npm + directory: "/" + schedule: + interval: daily + time: "11:00" + open-pull-requests-limit: 10 diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..ab85aef --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,24 @@ +name: Build +on: [push, pull_request] + +jobs: + build: + name: Build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Use Node.js + uses: actions/setup-node@v3 + with: + node-version: 'lts/*' + - name: Use Java 17 + uses: actions/setup-java@v3 + with: + distribution: 'temurin' + java-version: '17' + - name: Install dependencies + run: | + npm install + npm run lint + - name: Run build + run: npm run build diff --git a/.gitignore b/.gitignore index 48d54d9..1d23de1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,17 +1,12 @@ -ant.properties -bin -build.xml -gen -local.properties -proguard-project.txt -project.properties -tests/ant.properties -tests/build.xml -tests/local.properties -tests/proguard-project.txt -tests/project.properties -out -.settings/ -*.apk -lint.xml -.idea/* \ No newline at end of file +*.iml +.gradle +/local.properties +.idea +.DS_Store +/build +/captures +/node_modules +*.log +apks/ +package-lock.json* +app/build/ diff --git a/.npmignore b/.npmignore new file mode 100644 index 0000000..d73def3 --- /dev/null +++ b/.npmignore @@ -0,0 +1,8 @@ +app +build +doc +gradle +local.properties +.gradle +.github +package-lock.json diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..4fef437 --- /dev/null +++ b/.npmrc @@ -0,0 +1,2 @@ +save-exact=true +package-lock=false diff --git a/.project b/.project deleted file mode 100644 index 74313ce..0000000 --- a/.project +++ /dev/null @@ -1,33 +0,0 @@ - - - ApiDemos - - - - - - com.android.ide.eclipse.adt.ResourceManagerBuilder - - - - - com.android.ide.eclipse.adt.PreCompilerBuilder - - - - - org.eclipse.jdt.core.javabuilder - - - - - com.android.ide.eclipse.adt.ApkBuilder - - - - - - com.android.ide.eclipse.adt.AndroidNature - org.eclipse.jdt.core.javanature - - diff --git a/AndroidManifest.xml b/AndroidManifest.xml deleted file mode 100644 index 172dffa..0000000 --- a/AndroidManifest.xml +++ /dev/null @@ -1,2846 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..267eac5 --- /dev/null +++ b/LICENSE @@ -0,0 +1,13 @@ +Copyright 2012-2016 JS Foundation and other contributors + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/README.md b/README.md index a9f6584..05f6064 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,15 @@ android-apidemos ================ -A fork of Google's Android ApiDemos application, used for testing Appium \ No newline at end of file +A fork of Google's Android ApiDemos application, used for testing Appium + +#### Requirements + +- Java 17 +- Node.js (npm) + +#### Building + +> npm run build + +Then, `./apks/ApiDemos-debug.apk` will be generated. diff --git a/README.txt b/README.txt deleted file mode 100644 index 30a5672..0000000 --- a/README.txt +++ /dev/null @@ -1,19 +0,0 @@ -The API Demos application includes a variety of small applications -that illustrate the use of various Android APIs. It includes samples of: - - Notifications - - Alarms - - Progress Dialogs - - Intents - - Menus - - Search - - Persistent application state - - Preferences - - Background Services - - App Widgets - - Voice Recognition - - And many many more... - -Api demos is designed to use the compatibility library "android-support-v4.jar". -It is available through the SDK Updater in the "Android Compatibility package". -Once downloaded, copy the jar file into the ApiDemos project libs/ folder. -(If using Eclipse, add it manually to the project build path). \ No newline at end of file diff --git a/android-apidemos.iml b/android-apidemos.iml deleted file mode 100644 index c915fa3..0000000 --- a/android-apidemos.iml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/app/build.gradle b/app/build.gradle new file mode 100644 index 0000000..6a1bb08 --- /dev/null +++ b/app/build.gradle @@ -0,0 +1,32 @@ +apply plugin: 'com.android.application' + +android { + compileSdk 33 + + defaultConfig { + applicationId "io.appium.android.apis" + minSdkVersion 17 + targetSdkVersion 33 + + versionCode 24 + versionName '4.2.0' + + testApplicationId "io.appium.android.apis.test" + testInstrumentationRunner ".app.LocalSampleInstrumentation" + } + + dependencies { + implementation 'androidx.appcompat:appcompat:1.6.1' + } + + buildTypes { + release { + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt' + } + } + buildFeatures { + aidl true + } + namespace 'io.appium.android.apis' +} diff --git a/app/src/androidTest/res/drawable-hdpi/alert_dialog_icon.png b/app/src/androidTest/res/drawable-hdpi/alert_dialog_icon.png new file mode 100644 index 0000000..8e81efc Binary files /dev/null and b/app/src/androidTest/res/drawable-hdpi/alert_dialog_icon.png differ diff --git a/app/src/androidTest/res/drawable-hdpi/apidemo_androidlogo.png b/app/src/androidTest/res/drawable-hdpi/apidemo_androidlogo.png new file mode 100644 index 0000000..5d2d34b Binary files /dev/null and b/app/src/androidTest/res/drawable-hdpi/apidemo_androidlogo.png differ diff --git a/app/src/androidTest/res/drawable-hdpi/app_sample_code.png b/app/src/androidTest/res/drawable-hdpi/app_sample_code.png new file mode 100644 index 0000000..d3a4158 Binary files /dev/null and b/app/src/androidTest/res/drawable-hdpi/app_sample_code.png differ diff --git a/app/src/androidTest/res/drawable-hdpi/arrow_down_float.png b/app/src/androidTest/res/drawable-hdpi/arrow_down_float.png new file mode 100644 index 0000000..ef7ed13 Binary files /dev/null and b/app/src/androidTest/res/drawable-hdpi/arrow_down_float.png differ diff --git a/app/src/androidTest/res/drawable-hdpi/arrow_up_float.png b/app/src/androidTest/res/drawable-hdpi/arrow_up_float.png new file mode 100644 index 0000000..5813e9f Binary files /dev/null and b/app/src/androidTest/res/drawable-hdpi/arrow_up_float.png differ diff --git a/app/src/androidTest/res/drawable-hdpi/btn_check_off.png b/app/src/androidTest/res/drawable-hdpi/btn_check_off.png new file mode 100644 index 0000000..88b3a2b Binary files /dev/null and b/app/src/androidTest/res/drawable-hdpi/btn_check_off.png differ diff --git a/app/src/androidTest/res/drawable-hdpi/btn_check_on.png b/app/src/androidTest/res/drawable-hdpi/btn_check_on.png new file mode 100644 index 0000000..e3c247f Binary files /dev/null and b/app/src/androidTest/res/drawable-hdpi/btn_check_on.png differ diff --git a/app/src/androidTest/res/drawable-hdpi/btn_circle_normal.png b/app/src/androidTest/res/drawable-hdpi/btn_circle_normal.png new file mode 100644 index 0000000..b3099be Binary files /dev/null and b/app/src/androidTest/res/drawable-hdpi/btn_circle_normal.png differ diff --git a/app/src/androidTest/res/drawable-hdpi/btn_default_normal.9.png b/app/src/androidTest/res/drawable-hdpi/btn_default_normal.9.png new file mode 100644 index 0000000..7dc34f0 Binary files /dev/null and b/app/src/androidTest/res/drawable-hdpi/btn_default_normal.9.png differ diff --git a/app/src/androidTest/res/drawable-hdpi/button.9.png b/app/src/androidTest/res/drawable-hdpi/button.9.png new file mode 100644 index 0000000..a197383 Binary files /dev/null and b/app/src/androidTest/res/drawable-hdpi/button.9.png differ diff --git a/app/src/androidTest/res/drawable-hdpi/ic_contact_picture.png b/app/src/androidTest/res/drawable-hdpi/ic_contact_picture.png new file mode 100644 index 0000000..9932554 Binary files /dev/null and b/app/src/androidTest/res/drawable-hdpi/ic_contact_picture.png differ diff --git a/app/src/androidTest/res/drawable-hdpi/ic_launcher_settings.png b/app/src/androidTest/res/drawable-hdpi/ic_launcher_settings.png new file mode 100644 index 0000000..1b77361 Binary files /dev/null and b/app/src/androidTest/res/drawable-hdpi/ic_launcher_settings.png differ diff --git a/app/src/androidTest/res/drawable-hdpi/ic_popup_reminder.png b/app/src/androidTest/res/drawable-hdpi/ic_popup_reminder.png new file mode 100644 index 0000000..c8e9493 Binary files /dev/null and b/app/src/androidTest/res/drawable-hdpi/ic_popup_reminder.png differ diff --git a/app/src/androidTest/res/drawable-hdpi/icon48x48_2.png b/app/src/androidTest/res/drawable-hdpi/icon48x48_2.png new file mode 100644 index 0000000..0005429 Binary files /dev/null and b/app/src/androidTest/res/drawable-hdpi/icon48x48_2.png differ diff --git a/app/src/androidTest/res/drawable-hdpi/logo240dpi.png b/app/src/androidTest/res/drawable-hdpi/logo240dpi.png new file mode 100644 index 0000000..9a19e90 Binary files /dev/null and b/app/src/androidTest/res/drawable-hdpi/logo240dpi.png differ diff --git a/app/src/androidTest/res/drawable-hdpi/npatch240dpi.9.png b/app/src/androidTest/res/drawable-hdpi/npatch240dpi.9.png new file mode 100644 index 0000000..bb6b48b Binary files /dev/null and b/app/src/androidTest/res/drawable-hdpi/npatch240dpi.9.png differ diff --git a/app/src/androidTest/res/drawable-hdpi/progress_circular_background.png b/app/src/androidTest/res/drawable-hdpi/progress_circular_background.png new file mode 100644 index 0000000..43183d4 Binary files /dev/null and b/app/src/androidTest/res/drawable-hdpi/progress_circular_background.png differ diff --git a/app/src/androidTest/res/drawable-hdpi/progress_particle.png b/app/src/androidTest/res/drawable-hdpi/progress_particle.png new file mode 100644 index 0000000..6b7b15b Binary files /dev/null and b/app/src/androidTest/res/drawable-hdpi/progress_particle.png differ diff --git a/app/src/androidTest/res/drawable-hdpi/reslogo240dpi.png b/app/src/androidTest/res/drawable-hdpi/reslogo240dpi.png new file mode 100644 index 0000000..9a19e90 Binary files /dev/null and b/app/src/androidTest/res/drawable-hdpi/reslogo240dpi.png differ diff --git a/app/src/androidTest/res/drawable-hdpi/scrollbar_state2.png b/app/src/androidTest/res/drawable-hdpi/scrollbar_state2.png new file mode 100644 index 0000000..d1f8dec Binary files /dev/null and b/app/src/androidTest/res/drawable-hdpi/scrollbar_state2.png differ diff --git a/app/src/androidTest/res/drawable-hdpi/smlnpatch240dpi.9.png b/app/src/androidTest/res/drawable-hdpi/smlnpatch240dpi.9.png new file mode 100644 index 0000000..6c7b9ef Binary files /dev/null and b/app/src/androidTest/res/drawable-hdpi/smlnpatch240dpi.9.png differ diff --git a/app/src/androidTest/res/drawable-hdpi/star_big_on.png b/app/src/androidTest/res/drawable-hdpi/star_big_on.png new file mode 100644 index 0000000..7a5dc67 Binary files /dev/null and b/app/src/androidTest/res/drawable-hdpi/star_big_on.png differ diff --git a/app/src/androidTest/res/drawable-hdpi/stat_happy.png b/app/src/androidTest/res/drawable-hdpi/stat_happy.png new file mode 100644 index 0000000..5fdc2ef Binary files /dev/null and b/app/src/androidTest/res/drawable-hdpi/stat_happy.png differ diff --git a/app/src/androidTest/res/drawable-hdpi/stat_neutral.png b/app/src/androidTest/res/drawable-hdpi/stat_neutral.png new file mode 100644 index 0000000..4eb3da6 Binary files /dev/null and b/app/src/androidTest/res/drawable-hdpi/stat_neutral.png differ diff --git a/app/src/androidTest/res/drawable-hdpi/stat_sad.png b/app/src/androidTest/res/drawable-hdpi/stat_sad.png new file mode 100644 index 0000000..418c955 Binary files /dev/null and b/app/src/androidTest/res/drawable-hdpi/stat_sad.png differ diff --git a/app/src/androidTest/res/drawable-hdpi/stat_sample.png b/app/src/androidTest/res/drawable-hdpi/stat_sample.png new file mode 100644 index 0000000..511b31b Binary files /dev/null and b/app/src/androidTest/res/drawable-hdpi/stat_sample.png differ diff --git a/app/src/androidTest/res/drawable-hdpi/stylogo240dpi.png b/app/src/androidTest/res/drawable-hdpi/stylogo240dpi.png new file mode 100644 index 0000000..9a19e90 Binary files /dev/null and b/app/src/androidTest/res/drawable-hdpi/stylogo240dpi.png differ diff --git a/app/src/androidTest/res/drawable-ldpi/logo120dpi.png b/app/src/androidTest/res/drawable-ldpi/logo120dpi.png new file mode 100644 index 0000000..bdb1b80 Binary files /dev/null and b/app/src/androidTest/res/drawable-ldpi/logo120dpi.png differ diff --git a/app/src/androidTest/res/drawable-ldpi/npatch120dpi.9.png b/app/src/androidTest/res/drawable-ldpi/npatch120dpi.9.png new file mode 100644 index 0000000..2daea43 Binary files /dev/null and b/app/src/androidTest/res/drawable-ldpi/npatch120dpi.9.png differ diff --git a/app/src/androidTest/res/drawable-ldpi/reslogo120dpi.png b/app/src/androidTest/res/drawable-ldpi/reslogo120dpi.png new file mode 100644 index 0000000..bdb1b80 Binary files /dev/null and b/app/src/androidTest/res/drawable-ldpi/reslogo120dpi.png differ diff --git a/app/src/androidTest/res/drawable-ldpi/smlnpatch120dpi.9.png b/app/src/androidTest/res/drawable-ldpi/smlnpatch120dpi.9.png new file mode 100644 index 0000000..ba3d9bc Binary files /dev/null and b/app/src/androidTest/res/drawable-ldpi/smlnpatch120dpi.9.png differ diff --git a/app/src/androidTest/res/drawable-ldpi/stylogo120dpi.png b/app/src/androidTest/res/drawable-ldpi/stylogo120dpi.png new file mode 100644 index 0000000..bdb1b80 Binary files /dev/null and b/app/src/androidTest/res/drawable-ldpi/stylogo120dpi.png differ diff --git a/app/src/androidTest/res/drawable-mdpi/alert_dialog_icon.png b/app/src/androidTest/res/drawable-mdpi/alert_dialog_icon.png new file mode 100644 index 0000000..4b86f1c Binary files /dev/null and b/app/src/androidTest/res/drawable-mdpi/alert_dialog_icon.png differ diff --git a/app/src/androidTest/res/drawable-mdpi/apidemo_androidlogo.png b/app/src/androidTest/res/drawable-mdpi/apidemo_androidlogo.png new file mode 100644 index 0000000..e7d89f9 Binary files /dev/null and b/app/src/androidTest/res/drawable-mdpi/apidemo_androidlogo.png differ diff --git a/app/src/androidTest/res/drawable-mdpi/app_sample_code.png b/app/src/androidTest/res/drawable-mdpi/app_sample_code.png new file mode 100644 index 0000000..2132c8d Binary files /dev/null and b/app/src/androidTest/res/drawable-mdpi/app_sample_code.png differ diff --git a/app/src/androidTest/res/drawable-mdpi/arrow_down_float.png b/app/src/androidTest/res/drawable-mdpi/arrow_down_float.png new file mode 100644 index 0000000..9b3b3ee Binary files /dev/null and b/app/src/androidTest/res/drawable-mdpi/arrow_down_float.png differ diff --git a/app/src/androidTest/res/drawable-mdpi/arrow_up_float.png b/app/src/androidTest/res/drawable-mdpi/arrow_up_float.png new file mode 100644 index 0000000..0893006 Binary files /dev/null and b/app/src/androidTest/res/drawable-mdpi/arrow_up_float.png differ diff --git a/app/src/androidTest/res/drawable-mdpi/btn_check_off.png b/app/src/androidTest/res/drawable-mdpi/btn_check_off.png new file mode 100644 index 0000000..5709ab5 Binary files /dev/null and b/app/src/androidTest/res/drawable-mdpi/btn_check_off.png differ diff --git a/app/src/androidTest/res/drawable-mdpi/btn_check_on.png b/app/src/androidTest/res/drawable-mdpi/btn_check_on.png new file mode 100644 index 0000000..8af2111 Binary files /dev/null and b/app/src/androidTest/res/drawable-mdpi/btn_check_on.png differ diff --git a/app/src/androidTest/res/drawable-mdpi/btn_circle_normal.png b/app/src/androidTest/res/drawable-mdpi/btn_circle_normal.png new file mode 100644 index 0000000..258917d Binary files /dev/null and b/app/src/androidTest/res/drawable-mdpi/btn_circle_normal.png differ diff --git a/app/src/androidTest/res/drawable-mdpi/btn_default_normal.9.png b/app/src/androidTest/res/drawable-mdpi/btn_default_normal.9.png new file mode 100644 index 0000000..4be3e7b Binary files /dev/null and b/app/src/androidTest/res/drawable-mdpi/btn_default_normal.9.png differ diff --git a/app/src/androidTest/res/drawable-mdpi/button.9.png b/app/src/androidTest/res/drawable-mdpi/button.9.png new file mode 100644 index 0000000..a35786c Binary files /dev/null and b/app/src/androidTest/res/drawable-mdpi/button.9.png differ diff --git a/app/src/androidTest/res/drawable-mdpi/ic_contact_picture.png b/app/src/androidTest/res/drawable-mdpi/ic_contact_picture.png new file mode 100644 index 0000000..0be5d55 Binary files /dev/null and b/app/src/androidTest/res/drawable-mdpi/ic_contact_picture.png differ diff --git a/app/src/androidTest/res/drawable-mdpi/ic_launcher_settings.png b/app/src/androidTest/res/drawable-mdpi/ic_launcher_settings.png new file mode 100644 index 0000000..693e5aa Binary files /dev/null and b/app/src/androidTest/res/drawable-mdpi/ic_launcher_settings.png differ diff --git a/app/src/androidTest/res/drawable-mdpi/ic_popup_reminder.png b/app/src/androidTest/res/drawable-mdpi/ic_popup_reminder.png new file mode 100644 index 0000000..b8750b8 Binary files /dev/null and b/app/src/androidTest/res/drawable-mdpi/ic_popup_reminder.png differ diff --git a/app/src/androidTest/res/drawable-mdpi/ic_settings_applications.png b/app/src/androidTest/res/drawable-mdpi/ic_settings_applications.png new file mode 100644 index 0000000..da24aa6 Binary files /dev/null and b/app/src/androidTest/res/drawable-mdpi/ic_settings_applications.png differ diff --git a/app/src/androidTest/res/drawable-mdpi/ic_settings_display.png b/app/src/androidTest/res/drawable-mdpi/ic_settings_display.png new file mode 100644 index 0000000..2cf7200 Binary files /dev/null and b/app/src/androidTest/res/drawable-mdpi/ic_settings_display.png differ diff --git a/app/src/androidTest/res/drawable-mdpi/icon48x48_2.png b/app/src/androidTest/res/drawable-mdpi/icon48x48_2.png new file mode 100644 index 0000000..47f39f5 Binary files /dev/null and b/app/src/androidTest/res/drawable-mdpi/icon48x48_2.png differ diff --git a/app/src/androidTest/res/drawable-mdpi/progress_circular_background.png b/app/src/androidTest/res/drawable-mdpi/progress_circular_background.png new file mode 100644 index 0000000..0967b78 Binary files /dev/null and b/app/src/androidTest/res/drawable-mdpi/progress_circular_background.png differ diff --git a/app/src/androidTest/res/drawable-mdpi/progress_particle.png b/app/src/androidTest/res/drawable-mdpi/progress_particle.png new file mode 100644 index 0000000..9ebddcc Binary files /dev/null and b/app/src/androidTest/res/drawable-mdpi/progress_particle.png differ diff --git a/app/src/androidTest/res/drawable-mdpi/scrollbar_state2.png b/app/src/androidTest/res/drawable-mdpi/scrollbar_state2.png new file mode 100644 index 0000000..72905e4 Binary files /dev/null and b/app/src/androidTest/res/drawable-mdpi/scrollbar_state2.png differ diff --git a/app/src/androidTest/res/drawable-mdpi/star_big_on.png b/app/src/androidTest/res/drawable-mdpi/star_big_on.png new file mode 100644 index 0000000..506fa9a Binary files /dev/null and b/app/src/androidTest/res/drawable-mdpi/star_big_on.png differ diff --git a/app/src/androidTest/res/drawable-mdpi/stat_happy.png b/app/src/androidTest/res/drawable-mdpi/stat_happy.png new file mode 100644 index 0000000..4d0b900 Binary files /dev/null and b/app/src/androidTest/res/drawable-mdpi/stat_happy.png differ diff --git a/app/src/androidTest/res/drawable-mdpi/stat_neutral.png b/app/src/androidTest/res/drawable-mdpi/stat_neutral.png new file mode 100644 index 0000000..d220378 Binary files /dev/null and b/app/src/androidTest/res/drawable-mdpi/stat_neutral.png differ diff --git a/app/src/androidTest/res/drawable-mdpi/stat_sad.png b/app/src/androidTest/res/drawable-mdpi/stat_sad.png new file mode 100644 index 0000000..9d6b16b Binary files /dev/null and b/app/src/androidTest/res/drawable-mdpi/stat_sad.png differ diff --git a/app/src/androidTest/res/drawable-mdpi/stat_sample.png b/app/src/androidTest/res/drawable-mdpi/stat_sample.png new file mode 100644 index 0000000..368ea30 Binary files /dev/null and b/app/src/androidTest/res/drawable-mdpi/stat_sample.png differ diff --git a/app/src/androidTest/res/drawable-nodpi/logonodpi120.png b/app/src/androidTest/res/drawable-nodpi/logonodpi120.png new file mode 100644 index 0000000..bdb1b80 Binary files /dev/null and b/app/src/androidTest/res/drawable-nodpi/logonodpi120.png differ diff --git a/app/src/androidTest/res/drawable-nodpi/logonodpi160.png b/app/src/androidTest/res/drawable-nodpi/logonodpi160.png new file mode 100644 index 0000000..74854dc Binary files /dev/null and b/app/src/androidTest/res/drawable-nodpi/logonodpi160.png differ diff --git a/app/src/androidTest/res/drawable-nodpi/logonodpi240.png b/app/src/androidTest/res/drawable-nodpi/logonodpi240.png new file mode 100644 index 0000000..9a19e90 Binary files /dev/null and b/app/src/androidTest/res/drawable-nodpi/logonodpi240.png differ diff --git a/app/src/androidTest/res/drawable-xhdpi/ic_launcher_settings.png b/app/src/androidTest/res/drawable-xhdpi/ic_launcher_settings.png new file mode 100644 index 0000000..0944c83 Binary files /dev/null and b/app/src/androidTest/res/drawable-xhdpi/ic_launcher_settings.png differ diff --git a/app/src/androidTest/res/drawable/icon48x48_1.png b/app/src/androidTest/res/drawable/icon48x48_1.png new file mode 100644 index 0000000..e8b765e Binary files /dev/null and b/app/src/androidTest/res/drawable/icon48x48_1.png differ diff --git a/app/src/androidTest/res/drawable/logo160dpi.png b/app/src/androidTest/res/drawable/logo160dpi.png new file mode 100644 index 0000000..74854dc Binary files /dev/null and b/app/src/androidTest/res/drawable/logo160dpi.png differ diff --git a/app/src/androidTest/res/drawable/magnifying_glass.png b/app/src/androidTest/res/drawable/magnifying_glass.png new file mode 100644 index 0000000..633b1f2 Binary files /dev/null and b/app/src/androidTest/res/drawable/magnifying_glass.png differ diff --git a/app/src/androidTest/res/drawable/npatch160dpi.9.png b/app/src/androidTest/res/drawable/npatch160dpi.9.png new file mode 100644 index 0000000..eef83b7 Binary files /dev/null and b/app/src/androidTest/res/drawable/npatch160dpi.9.png differ diff --git a/app/src/androidTest/res/drawable/picture_frame.png b/app/src/androidTest/res/drawable/picture_frame.png new file mode 100644 index 0000000..6d86fad Binary files /dev/null and b/app/src/androidTest/res/drawable/picture_frame.png differ diff --git a/app/src/androidTest/res/drawable/reslogo160dpi.png b/app/src/androidTest/res/drawable/reslogo160dpi.png new file mode 100644 index 0000000..74854dc Binary files /dev/null and b/app/src/androidTest/res/drawable/reslogo160dpi.png differ diff --git a/app/src/androidTest/res/drawable/smlnpatch160dpi.9.png b/app/src/androidTest/res/drawable/smlnpatch160dpi.9.png new file mode 100644 index 0000000..53efb55 Binary files /dev/null and b/app/src/androidTest/res/drawable/smlnpatch160dpi.9.png differ diff --git a/app/src/androidTest/res/drawable/stylogo160dpi.png b/app/src/androidTest/res/drawable/stylogo160dpi.png new file mode 100644 index 0000000..74854dc Binary files /dev/null and b/app/src/androidTest/res/drawable/stylogo160dpi.png differ diff --git a/app/src/androidTest/res/raw/robot.png b/app/src/androidTest/res/raw/robot.png new file mode 100644 index 0000000..594e199 Binary files /dev/null and b/app/src/androidTest/res/raw/robot.png differ diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000..a5db947 --- /dev/null +++ b/app/src/main/AndroidManifest.xml @@ -0,0 +1,3421 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/com/example/android/apis/app/IRemoteService.aidl b/app/src/main/aidl/io/appium/android/apis/app/IRemoteService.aidl similarity index 92% rename from src/com/example/android/apis/app/IRemoteService.aidl rename to app/src/main/aidl/io/appium/android/apis/app/IRemoteService.aidl index 046e3f6..32c5ebf 100644 --- a/src/com/example/android/apis/app/IRemoteService.aidl +++ b/app/src/main/aidl/io/appium/android/apis/app/IRemoteService.aidl @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.app; +package io.appium.android.apis.app; -import com.example.android.apis.app.IRemoteServiceCallback; +import io.appium.android.apis.app.IRemoteServiceCallback; /** * Example of defining an interface for calling on to a remote service diff --git a/src/com/example/android/apis/app/IRemoteServiceCallback.aidl b/app/src/main/aidl/io/appium/android/apis/app/IRemoteServiceCallback.aidl similarity index 96% rename from src/com/example/android/apis/app/IRemoteServiceCallback.aidl rename to app/src/main/aidl/io/appium/android/apis/app/IRemoteServiceCallback.aidl index 4fed807..596f345 100644 --- a/src/com/example/android/apis/app/IRemoteServiceCallback.aidl +++ b/app/src/main/aidl/io/appium/android/apis/app/IRemoteServiceCallback.aidl @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.app; +package io.appium.android.apis.app; /** * Example of a callback interface used by IRemoteService to send diff --git a/src/com/example/android/apis/app/ISecondary.aidl b/app/src/main/aidl/io/appium/android/apis/app/ISecondary.aidl similarity index 96% rename from src/com/example/android/apis/app/ISecondary.aidl rename to app/src/main/aidl/io/appium/android/apis/app/ISecondary.aidl index 98e2823..c36028f 100644 --- a/src/com/example/android/apis/app/ISecondary.aidl +++ b/app/src/main/aidl/io/appium/android/apis/app/ISecondary.aidl @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.app; +package io.appium.android.apis.app; /** * Example of a secondary interface associated with a service. (Note that diff --git a/assets/HelloActivity.apk b/app/src/main/assets/HelloActivity.apk similarity index 100% rename from assets/HelloActivity.apk rename to app/src/main/assets/HelloActivity.apk diff --git a/assets/fonts/samplefont.ttf b/app/src/main/assets/fonts/samplefont.ttf similarity index 100% rename from assets/fonts/samplefont.ttf rename to app/src/main/assets/fonts/samplefont.ttf diff --git a/app/src/main/assets/html/index.html b/app/src/main/assets/html/index.html new file mode 100644 index 0000000..23cb69b --- /dev/null +++ b/app/src/main/assets/html/index.html @@ -0,0 +1,19 @@ + + + + + I am a page title + + +

This page is a Selenium sandbox

+ + I am some page content + i am a link
+ +
+

+ +

+
+ + diff --git a/app/src/main/assets/html/index2.html b/app/src/main/assets/html/index2.html new file mode 100644 index 0000000..1a4ee42 --- /dev/null +++ b/app/src/main/assets/html/index2.html @@ -0,0 +1,19 @@ + + + + + I am a page title + + +

This page is a Second Selenium sandbox

+ + I am some page content + i am a link
+ +
+

+ +

+
+ + diff --git a/app/src/main/assets/html/linked.html b/app/src/main/assets/html/linked.html new file mode 100644 index 0000000..1ac8941 --- /dev/null +++ b/app/src/main/assets/html/linked.html @@ -0,0 +1,10 @@ + + + + + I am a page title + + + I am some other page content + + diff --git a/assets/read_asset.txt b/app/src/main/assets/read_asset.txt similarity index 100% rename from assets/read_asset.txt rename to app/src/main/assets/read_asset.txt diff --git a/src/com/example/android/apis/ApiDemos.java b/app/src/main/java/io/appium/android/apis/ApiDemos.java similarity index 81% rename from src/com/example/android/apis/ApiDemos.java rename to app/src/main/java/io/appium/android/apis/ApiDemos.java index c506e7c..5d5e2e8 100644 --- a/src/com/example/android/apis/ApiDemos.java +++ b/app/src/main/java/io/appium/android/apis/ApiDemos.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis; +package io.appium.android.apis; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.ListActivity; import android.content.Context; @@ -43,7 +43,7 @@ public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Intent intent = getIntent(); - String path = intent.getStringExtra("com.example.android.apis.Path"); + String path = intent.getStringExtra("io.appium.android.apis.Path"); if (path == null) { path = ""; @@ -59,7 +59,7 @@ protected List> getData(String prefix) { List> myData = new ArrayList>(); Intent mainIntent = new Intent(Intent.ACTION_MAIN, null); - mainIntent.addCategory(Intent.CATEGORY_SAMPLE_CODE); + mainIntent.addCategory("appium.android.intent.category.SAMPLE_CODE"); PackageManager pm = getPackageManager(); List list = pm.queryIntentActivities(mainIntent, 0); @@ -102,6 +102,17 @@ protected List> getData(String prefix) { if (entries.get(nextLabel) == null) { addItem(myData, nextLabel, browseIntent(prefix.equals("") ? nextLabel : prefix + "/" + nextLabel)); entries.put(nextLabel, true); + + // Need an element with an apostrophe in its content-desc for a regression test. + // Using "Accessibility" because it's first and I'm lazy. Unfortunately, this + // is code is rather hacky, but since the labels are generated from strings defined + // within Android Manifest, this is the quick n' dirty way of adding a new label while + // being certain nothing's broken. + if(nextLabel.equals("Accessibility")) { + String testLabel = "Access'ibility"; + addItem(myData, testLabel, browseIntent(prefix.equals("") ? nextLabel : prefix + "/" + nextLabel)); + entries.put(testLabel, true); + } } } } @@ -130,7 +141,7 @@ protected Intent activityIntent(String pkg, String componentName) { protected Intent browseIntent(String path) { Intent result = new Intent(); result.setClass(this, ApiDemos.class); - result.putExtra("com.example.android.apis.Path", path); + result.putExtra("io.appium.android.apis.Path", path); return result; } diff --git a/src/com/example/android/apis/ApiDemosApplication.java b/app/src/main/java/io/appium/android/apis/ApiDemosApplication.java similarity index 90% rename from src/com/example/android/apis/ApiDemosApplication.java rename to app/src/main/java/io/appium/android/apis/ApiDemosApplication.java index 4ad5d35..4d46ac4 100644 --- a/src/com/example/android/apis/ApiDemosApplication.java +++ b/app/src/main/java/io/appium/android/apis/ApiDemosApplication.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis; +package io.appium.android.apis; import android.app.Application; @@ -26,7 +26,7 @@ * * In this case, we have not defined any specific work for this Application. * - * See samples/ApiDemos/tests/src/com.example.android.apis/ApiDemosApplicationTests for an example + * See samples/ApiDemos/tests/src/io.appium.android.apis/ApiDemosApplicationTests for an example * of how to perform unit tests on an Application object. */ public class ApiDemosApplication extends Application { diff --git a/src/com/example/android/apis/Shakespeare.java b/app/src/main/java/io/appium/android/apis/Shakespeare.java similarity index 99% rename from src/com/example/android/apis/Shakespeare.java rename to app/src/main/java/io/appium/android/apis/Shakespeare.java index 481df4b..104a10a 100644 --- a/src/com/example/android/apis/Shakespeare.java +++ b/app/src/main/java/io/appium/android/apis/Shakespeare.java @@ -1,4 +1,4 @@ -package com.example.android.apis; +package io.appium.android.apis; public final class Shakespeare { /** diff --git a/src/com/example/android/apis/SimpleAdapterWithDesc.java b/app/src/main/java/io/appium/android/apis/SimpleAdapterWithDesc.java similarity index 95% rename from src/com/example/android/apis/SimpleAdapterWithDesc.java rename to app/src/main/java/io/appium/android/apis/SimpleAdapterWithDesc.java index 81ad6bf..8d73091 100644 --- a/src/com/example/android/apis/SimpleAdapterWithDesc.java +++ b/app/src/main/java/io/appium/android/apis/SimpleAdapterWithDesc.java @@ -1,4 +1,4 @@ -package com.example.android.apis; +package io.appium.android.apis; import java.util.List; import java.util.Map; diff --git a/src/com/example/android/apis/accessibility/AccessibilityNodeProviderActivity.java b/app/src/main/java/io/appium/android/apis/accessibility/AccessibilityNodeProviderActivity.java similarity index 99% rename from src/com/example/android/apis/accessibility/AccessibilityNodeProviderActivity.java rename to app/src/main/java/io/appium/android/apis/accessibility/AccessibilityNodeProviderActivity.java index 1ca036a..407d4bb 100644 --- a/src/com/example/android/apis/accessibility/AccessibilityNodeProviderActivity.java +++ b/app/src/main/java/io/appium/android/apis/accessibility/AccessibilityNodeProviderActivity.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.accessibility; +package io.appium.android.apis.accessibility; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.app.Service; diff --git a/src/com/example/android/apis/accessibility/ClockBackActivity.java b/app/src/main/java/io/appium/android/apis/accessibility/ClockBackActivity.java similarity index 95% rename from src/com/example/android/apis/accessibility/ClockBackActivity.java rename to app/src/main/java/io/appium/android/apis/accessibility/ClockBackActivity.java index 75fb1ff..af01537 100644 --- a/src/com/example/android/apis/accessibility/ClockBackActivity.java +++ b/app/src/main/java/io/appium/android/apis/accessibility/ClockBackActivity.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.accessibility; +package io.appium.android.apis.accessibility; import android.app.Activity; import android.content.Intent; @@ -23,7 +23,7 @@ import android.view.View; import android.widget.ImageButton; -import com.example.android.apis.R; +import io.appium.android.apis.R; /** * This is the entry activity for a sample that demonstrates how to implement an diff --git a/src/com/example/android/apis/accessibility/ClockBackService.java b/app/src/main/java/io/appium/android/apis/accessibility/ClockBackService.java similarity index 99% rename from src/com/example/android/apis/accessibility/ClockBackService.java rename to app/src/main/java/io/appium/android/apis/accessibility/ClockBackService.java index d5cd2a3..a1fe0b0 100644 --- a/src/com/example/android/apis/accessibility/ClockBackService.java +++ b/app/src/main/java/io/appium/android/apis/accessibility/ClockBackService.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.accessibility; +package io.appium.android.apis.accessibility; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.accessibilityservice.AccessibilityService; import android.accessibilityservice.AccessibilityServiceInfo; diff --git a/src/com/example/android/apis/accessibility/CustomViewAccessibilityActivity.java b/app/src/main/java/io/appium/android/apis/accessibility/CustomViewAccessibilityActivity.java similarity index 99% rename from src/com/example/android/apis/accessibility/CustomViewAccessibilityActivity.java rename to app/src/main/java/io/appium/android/apis/accessibility/CustomViewAccessibilityActivity.java index 8facfba..92f4017 100644 --- a/src/com/example/android/apis/accessibility/CustomViewAccessibilityActivity.java +++ b/app/src/main/java/io/appium/android/apis/accessibility/CustomViewAccessibilityActivity.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.accessibility; +package io.appium.android.apis.accessibility; import android.app.Activity; import android.content.Context; @@ -32,7 +32,7 @@ import android.view.accessibility.AccessibilityEvent; import android.view.accessibility.AccessibilityNodeInfo; -import com.example.android.apis.R; +import io.appium.android.apis.R; /** * Demonstrates how to implement accessibility support of custom views. Custom view diff --git a/src/com/example/android/apis/accessibility/TaskBackService.java b/app/src/main/java/io/appium/android/apis/accessibility/TaskBackService.java similarity index 97% rename from src/com/example/android/apis/accessibility/TaskBackService.java rename to app/src/main/java/io/appium/android/apis/accessibility/TaskBackService.java index c7088be..ec80f5a 100644 --- a/src/com/example/android/apis/accessibility/TaskBackService.java +++ b/app/src/main/java/io/appium/android/apis/accessibility/TaskBackService.java @@ -14,9 +14,9 @@ * the License. */ -package com.example.android.apis.accessibility; +package io.appium.android.apis.accessibility; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.accessibilityservice.AccessibilityService; import android.text.TextUtils; @@ -43,7 +43,7 @@ public class TaskBackService extends AccessibilityService implements OnInitListe /** The class name of TaskListView - for simplicity we speak only its items. */ private static final String TASK_LIST_VIEW_CLASS_NAME = - "com.example.android.apis.accessibility.TaskListView"; + "io.appium.android.apis.accessibility.TaskListView"; /** Flag whether Text-To-Speech is initialized. */ private boolean mTextToSpeechInitialized; diff --git a/src/com/example/android/apis/accessibility/TaskListActivity.java b/app/src/main/java/io/appium/android/apis/accessibility/TaskListActivity.java similarity index 96% rename from src/com/example/android/apis/accessibility/TaskListActivity.java rename to app/src/main/java/io/appium/android/apis/accessibility/TaskListActivity.java index 4f7f384..56192fe 100644 --- a/src/com/example/android/apis/accessibility/TaskListActivity.java +++ b/app/src/main/java/io/appium/android/apis/accessibility/TaskListActivity.java @@ -14,9 +14,9 @@ * the License. */ -package com.example.android.apis.accessibility; +package io.appium.android.apis.accessibility; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.ListActivity; import android.content.Intent; diff --git a/src/com/example/android/apis/accessibility/TaskListView.java b/app/src/main/java/io/appium/android/apis/accessibility/TaskListView.java similarity index 97% rename from src/com/example/android/apis/accessibility/TaskListView.java rename to app/src/main/java/io/appium/android/apis/accessibility/TaskListView.java index a4b17cb..6f552cc 100644 --- a/src/com/example/android/apis/accessibility/TaskListView.java +++ b/app/src/main/java/io/appium/android/apis/accessibility/TaskListView.java @@ -14,9 +14,9 @@ * the License. */ -package com.example.android.apis.accessibility; +package io.appium.android.apis.accessibility; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.content.Context; import android.util.AttributeSet; diff --git a/src/com/example/android/apis/animation/AnimationCloning.java b/app/src/main/java/io/appium/android/apis/animation/AnimationCloning.java similarity index 98% rename from src/com/example/android/apis/animation/AnimationCloning.java rename to app/src/main/java/io/appium/android/apis/animation/AnimationCloning.java index 61896fa..6adac07 100644 --- a/src/com/example/android/apis/animation/AnimationCloning.java +++ b/app/src/main/java/io/appium/android/apis/animation/AnimationCloning.java @@ -14,12 +14,12 @@ * limitations under the License. */ -package com.example.android.apis.animation; +package io.appium.android.apis.animation; // Need the following import to get access to the app resources, since this // class is in a sub-package. import android.widget.Button; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.animation.*; import android.app.Activity; diff --git a/src/com/example/android/apis/animation/AnimationLoading.java b/app/src/main/java/io/appium/android/apis/animation/AnimationLoading.java similarity index 98% rename from src/com/example/android/apis/animation/AnimationLoading.java rename to app/src/main/java/io/appium/android/apis/animation/AnimationLoading.java index 910ee28..5af32bf 100644 --- a/src/com/example/android/apis/animation/AnimationLoading.java +++ b/app/src/main/java/io/appium/android/apis/animation/AnimationLoading.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.animation; +package io.appium.android.apis.animation; // Need the following import to get access to the app resources, since this // class is in a sub-package. @@ -22,7 +22,7 @@ import android.animation.AnimatorSet; import android.animation.ObjectAnimator; import android.graphics.Color; -import com.example.android.apis.R; +import io.appium.android.apis.R; import java.util.ArrayList; diff --git a/src/com/example/android/apis/animation/AnimationSeeking.java b/app/src/main/java/io/appium/android/apis/animation/AnimationSeeking.java similarity index 98% rename from src/com/example/android/apis/animation/AnimationSeeking.java rename to app/src/main/java/io/appium/android/apis/animation/AnimationSeeking.java index 066912b..f35cb7b 100644 --- a/src/com/example/android/apis/animation/AnimationSeeking.java +++ b/app/src/main/java/io/appium/android/apis/animation/AnimationSeeking.java @@ -14,12 +14,12 @@ * limitations under the License. */ -package com.example.android.apis.animation; +package io.appium.android.apis.animation; // Need the following import to get access to the app resources, since this // class is in a sub-package. import android.animation.Animator; -import com.example.android.apis.R; +import io.appium.android.apis.R; import java.util.ArrayList; diff --git a/src/com/example/android/apis/animation/AnimatorEvents.java b/app/src/main/java/io/appium/android/apis/animation/AnimatorEvents.java similarity index 99% rename from src/com/example/android/apis/animation/AnimatorEvents.java rename to app/src/main/java/io/appium/android/apis/animation/AnimatorEvents.java index 81ece18..8bfc919 100644 --- a/src/com/example/android/apis/animation/AnimatorEvents.java +++ b/app/src/main/java/io/appium/android/apis/animation/AnimatorEvents.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.animation; +package io.appium.android.apis.animation; // Need the following import to get access to the app resources, since this // class is in a sub-package. @@ -22,7 +22,7 @@ import android.animation.ObjectAnimator; import android.widget.CheckBox; import android.widget.TextView; -import com.example.android.apis.R; +import io.appium.android.apis.R; import java.util.ArrayList; diff --git a/src/com/example/android/apis/animation/BouncingBalls.java b/app/src/main/java/io/appium/android/apis/animation/BouncingBalls.java similarity index 99% rename from src/com/example/android/apis/animation/BouncingBalls.java rename to app/src/main/java/io/appium/android/apis/animation/BouncingBalls.java index de28da3..1b2b4d9 100644 --- a/src/com/example/android/apis/animation/BouncingBalls.java +++ b/app/src/main/java/io/appium/android/apis/animation/BouncingBalls.java @@ -14,12 +14,12 @@ * limitations under the License. */ -package com.example.android.apis.animation; +package io.appium.android.apis.animation; // Need the following import to get access to the app resources, since this // class is in a sub-package. import android.graphics.drawable.ColorDrawable; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.animation.*; import android.app.Activity; diff --git a/src/com/example/android/apis/animation/CustomEvaluator.java b/app/src/main/java/io/appium/android/apis/animation/CustomEvaluator.java similarity index 98% rename from src/com/example/android/apis/animation/CustomEvaluator.java rename to app/src/main/java/io/appium/android/apis/animation/CustomEvaluator.java index 623450a..38c19d4 100644 --- a/src/com/example/android/apis/animation/CustomEvaluator.java +++ b/app/src/main/java/io/appium/android/apis/animation/CustomEvaluator.java @@ -14,14 +14,14 @@ * limitations under the License. */ -package com.example.android.apis.animation; +package io.appium.android.apis.animation; // Need the following import to get access to the app resources, since this // class is in a sub-package. import android.animation.ObjectAnimator; import android.animation.TypeEvaluator; import android.animation.ValueAnimator; -import com.example.android.apis.R; +import io.appium.android.apis.R; import java.util.ArrayList; diff --git a/src/com/example/android/apis/animation/FixedGridLayout.java b/app/src/main/java/io/appium/android/apis/animation/FixedGridLayout.java similarity index 98% rename from src/com/example/android/apis/animation/FixedGridLayout.java rename to app/src/main/java/io/appium/android/apis/animation/FixedGridLayout.java index 5d92e85..9e7129f 100644 --- a/src/com/example/android/apis/animation/FixedGridLayout.java +++ b/app/src/main/java/io/appium/android/apis/animation/FixedGridLayout.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.animation; +package io.appium.android.apis.animation; import android.content.Context; import android.content.res.TypedArray; diff --git a/src/com/example/android/apis/animation/LayoutAnimations.java b/app/src/main/java/io/appium/android/apis/animation/LayoutAnimations.java similarity index 99% rename from src/com/example/android/apis/animation/LayoutAnimations.java rename to app/src/main/java/io/appium/android/apis/animation/LayoutAnimations.java index a2ff23c..952c5c2 100644 --- a/src/com/example/android/apis/animation/LayoutAnimations.java +++ b/app/src/main/java/io/appium/android/apis/animation/LayoutAnimations.java @@ -14,13 +14,13 @@ * limitations under the License. */ -package com.example.android.apis.animation; +package io.appium.android.apis.animation; // Need the following import to get access to the app resources, since this // class is in a sub-package. import android.animation.Animator; import android.animation.ObjectAnimator; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.animation.AnimatorListenerAdapter; import android.animation.Keyframe; diff --git a/src/com/example/android/apis/animation/LayoutAnimationsByDefault.java b/app/src/main/java/io/appium/android/apis/animation/LayoutAnimationsByDefault.java similarity index 96% rename from src/com/example/android/apis/animation/LayoutAnimationsByDefault.java rename to app/src/main/java/io/appium/android/apis/animation/LayoutAnimationsByDefault.java index 8898b55..3425c2b 100644 --- a/src/com/example/android/apis/animation/LayoutAnimationsByDefault.java +++ b/app/src/main/java/io/appium/android/apis/animation/LayoutAnimationsByDefault.java @@ -14,11 +14,11 @@ * limitations under the License. */ -package com.example.android.apis.animation; +package io.appium.android.apis.animation; // Need the following import to get access to the app resources, since this // class is in a sub-package. -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.view.View; diff --git a/src/com/example/android/apis/animation/LayoutAnimationsHideShow.java b/app/src/main/java/io/appium/android/apis/animation/LayoutAnimationsHideShow.java similarity index 98% rename from src/com/example/android/apis/animation/LayoutAnimationsHideShow.java rename to app/src/main/java/io/appium/android/apis/animation/LayoutAnimationsHideShow.java index ac0609e..c6a438a 100644 --- a/src/com/example/android/apis/animation/LayoutAnimationsHideShow.java +++ b/app/src/main/java/io/appium/android/apis/animation/LayoutAnimationsHideShow.java @@ -14,14 +14,14 @@ * limitations under the License. */ -package com.example.android.apis.animation; +package io.appium.android.apis.animation; // Need the following import to get access to the app resources, since this // class is in a sub-package. import android.animation.Animator; import android.animation.ObjectAnimator; import android.widget.LinearLayout; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.animation.AnimatorListenerAdapter; import android.animation.Keyframe; diff --git a/src/com/example/android/apis/animation/ListFlipper.java b/app/src/main/java/io/appium/android/apis/animation/ListFlipper.java similarity index 98% rename from src/com/example/android/apis/animation/ListFlipper.java rename to app/src/main/java/io/appium/android/apis/animation/ListFlipper.java index 7cc03db..d738e2d 100644 --- a/src/com/example/android/apis/animation/ListFlipper.java +++ b/app/src/main/java/io/appium/android/apis/animation/ListFlipper.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.animation; +package io.appium.android.apis.animation; // Need the following import to get access to the app resources, since this // class is in a sub-package. @@ -26,7 +26,7 @@ import android.view.animation.Interpolator; import android.widget.ArrayAdapter; import android.widget.ListView; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.os.Bundle; diff --git a/src/com/example/android/apis/animation/MultiPropertyAnimation.java b/app/src/main/java/io/appium/android/apis/animation/MultiPropertyAnimation.java similarity index 98% rename from src/com/example/android/apis/animation/MultiPropertyAnimation.java rename to app/src/main/java/io/appium/android/apis/animation/MultiPropertyAnimation.java index 71af03f..955d0f2 100644 --- a/src/com/example/android/apis/animation/MultiPropertyAnimation.java +++ b/app/src/main/java/io/appium/android/apis/animation/MultiPropertyAnimation.java @@ -14,13 +14,13 @@ * limitations under the License. */ -package com.example.android.apis.animation; +package io.appium.android.apis.animation; // Need the following import to get access to the app resources, since this // class is in a sub-package. import android.animation.*; import android.view.animation.AccelerateInterpolator; -import com.example.android.apis.R; +import io.appium.android.apis.R; import java.util.ArrayList; diff --git a/src/com/example/android/apis/animation/ReversingAnimation.java b/app/src/main/java/io/appium/android/apis/animation/ReversingAnimation.java similarity index 98% rename from src/com/example/android/apis/animation/ReversingAnimation.java rename to app/src/main/java/io/appium/android/apis/animation/ReversingAnimation.java index 89af6de..f3ab421 100644 --- a/src/com/example/android/apis/animation/ReversingAnimation.java +++ b/app/src/main/java/io/appium/android/apis/animation/ReversingAnimation.java @@ -14,13 +14,13 @@ * limitations under the License. */ -package com.example.android.apis.animation; +package io.appium.android.apis.animation; // Need the following import to get access to the app resources, since this // class is in a sub-package. import android.animation.ObjectAnimator; import android.animation.ValueAnimator; -import com.example.android.apis.R; +import io.appium.android.apis.R; import java.util.ArrayList; diff --git a/src/com/example/android/apis/animation/Rotate3dAnimation.java b/app/src/main/java/io/appium/android/apis/animation/Rotate3dAnimation.java similarity index 98% rename from src/com/example/android/apis/animation/Rotate3dAnimation.java rename to app/src/main/java/io/appium/android/apis/animation/Rotate3dAnimation.java index 61ee828..e8d3bac 100644 --- a/src/com/example/android/apis/animation/Rotate3dAnimation.java +++ b/app/src/main/java/io/appium/android/apis/animation/Rotate3dAnimation.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.animation; +package io.appium.android.apis.animation; import android.view.animation.Animation; import android.view.animation.Transformation; diff --git a/src/com/example/android/apis/animation/ShapeHolder.java b/app/src/main/java/io/appium/android/apis/animation/ShapeHolder.java similarity index 98% rename from src/com/example/android/apis/animation/ShapeHolder.java rename to app/src/main/java/io/appium/android/apis/animation/ShapeHolder.java index 2d40672..22b8318 100644 --- a/src/com/example/android/apis/animation/ShapeHolder.java +++ b/app/src/main/java/io/appium/android/apis/animation/ShapeHolder.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.animation; +package io.appium.android.apis.animation; import android.graphics.Paint; import android.graphics.RadialGradient; diff --git a/src/com/example/android/apis/animation/Transition3d.java b/app/src/main/java/io/appium/android/apis/animation/Transition3d.java similarity index 98% rename from src/com/example/android/apis/animation/Transition3d.java rename to app/src/main/java/io/appium/android/apis/animation/Transition3d.java index a52b01b..7622611 100644 --- a/src/com/example/android/apis/animation/Transition3d.java +++ b/app/src/main/java/io/appium/android/apis/animation/Transition3d.java @@ -1,6 +1,6 @@ -package com.example.android.apis.animation; +package io.appium.android.apis.animation; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.os.Bundle; diff --git a/src/com/example/android/apis/app/ActionBarDisplayOptions.java b/app/src/main/java/io/appium/android/apis/app/ActionBarDisplayOptions.java similarity index 98% rename from src/com/example/android/apis/app/ActionBarDisplayOptions.java rename to app/src/main/java/io/appium/android/apis/app/ActionBarDisplayOptions.java index 257f0cd..ae9399d 100644 --- a/src/com/example/android/apis/app/ActionBarDisplayOptions.java +++ b/app/src/main/java/io/appium/android/apis/app/ActionBarDisplayOptions.java @@ -13,9 +13,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.example.android.apis.app; +package io.appium.android.apis.app; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.ActionBar; import android.app.ActionBar.Tab; diff --git a/src/com/example/android/apis/app/ActionBarMechanics.java b/app/src/main/java/io/appium/android/apis/app/ActionBarMechanics.java similarity index 98% rename from src/com/example/android/apis/app/ActionBarMechanics.java rename to app/src/main/java/io/appium/android/apis/app/ActionBarMechanics.java index e479780..3f3bbbd 100644 --- a/src/com/example/android/apis/app/ActionBarMechanics.java +++ b/app/src/main/java/io/appium/android/apis/app/ActionBarMechanics.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.example.android.apis.app; +package io.appium.android.apis.app; import android.app.Activity; import android.os.Bundle; diff --git a/src/com/example/android/apis/app/ActionBarSettingsActionProviderActivity.java b/app/src/main/java/io/appium/android/apis/app/ActionBarSettingsActionProviderActivity.java similarity index 98% rename from src/com/example/android/apis/app/ActionBarSettingsActionProviderActivity.java rename to app/src/main/java/io/appium/android/apis/app/ActionBarSettingsActionProviderActivity.java index 4748762..e837ddf 100644 --- a/src/com/example/android/apis/app/ActionBarSettingsActionProviderActivity.java +++ b/app/src/main/java/io/appium/android/apis/app/ActionBarSettingsActionProviderActivity.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.app; +package io.appium.android.apis.app; import android.app.Activity; import android.content.Context; @@ -28,7 +28,7 @@ import android.widget.ImageButton; import android.widget.Toast; -import com.example.android.apis.R; +import io.appium.android.apis.R; /** * This activity demonstrates how to implement an {@link android.view.ActionProvider} diff --git a/src/com/example/android/apis/app/ActionBarShareActionProviderActivity.java b/app/src/main/java/io/appium/android/apis/app/ActionBarShareActionProviderActivity.java similarity index 98% rename from src/com/example/android/apis/app/ActionBarShareActionProviderActivity.java rename to app/src/main/java/io/appium/android/apis/app/ActionBarShareActionProviderActivity.java index 4f37b8d..3f69d34 100644 --- a/src/com/example/android/apis/app/ActionBarShareActionProviderActivity.java +++ b/app/src/main/java/io/appium/android/apis/app/ActionBarShareActionProviderActivity.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.app; +package io.appium.android.apis.app; import android.app.Activity; import android.content.Context; @@ -25,7 +25,7 @@ import android.view.MenuItem; import android.widget.ShareActionProvider; -import com.example.android.apis.R; +import io.appium.android.apis.R; import java.io.FileNotFoundException; import java.io.FileOutputStream; diff --git a/src/com/example/android/apis/app/ActionBarTabs.java b/app/src/main/java/io/appium/android/apis/app/ActionBarTabs.java similarity index 98% rename from src/com/example/android/apis/app/ActionBarTabs.java rename to app/src/main/java/io/appium/android/apis/app/ActionBarTabs.java index df6752c..152c6bd 100644 --- a/src/com/example/android/apis/app/ActionBarTabs.java +++ b/app/src/main/java/io/appium/android/apis/app/ActionBarTabs.java @@ -13,9 +13,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.example.android.apis.app; +package io.appium.android.apis.app; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.ActionBar; import android.app.ActionBar.Tab; diff --git a/src/com/example/android/apis/app/ActionBarUsage.java b/app/src/main/java/io/appium/android/apis/app/ActionBarUsage.java similarity index 97% rename from src/com/example/android/apis/app/ActionBarUsage.java rename to app/src/main/java/io/appium/android/apis/app/ActionBarUsage.java index d76cd0b..d70425d 100644 --- a/src/com/example/android/apis/app/ActionBarUsage.java +++ b/app/src/main/java/io/appium/android/apis/app/ActionBarUsage.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.example.android.apis.app; +package io.appium.android.apis.app; import android.app.Activity; import android.graphics.drawable.Drawable; @@ -26,7 +26,7 @@ import android.widget.TextView; import android.widget.Toast; -import com.example.android.apis.R; +import io.appium.android.apis.R; /** * This demonstrates idiomatic usage of the Action Bar. The default Honeycomb theme diff --git a/src/com/example/android/apis/app/ActivityRecreate.java b/app/src/main/java/io/appium/android/apis/app/ActivityRecreate.java similarity index 96% rename from src/com/example/android/apis/app/ActivityRecreate.java rename to app/src/main/java/io/appium/android/apis/app/ActivityRecreate.java index 195835c..4dadd3f 100644 --- a/src/com/example/android/apis/app/ActivityRecreate.java +++ b/app/src/main/java/io/appium/android/apis/app/ActivityRecreate.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.app; +package io.appium.android.apis.app; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.os.Bundle; diff --git a/src/com/example/android/apis/app/AlarmController.java b/app/src/main/java/io/appium/android/apis/app/AlarmController.java similarity index 94% rename from src/com/example/android/apis/app/AlarmController.java rename to app/src/main/java/io/appium/android/apis/app/AlarmController.java index 2ba5735..422b8df 100644 --- a/src/com/example/android/apis/app/AlarmController.java +++ b/app/src/main/java/io/appium/android/apis/app/AlarmController.java @@ -14,11 +14,11 @@ * limitations under the License. */ -package com.example.android.apis.app; +package io.appium.android.apis.app; // Need the following import to get access to the app resources, since this // class is in a sub-package. -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.app.AlarmManager; @@ -43,16 +43,16 @@

Source files

- + - + - + diff --git a/src/com/example/android/apis/app/AlarmService.java b/app/src/main/java/io/appium/android/apis/app/AlarmService.java similarity index 97% rename from src/com/example/android/apis/app/AlarmService.java rename to app/src/main/java/io/appium/android/apis/app/AlarmService.java index 151838a..758598b 100644 --- a/src/com/example/android/apis/app/AlarmService.java +++ b/app/src/main/java/io/appium/android/apis/app/AlarmService.java @@ -14,11 +14,11 @@ * limitations under the License. */ -package com.example.android.apis.app; +package io.appium.android.apis.app; // Need the following import to get access to the app resources, since this // class is in a sub-package. -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.app.AlarmManager; diff --git a/src/com/example/android/apis/app/AlarmService_Service.java b/app/src/main/java/io/appium/android/apis/app/AlarmService_Service.java similarity index 85% rename from src/com/example/android/apis/app/AlarmService_Service.java rename to app/src/main/java/io/appium/android/apis/app/AlarmService_Service.java index 6762ba9..856a023 100644 --- a/src/com/example/android/apis/app/AlarmService_Service.java +++ b/app/src/main/java/io/appium/android/apis/app/AlarmService_Service.java @@ -14,16 +14,18 @@ * limitations under the License. */ -package com.example.android.apis.app; +package io.appium.android.apis.app; // Need the following import to get access to the app resources, since this // class is in a sub-package. -import com.example.android.apis.R; +import androidx.core.app.NotificationCompat; +import io.appium.android.apis.R; import android.app.Notification; import android.app.NotificationManager; import android.app.PendingIntent; import android.app.Service; +import android.content.Context; import android.content.Intent; import android.os.Binder; import android.os.IBinder; @@ -98,19 +100,18 @@ public IBinder onBind(Intent intent) { private void showNotification() { // In this sample, we'll use the same text for the ticker and the expanded notification CharSequence text = getText(R.string.alarm_service_started); - - // Set the icon, scrolling text and timestamp - Notification notification = new Notification(R.drawable.stat_sample, text, - System.currentTimeMillis()); - // The PendingIntent to launch our activity if the user selects this notification PendingIntent contentIntent = PendingIntent.getActivity(this, 0, new Intent(this, AlarmService.class), 0); - // Set the info for the views that show in the notification panel. - notification.setLatestEventInfo(this, getText(R.string.alarm_service_label), - text, contentIntent); - + Notification notification = new Notification.Builder(this) + .setSmallIcon(R.drawable.stat_sample) // the status icon + .setTicker(text) // the status text + .setWhen(System.currentTimeMillis()) // the time stamp + .setContentTitle(getText(R.string.alarm_service_label)) // the label of the entry + .setContentText(text) // the contents of the entry + .setContentIntent(contentIntent) // The intent to send when the entry is clicked + .build(); // Send the notification. // We use a layout id because it is a unique number. We use it later to cancel. mNM.notify(R.string.alarm_service_started, notification); diff --git a/src/com/example/android/apis/app/AlertDialogSamples.java b/app/src/main/java/io/appium/android/apis/app/AlertDialogSamples.java similarity index 99% rename from src/com/example/android/apis/app/AlertDialogSamples.java rename to app/src/main/java/io/appium/android/apis/app/AlertDialogSamples.java index a22753a..f8d3ae2 100644 --- a/src/com/example/android/apis/app/AlertDialogSamples.java +++ b/app/src/main/java/io/appium/android/apis/app/AlertDialogSamples.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.app; +package io.appium.android.apis.app; import android.app.Activity; import android.app.AlertDialog; @@ -32,7 +32,7 @@ import android.database.Cursor; import android.provider.ContactsContract; -import com.example.android.apis.R; +import io.appium.android.apis.R; /** * Example of how to use an {@link android.app.AlertDialog}. @@ -46,7 +46,7 @@

Source files

*
src/com.example.android.apis/app/AlarmController.javasrc/io.appium.android.apis/app/AlarmController.java The activity that lets you schedule alarms
src/com.example.android.apis/app/OneShotAlarm.javasrc/io.appium.android.apis/app/OneShotAlarm.java This is an intent receiver that executes when the one-shot alarm goes off
src/com.example.android.apis/app/RepeatingAlarm.javasrc/io.appium.android.apis/app/RepeatingAlarm.java This is an intent receiver that executes when the repeating alarm goes off
* - * + * * * * diff --git a/src/com/example/android/apis/app/Animation.java b/app/src/main/java/io/appium/android/apis/app/Animation.java similarity index 98% rename from src/com/example/android/apis/app/Animation.java rename to app/src/main/java/io/appium/android/apis/app/Animation.java index a4a05e6..6a685c9 100644 --- a/src/com/example/android/apis/app/Animation.java +++ b/app/src/main/java/io/appium/android/apis/app/Animation.java @@ -14,11 +14,11 @@ * limitations under the License. */ -package com.example.android.apis.app; +package io.appium.android.apis.app; // Need the following import to get access to the app resources, since this // class is in a sub-package. -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.app.ActivityOptions; diff --git a/src/com/example/android/apis/app/AppUpdateReceiver.java b/app/src/main/java/io/appium/android/apis/app/AppUpdateReceiver.java similarity index 93% rename from src/com/example/android/apis/app/AppUpdateReceiver.java rename to app/src/main/java/io/appium/android/apis/app/AppUpdateReceiver.java index ac0dcf0..c8b81db 100644 --- a/src/com/example/android/apis/app/AppUpdateReceiver.java +++ b/app/src/main/java/io/appium/android/apis/app/AppUpdateReceiver.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.app; +package io.appium.android.apis.app; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.content.BroadcastReceiver; import android.content.Context; diff --git a/src/com/example/android/apis/app/ContactsFilter.java b/app/src/main/java/io/appium/android/apis/app/ContactsFilter.java similarity index 95% rename from src/com/example/android/apis/app/ContactsFilter.java rename to app/src/main/java/io/appium/android/apis/app/ContactsFilter.java index d5b3deb..3f5f250 100644 --- a/src/com/example/android/apis/app/ContactsFilter.java +++ b/app/src/main/java/io/appium/android/apis/app/ContactsFilter.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.app; +package io.appium.android.apis.app; // Need the following import to get access to the app resources, since this // class is in a sub-package. @@ -25,7 +25,7 @@ import android.view.View.OnClickListener; import android.widget.Button; -import com.example.android.apis.R; +import io.appium.android.apis.R; /** * Front-end for launching {@link ContactsFilterInstrumentation} example diff --git a/src/com/example/android/apis/app/ContactsFilterInstrumentation.java b/app/src/main/java/io/appium/android/apis/app/ContactsFilterInstrumentation.java similarity index 98% rename from src/com/example/android/apis/app/ContactsFilterInstrumentation.java rename to app/src/main/java/io/appium/android/apis/app/ContactsFilterInstrumentation.java index 6895363..89bb0c4 100644 --- a/src/com/example/android/apis/app/ContactsFilterInstrumentation.java +++ b/app/src/main/java/io/appium/android/apis/app/ContactsFilterInstrumentation.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.app; +package io.appium.android.apis.app; import android.app.Activity; import android.app.Instrumentation; diff --git a/src/com/example/android/apis/app/ContactsSelectInstrumentation.java b/app/src/main/java/io/appium/android/apis/app/ContactsSelectInstrumentation.java similarity index 98% rename from src/com/example/android/apis/app/ContactsSelectInstrumentation.java rename to app/src/main/java/io/appium/android/apis/app/ContactsSelectInstrumentation.java index e34f4cf..15ab635 100644 --- a/src/com/example/android/apis/app/ContactsSelectInstrumentation.java +++ b/app/src/main/java/io/appium/android/apis/app/ContactsSelectInstrumentation.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.app; +package io.appium.android.apis.app; import android.app.Activity; import android.app.Instrumentation; diff --git a/src/com/example/android/apis/app/CustomDialogActivity.java b/app/src/main/java/io/appium/android/apis/app/CustomDialogActivity.java similarity index 95% rename from src/com/example/android/apis/app/CustomDialogActivity.java rename to app/src/main/java/io/appium/android/apis/app/CustomDialogActivity.java index 62f0ae1..df23271 100644 --- a/src/com/example/android/apis/app/CustomDialogActivity.java +++ b/app/src/main/java/io/appium/android/apis/app/CustomDialogActivity.java @@ -14,11 +14,11 @@ * limitations under the License. */ -package com.example.android.apis.app; +package io.appium.android.apis.app; // Need the following import to get access to the app resources, since this // class is in a sub-package. -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.os.Bundle; diff --git a/src/com/example/android/apis/app/CustomTitle.java b/app/src/main/java/io/appium/android/apis/app/CustomTitle.java similarity index 95% rename from src/com/example/android/apis/app/CustomTitle.java rename to app/src/main/java/io/appium/android/apis/app/CustomTitle.java index e22a5cc..30b1361 100644 --- a/src/com/example/android/apis/app/CustomTitle.java +++ b/app/src/main/java/io/appium/android/apis/app/CustomTitle.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.app; +package io.appium.android.apis.app; import android.app.Activity; import android.os.Bundle; @@ -25,7 +25,7 @@ import android.widget.EditText; import android.widget.TextView; -import com.example.android.apis.R; +import io.appium.android.apis.R; /** @@ -40,7 +40,7 @@

Source files

*
src/com.example.android.apis/app/AlertDialogSamples.javasrc/io.appium.android.apis/app/AlertDialogSamples.javaThe Alert Dialog Samples implementation
* - * + * * * * diff --git a/src/com/example/android/apis/app/DeviceAdminSample.java b/app/src/main/java/io/appium/android/apis/app/DeviceAdminSample.java similarity index 99% rename from src/com/example/android/apis/app/DeviceAdminSample.java rename to app/src/main/java/io/appium/android/apis/app/DeviceAdminSample.java index db50185..20cfdb6 100644 --- a/src/com/example/android/apis/app/DeviceAdminSample.java +++ b/app/src/main/java/io/appium/android/apis/app/DeviceAdminSample.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.app; +package io.appium.android.apis.app; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.ActivityManager; import android.app.AlertDialog; diff --git a/src/com/example/android/apis/app/DialogActivity.java b/app/src/main/java/io/appium/android/apis/app/DialogActivity.java similarity index 97% rename from src/com/example/android/apis/app/DialogActivity.java rename to app/src/main/java/io/appium/android/apis/app/DialogActivity.java index d9deb47..833d184 100644 --- a/src/com/example/android/apis/app/DialogActivity.java +++ b/app/src/main/java/io/appium/android/apis/app/DialogActivity.java @@ -14,11 +14,11 @@ * limitations under the License. */ -package com.example.android.apis.app; +package io.appium.android.apis.app; // Need the following import to get access to the app resources, since this // class is in a sub-package. -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.os.Bundle; diff --git a/src/com/example/android/apis/app/FinishAffinity.java b/app/src/main/java/io/appium/android/apis/app/FinishAffinity.java similarity index 96% rename from src/com/example/android/apis/app/FinishAffinity.java rename to app/src/main/java/io/appium/android/apis/app/FinishAffinity.java index 7ae62b6..18bbe3e 100644 --- a/src/com/example/android/apis/app/FinishAffinity.java +++ b/app/src/main/java/io/appium/android/apis/app/FinishAffinity.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.app; +package io.appium.android.apis.app; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.content.ComponentName; diff --git a/src/com/example/android/apis/app/ForegroundService.java b/app/src/main/java/io/appium/android/apis/app/ForegroundService.java similarity index 76% rename from src/com/example/android/apis/app/ForegroundService.java rename to app/src/main/java/io/appium/android/apis/app/ForegroundService.java index a43785f..ae4c814 100644 --- a/src/com/example/android/apis/app/ForegroundService.java +++ b/app/src/main/java/io/appium/android/apis/app/ForegroundService.java @@ -14,16 +14,20 @@ * limitations under the License. */ -package com.example.android.apis.app; +package io.appium.android.apis.app; +import android.annotation.SuppressLint; import android.app.Activity; import android.app.Notification; import android.app.NotificationManager; import android.app.PendingIntent; import android.app.Service; import android.content.Intent; +import android.os.Build; import android.os.Bundle; +import android.os.Handler; import android.os.IBinder; +import android.os.PowerManager; import android.util.Log; import android.view.View; import android.view.View.OnClickListener; @@ -34,7 +38,7 @@ // Need the following import to get access to the app resources, since this // class is in a sub-package. -import com.example.android.apis.R; +import io.appium.android.apis.R; /** * This is an example of implementing an application service that can @@ -45,9 +49,19 @@ * Android 1.0. */ public class ForegroundService extends Service { - static final String ACTION_FOREGROUND = "com.example.android.apis.FOREGROUND"; - static final String ACTION_BACKGROUND = "com.example.android.apis.BACKGROUND"; - + static final String ACTION_FOREGROUND = "io.appium.android.apis.FOREGROUND"; + static final String ACTION_FOREGROUND_WAKELOCK = "io.appium.android.apis.FOREGROUND_WAKELOCK"; + static final String ACTION_BACKGROUND = "io.appium.android.apis.BACKGROUND"; + static final String ACTION_BACKGROUND_WAKELOCK = "io.appium.android.apis.BACKGROUND_WAKELOCK"; + + private PowerManager.WakeLock mWakeLock; + private Handler mHandler = new Handler(); + private Runnable mPulser = new Runnable() { + @Override public void run() { + Log.i("ForegroundService", "PULSE!"); + mHandler.postDelayed(this, 5*1000); + } + }; private static final Class[] mSetForegroundSignature = new Class[] { boolean.class}; @@ -55,7 +69,7 @@ public class ForegroundService extends Service { int.class, Notification.class}; private static final Class[] mStopForegroundSignature = new Class[] { boolean.class}; - + private NotificationManager mNM; private Method mSetForeground; private Method mStartForeground; @@ -63,7 +77,7 @@ public class ForegroundService extends Service { private Object[] mSetForegroundArgs = new Object[1]; private Object[] mStartForegroundArgs = new Object[2]; private Object[] mStopForegroundArgs = new Object[1]; - + void invokeMethod(Method method, Object[] args) { try { method.invoke(this, args); @@ -75,7 +89,7 @@ void invokeMethod(Method method, Object[] args) { Log.w("ApiDemos", "Unable to invoke method", e); } } - + /** * This is a wrapper around the new startForeground method, using the older * APIs if it is not available. @@ -88,13 +102,13 @@ void startForegroundCompat(int id, Notification notification) { invokeMethod(mStartForeground, mStartForegroundArgs); return; } - + // Fall back on the old API. mSetForegroundArgs[0] = Boolean.TRUE; invokeMethod(mSetForeground, mSetForegroundArgs); mNM.notify(id, notification); } - + /** * This is a wrapper around the new stopForeground method, using the older * APIs if it is not available. @@ -106,14 +120,14 @@ void stopForegroundCompat(int id) { invokeMethod(mStopForeground, mStopForegroundArgs); return; } - + // Fall back on the old API. Note to cancel BEFORE changing the // foreground state, since we could be killed at that point. mNM.cancel(id); mSetForegroundArgs[0] = Boolean.FALSE; invokeMethod(mSetForeground, mSetForegroundArgs); } - + @Override public void onCreate() { mNM = (NotificationManager)getSystemService(NOTIFICATION_SERVICE); @@ -144,57 +158,65 @@ public void onDestroy() { - // This is the old onStart method that will be called on the pre-2.0 - // platform. On 2.0 or later we override onStartCommand() so this - // method will not be called. - @Override - public void onStart(Intent intent, int startId) { - handleCommand(intent); - } - + @SuppressLint("InvalidWakeLockTag") @Override public int onStartCommand(Intent intent, int flags, int startId) { - handleCommand(intent); - // We want this service to continue running until it is explicitly - // stopped, so return sticky. - return START_STICKY; - } - - - void handleCommand(Intent intent) { - if (ACTION_FOREGROUND.equals(intent.getAction())) { + if (ACTION_FOREGROUND.equals(intent.getAction()) + || ACTION_FOREGROUND_WAKELOCK.equals(intent.getAction())) { // In this sample, we'll use the same text for the ticker and the expanded notification CharSequence text = getText(R.string.foreground_service_started); - - // Set the icon, scrolling text and timestamp - Notification notification = new Notification(R.drawable.stat_sample, text, - System.currentTimeMillis()); - - // The PendingIntent to launch our activity if the user selects this notification PendingIntent contentIntent = PendingIntent.getActivity(this, 0, new Intent(this, Controller.class), 0); - // Set the info for the views that show in the notification panel. - notification.setLatestEventInfo(this, getText(R.string.local_service_label), - text, contentIntent); - + Notification notification = new Notification.Builder(this) + .setSmallIcon(R.drawable.stat_sample) // the status icon + .setTicker(text) // the status text + .setWhen(System.currentTimeMillis()) // the time stamp + .setContentTitle(getText(R.string.alarm_service_label)) // the label + .setContentText(text) // the contents of the entry + .setContentIntent(contentIntent) // The intent to send when clicked + .build(); startForegroundCompat(R.string.foreground_service_started, notification); - - } else if (ACTION_BACKGROUND.equals(intent.getAction())) { + } else if (ACTION_BACKGROUND.equals(intent.getAction()) + || ACTION_BACKGROUND_WAKELOCK.equals(intent.getAction())) { stopForegroundCompat(R.string.foreground_service_started); } + if (ACTION_FOREGROUND_WAKELOCK.equals(intent.getAction()) + || ACTION_BACKGROUND_WAKELOCK.equals(intent.getAction())) { + if (mWakeLock == null) { + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { + mWakeLock = getSystemService(PowerManager.class).newWakeLock( + PowerManager.PARTIAL_WAKE_LOCK, "wake-service"); + mWakeLock.acquire(); + } + } else { + releaseWakeLock(); + } + } + mHandler.removeCallbacks(mPulser); + mPulser.run(); + // We want this service to continue running until it is explicitly + // stopped, so return sticky. + return START_STICKY; } - + + void releaseWakeLock() { + if (mWakeLock != null) { + mWakeLock.release(); + mWakeLock = null; + } + } + @Override public IBinder onBind(Intent intent) { return null; } - + // ---------------------------------------------------------------------- /** *

Example of explicitly starting and stopping the {@link ForegroundService}. - * + * *

Note that this is implemented as an inner class only keep the sample * all together; typically this code would appear in some separate class. */ diff --git a/src/com/example/android/apis/app/ForwardTarget.java b/app/src/main/java/io/appium/android/apis/app/ForwardTarget.java similarity index 93% rename from src/com/example/android/apis/app/ForwardTarget.java rename to app/src/main/java/io/appium/android/apis/app/ForwardTarget.java index ee699aa..2bcb145 100644 --- a/src/com/example/android/apis/app/ForwardTarget.java +++ b/app/src/main/java/io/appium/android/apis/app/ForwardTarget.java @@ -14,11 +14,11 @@ * limitations under the License. */ -package com.example.android.apis.app; +package io.appium.android.apis.app; // Need the following import to get access to the app resources, since this // class is in a sub-package. -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.os.Bundle; diff --git a/src/com/example/android/apis/app/Forwarding.java b/app/src/main/java/io/appium/android/apis/app/Forwarding.java similarity index 94% rename from src/com/example/android/apis/app/Forwarding.java rename to app/src/main/java/io/appium/android/apis/app/Forwarding.java index ef082bf..a5558d6 100644 --- a/src/com/example/android/apis/app/Forwarding.java +++ b/app/src/main/java/io/appium/android/apis/app/Forwarding.java @@ -14,11 +14,11 @@ * limitations under the License. */ -package com.example.android.apis.app; +package io.appium.android.apis.app; // Need the following import to get access to the app resources, since this // class is in a sub-package. -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.content.Intent; @@ -45,7 +45,7 @@

Source files

src/com.example.android.apis/app/CustomTitle.javasrc/io.appium.android.apis/app/CustomTitle.javaThe Custom Title implementation
- + diff --git a/src/com/example/android/apis/app/FragmentAlertDialog.java b/app/src/main/java/io/appium/android/apis/app/FragmentAlertDialog.java similarity index 98% rename from src/com/example/android/apis/app/FragmentAlertDialog.java rename to app/src/main/java/io/appium/android/apis/app/FragmentAlertDialog.java index c9e6c4e..6b98467 100644 --- a/src/com/example/android/apis/app/FragmentAlertDialog.java +++ b/app/src/main/java/io/appium/android/apis/app/FragmentAlertDialog.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.app; +package io.appium.android.apis.app; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.app.AlertDialog; diff --git a/src/com/example/android/apis/app/FragmentArguments.java b/app/src/main/java/io/appium/android/apis/app/FragmentArguments.java similarity index 98% rename from src/com/example/android/apis/app/FragmentArguments.java rename to app/src/main/java/io/appium/android/apis/app/FragmentArguments.java index 14ea31f..c4974d3 100644 --- a/src/com/example/android/apis/app/FragmentArguments.java +++ b/app/src/main/java/io/appium/android/apis/app/FragmentArguments.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.app; +package io.appium.android.apis.app; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.app.Fragment; diff --git a/src/com/example/android/apis/app/FragmentArgumentsFragment.java b/app/src/main/java/io/appium/android/apis/app/FragmentArgumentsFragment.java similarity index 96% rename from src/com/example/android/apis/app/FragmentArgumentsFragment.java rename to app/src/main/java/io/appium/android/apis/app/FragmentArgumentsFragment.java index 489a045..16d5bbb 100644 --- a/src/com/example/android/apis/app/FragmentArgumentsFragment.java +++ b/app/src/main/java/io/appium/android/apis/app/FragmentArgumentsFragment.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.app; +package io.appium.android.apis.app; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Fragment; import android.app.FragmentTransaction; diff --git a/src/com/example/android/apis/app/FragmentContextMenu.java b/app/src/main/java/io/appium/android/apis/app/FragmentContextMenu.java similarity index 97% rename from src/com/example/android/apis/app/FragmentContextMenu.java rename to app/src/main/java/io/appium/android/apis/app/FragmentContextMenu.java index 420e67f..d408229 100644 --- a/src/com/example/android/apis/app/FragmentContextMenu.java +++ b/app/src/main/java/io/appium/android/apis/app/FragmentContextMenu.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.app; +package io.appium.android.apis.app; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.app.Fragment; diff --git a/src/com/example/android/apis/app/FragmentCustomAnimations.java b/app/src/main/java/io/appium/android/apis/app/FragmentCustomAnimations.java similarity index 98% rename from src/com/example/android/apis/app/FragmentCustomAnimations.java rename to app/src/main/java/io/appium/android/apis/app/FragmentCustomAnimations.java index 55dab7d..8a0e42c 100644 --- a/src/com/example/android/apis/app/FragmentCustomAnimations.java +++ b/app/src/main/java/io/appium/android/apis/app/FragmentCustomAnimations.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.app; +package io.appium.android.apis.app; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.app.Fragment; diff --git a/src/com/example/android/apis/app/FragmentDialog.java b/app/src/main/java/io/appium/android/apis/app/FragmentDialog.java similarity index 98% rename from src/com/example/android/apis/app/FragmentDialog.java rename to app/src/main/java/io/appium/android/apis/app/FragmentDialog.java index 0473d9c..de46129 100644 --- a/src/com/example/android/apis/app/FragmentDialog.java +++ b/app/src/main/java/io/appium/android/apis/app/FragmentDialog.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.app; +package io.appium.android.apis.app; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.app.DialogFragment; diff --git a/src/com/example/android/apis/app/FragmentDialogOrActivity.java b/app/src/main/java/io/appium/android/apis/app/FragmentDialogOrActivity.java similarity index 97% rename from src/com/example/android/apis/app/FragmentDialogOrActivity.java rename to app/src/main/java/io/appium/android/apis/app/FragmentDialogOrActivity.java index c2b17e8..f9df1b6 100644 --- a/src/com/example/android/apis/app/FragmentDialogOrActivity.java +++ b/app/src/main/java/io/appium/android/apis/app/FragmentDialogOrActivity.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.app; +package io.appium.android.apis.app; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.app.DialogFragment; diff --git a/src/com/example/android/apis/app/FragmentHideShow.java b/app/src/main/java/io/appium/android/apis/app/FragmentHideShow.java similarity index 98% rename from src/com/example/android/apis/app/FragmentHideShow.java rename to app/src/main/java/io/appium/android/apis/app/FragmentHideShow.java index e5e2599..b463852 100644 --- a/src/com/example/android/apis/app/FragmentHideShow.java +++ b/app/src/main/java/io/appium/android/apis/app/FragmentHideShow.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.app; +package io.appium.android.apis.app; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.app.Fragment; diff --git a/src/com/example/android/apis/app/FragmentLayout.java b/app/src/main/java/io/appium/android/apis/app/FragmentLayout.java similarity index 98% rename from src/com/example/android/apis/app/FragmentLayout.java rename to app/src/main/java/io/appium/android/apis/app/FragmentLayout.java index 6436794..041c559 100644 --- a/src/com/example/android/apis/app/FragmentLayout.java +++ b/app/src/main/java/io/appium/android/apis/app/FragmentLayout.java @@ -14,10 +14,10 @@ * limitations under the License. */ -package com.example.android.apis.app; +package io.appium.android.apis.app; -import com.example.android.apis.R; -import com.example.android.apis.Shakespeare; +import io.appium.android.apis.R; +import io.appium.android.apis.Shakespeare; import android.app.Activity; import android.app.Fragment; diff --git a/src/com/example/android/apis/app/FragmentListArray.java b/app/src/main/java/io/appium/android/apis/app/FragmentListArray.java similarity index 95% rename from src/com/example/android/apis/app/FragmentListArray.java rename to app/src/main/java/io/appium/android/apis/app/FragmentListArray.java index cdf6ddc..8516577 100644 --- a/src/com/example/android/apis/app/FragmentListArray.java +++ b/app/src/main/java/io/appium/android/apis/app/FragmentListArray.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.app; +package io.appium.android.apis.app; -import com.example.android.apis.Shakespeare; +import io.appium.android.apis.Shakespeare; import android.app.Activity; import android.app.ListFragment; diff --git a/src/com/example/android/apis/app/FragmentMenu.java b/app/src/main/java/io/appium/android/apis/app/FragmentMenu.java similarity index 98% rename from src/com/example/android/apis/app/FragmentMenu.java rename to app/src/main/java/io/appium/android/apis/app/FragmentMenu.java index 8f588d1..0012be9 100644 --- a/src/com/example/android/apis/app/FragmentMenu.java +++ b/app/src/main/java/io/appium/android/apis/app/FragmentMenu.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.app; +package io.appium.android.apis.app; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.app.Fragment; diff --git a/src/com/example/android/apis/app/FragmentMenuFragment.java b/app/src/main/java/io/appium/android/apis/app/FragmentMenuFragment.java similarity index 97% rename from src/com/example/android/apis/app/FragmentMenuFragment.java rename to app/src/main/java/io/appium/android/apis/app/FragmentMenuFragment.java index 6ac7003..6d48b3f 100644 --- a/src/com/example/android/apis/app/FragmentMenuFragment.java +++ b/app/src/main/java/io/appium/android/apis/app/FragmentMenuFragment.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.app; +package io.appium.android.apis.app; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Fragment; import android.app.FragmentManager; diff --git a/src/com/example/android/apis/app/FragmentNestingTabs.java b/app/src/main/java/io/appium/android/apis/app/FragmentNestingTabs.java similarity index 99% rename from src/com/example/android/apis/app/FragmentNestingTabs.java rename to app/src/main/java/io/appium/android/apis/app/FragmentNestingTabs.java index 244b3e6..9aeb438 100644 --- a/src/com/example/android/apis/app/FragmentNestingTabs.java +++ b/app/src/main/java/io/appium/android/apis/app/FragmentNestingTabs.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.example.android.apis.app; +package io.appium.android.apis.app; import android.app.ActionBar; diff --git a/src/com/example/android/apis/app/FragmentReceiveResult.java b/app/src/main/java/io/appium/android/apis/app/FragmentReceiveResult.java similarity index 98% rename from src/com/example/android/apis/app/FragmentReceiveResult.java rename to app/src/main/java/io/appium/android/apis/app/FragmentReceiveResult.java index f207cf9..8634976 100644 --- a/src/com/example/android/apis/app/FragmentReceiveResult.java +++ b/app/src/main/java/io/appium/android/apis/app/FragmentReceiveResult.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.app; +package io.appium.android.apis.app; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.app.Fragment; diff --git a/src/com/example/android/apis/app/FragmentRetainInstance.java b/app/src/main/java/io/appium/android/apis/app/FragmentRetainInstance.java similarity index 99% rename from src/com/example/android/apis/app/FragmentRetainInstance.java rename to app/src/main/java/io/appium/android/apis/app/FragmentRetainInstance.java index e2ddae2..472799d 100644 --- a/src/com/example/android/apis/app/FragmentRetainInstance.java +++ b/app/src/main/java/io/appium/android/apis/app/FragmentRetainInstance.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.app; +package io.appium.android.apis.app; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.app.Fragment; diff --git a/src/com/example/android/apis/app/FragmentStack.java b/app/src/main/java/io/appium/android/apis/app/FragmentStack.java similarity index 98% rename from src/com/example/android/apis/app/FragmentStack.java rename to app/src/main/java/io/appium/android/apis/app/FragmentStack.java index 9d4d792..3c7c41d 100644 --- a/src/com/example/android/apis/app/FragmentStack.java +++ b/app/src/main/java/io/appium/android/apis/app/FragmentStack.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.app; +package io.appium.android.apis.app; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.app.Fragment; diff --git a/src/com/example/android/apis/app/FragmentStackFragment.java b/app/src/main/java/io/appium/android/apis/app/FragmentStackFragment.java similarity index 97% rename from src/com/example/android/apis/app/FragmentStackFragment.java rename to app/src/main/java/io/appium/android/apis/app/FragmentStackFragment.java index d33af64..2b3dcbc 100644 --- a/src/com/example/android/apis/app/FragmentStackFragment.java +++ b/app/src/main/java/io/appium/android/apis/app/FragmentStackFragment.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.app; +package io.appium.android.apis.app; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Fragment; import android.app.FragmentTransaction; diff --git a/src/com/example/android/apis/app/FragmentTabs.java b/app/src/main/java/io/appium/android/apis/app/FragmentTabs.java similarity index 98% rename from src/com/example/android/apis/app/FragmentTabs.java rename to app/src/main/java/io/appium/android/apis/app/FragmentTabs.java index 53f06a5..d70764d 100644 --- a/src/com/example/android/apis/app/FragmentTabs.java +++ b/app/src/main/java/io/appium/android/apis/app/FragmentTabs.java @@ -13,9 +13,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.example.android.apis.app; +package io.appium.android.apis.app; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.ActionBar; diff --git a/src/com/example/android/apis/app/FragmentTabsFragment.java b/app/src/main/java/io/appium/android/apis/app/FragmentTabsFragment.java similarity index 99% rename from src/com/example/android/apis/app/FragmentTabsFragment.java rename to app/src/main/java/io/appium/android/apis/app/FragmentTabsFragment.java index e61cbd2..120383b 100644 --- a/src/com/example/android/apis/app/FragmentTabsFragment.java +++ b/app/src/main/java/io/appium/android/apis/app/FragmentTabsFragment.java @@ -13,11 +13,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.example.android.apis.app; +package io.appium.android.apis.app; import java.util.ArrayList; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Fragment; import android.app.FragmentManager; diff --git a/src/com/example/android/apis/app/HelloWorld.java b/app/src/main/java/io/appium/android/apis/app/HelloWorld.java similarity index 92% rename from src/com/example/android/apis/app/HelloWorld.java rename to app/src/main/java/io/appium/android/apis/app/HelloWorld.java index 1a7f698..03e7781 100644 --- a/src/com/example/android/apis/app/HelloWorld.java +++ b/app/src/main/java/io/appium/android/apis/app/HelloWorld.java @@ -14,11 +14,11 @@ * limitations under the License. */ -package com.example.android.apis.app; +package io.appium.android.apis.app; // Need the following import to get access to the app resources, since this // class is in a sub-package. -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.os.Bundle; @@ -36,7 +36,7 @@

Source files

*
src/com.example.android.apis/app/Forwarding.javasrc/io.appium.android.apis/app/Forwarding.java Forwards the user to another activity when its button is pressed
* - * + * * * * diff --git a/src/com/example/android/apis/app/IncomingMessage.java b/app/src/main/java/io/appium/android/apis/app/IncomingMessage.java similarity index 69% rename from src/com/example/android/apis/app/IncomingMessage.java rename to app/src/main/java/io/appium/android/apis/app/IncomingMessage.java index 1d39d43..0e02531 100644 --- a/src/com/example/android/apis/app/IncomingMessage.java +++ b/app/src/main/java/io/appium/android/apis/app/IncomingMessage.java @@ -14,19 +14,23 @@ * limitations under the License. */ -package com.example.android.apis.app; +package io.appium.android.apis.app; import java.util.Random; -import com.example.android.apis.R; +import androidx.annotation.RequiresApi; +import io.appium.android.apis.R; +import android.annotation.SuppressLint; import android.app.Activity; import android.app.Notification; +import android.app.NotificationChannel; import android.app.NotificationManager; import android.app.PendingIntent; import android.content.ComponentName; import android.content.Context; import android.content.Intent; +import android.os.Build; import android.os.Bundle; import android.view.View; import android.widget.Button; @@ -54,6 +58,8 @@ public void onClick(View v) { showInterstitialNotification(); } }); + + createChannel(); } @@ -75,14 +81,14 @@ static Intent[] makeMessageIntentStack(Context context, CharSequence from, // This is a convenient way to make the proper Intent to launch and // reset an application's task. intents[0] = Intent.makeRestartActivityTask(new ComponentName(context, - com.example.android.apis.ApiDemos.class)); + io.appium.android.apis.ApiDemos.class)); // "App" - intents[1] = new Intent(context, com.example.android.apis.ApiDemos.class); - intents[1].putExtra("com.example.android.apis.Path", "App"); + intents[1] = new Intent(context, io.appium.android.apis.ApiDemos.class); + intents[1].putExtra("io.appium.android.apis.Path", "App"); // "App/Notification" - intents[2] = new Intent(context, com.example.android.apis.ApiDemos.class); - intents[2].putExtra("com.example.android.apis.Path", "App/Notification"); + intents[2] = new Intent(context, io.appium.android.apis.ApiDemos.class); + intents[2].putExtra("io.appium.android.apis.Path", "App/Notification"); // Now the activity to display to the user. Also fill in the data it // should display. @@ -94,6 +100,23 @@ static Intent[] makeMessageIntentStack(Context context, CharSequence from, } + private static final String CHANNEL_ID = "main_channel"; + private static final String CHANNEL_NAME = "Sample App"; + private static final String CHANNEL_DESCRIPTION = "Incoming Message"; + + @RequiresApi(Build.VERSION_CODES.O) + private void createChannel() { + NotificationManager mNotificationManager = (NotificationManager) this.getSystemService(NOTIFICATION_SERVICE); + if (mNotificationManager == null) { + return; + } + NotificationChannel mChannel = new NotificationChannel(CHANNEL_ID, CHANNEL_NAME, NotificationManager.IMPORTANCE_DEFAULT); + mChannel.setDescription(CHANNEL_DESCRIPTION); + mChannel.setShowBadge(true); + mChannel.setLockscreenVisibility(Notification.VISIBILITY_PUBLIC); + mNotificationManager.createNotificationChannel(mChannel); + } + /** * The notification is the icon and associated expanded entry in the * status bar. @@ -101,7 +124,6 @@ static Intent[] makeMessageIntentStack(Context context, CharSequence from, void showAppNotification() { // look up the notification manager service NotificationManager nm = (NotificationManager)getSystemService(NOTIFICATION_SERVICE); - // The details of our fake message CharSequence from = "Joe"; CharSequence message; @@ -110,39 +132,42 @@ void showAppNotification() { case 1: message = "im nearby u"; break; default: message = "kthx. meet u for dinner. cul8r"; break; } - // The PendingIntent to launch our activity if the user selects this // notification. Note the use of FLAG_CANCEL_CURRENT so that, if there // is already an active matching pending intent, cancel it and replace // it with the new array of Intents. PendingIntent contentIntent = PendingIntent.getActivities(this, 0, makeMessageIntentStack(this, from, message), PendingIntent.FLAG_CANCEL_CURRENT); - // The ticker text, this uses a formatted string so our message could be localized String tickerText = getString(R.string.imcoming_message_ticker_text, message); - - // construct the Notification object. - Notification notif = new Notification(R.drawable.stat_sample, tickerText, - System.currentTimeMillis()); - // Set the info for the views that show in the notification panel. - notif.setLatestEventInfo(this, from, message, contentIntent); + Notification.Builder notifBuilder; + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { + notifBuilder = new Notification.Builder(this, CHANNEL_ID); + } else { + notifBuilder = new Notification.Builder(this); + } + + notifBuilder.setSmallIcon(R.drawable.stat_sample) // the status icon + .setTicker(tickerText) // the status text + .setWhen(System.currentTimeMillis()) // the time stamp + .setContentTitle(from) // the label of the entry + .setContentText(message) // the contents of the entry + .setContentIntent(contentIntent); // The intent to send when the entry is clicked // We'll have this notification do the default sound, vibration, and led. // Note that if you want any of these behaviors, you should always have // a preference for the user to turn them off. - notif.defaults = Notification.DEFAULT_ALL; - + notifBuilder.setDefaults(Notification.DEFAULT_ALL); // Note that we use R.layout.incoming_message_panel as the ID for // the notification. It could be any integer you want, but we use // the convention of using a resource id for a string related to // the notification. It will always be a unique number within your // application. - nm.notify(R.string.imcoming_message_ticker_text, notif); + nm.notify(R.string.imcoming_message_ticker_text, notifBuilder.build()); } - /** * The notification is the icon and associated expanded entry in the * status bar. @@ -150,7 +175,6 @@ void showAppNotification() { void showInterstitialNotification() { // look up the notification manager service NotificationManager nm = (NotificationManager)getSystemService(NOTIFICATION_SERVICE); - // The details of our fake message CharSequence from = "Dianne"; CharSequence message; @@ -159,7 +183,6 @@ void showInterstitialNotification() { case 1: message = "how about thai down the block?"; break; default: message = "meet u soon. dont b late!"; break; } - // The PendingIntent to launch our activity if the user selects this // notification. Note the use of FLAG_CANCEL_CURRENT so that, if there // is already an active matching pending intent, cancel it and replace @@ -174,24 +197,30 @@ void showInterstitialNotification() { // The ticker text, this uses a formatted string so our message could be localized String tickerText = getString(R.string.imcoming_message_ticker_text, message); - // construct the Notification object. - Notification notif = new Notification(R.drawable.stat_sample, tickerText, - System.currentTimeMillis()); + Notification.Builder notifBuilder; + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { + notifBuilder = new Notification.Builder(this, CHANNEL_ID); + } else { + notifBuilder = new Notification.Builder(this); + } // Set the info for the views that show in the notification panel. - notif.setLatestEventInfo(this, from, message, contentIntent); - + notifBuilder + .setSmallIcon(R.drawable.stat_sample) // the status icon + .setTicker(tickerText) // the status text + .setWhen(System.currentTimeMillis()) // the time stamp + .setContentTitle(from) // the label of the entry + .setContentText(message) // the contents of the entry + .setContentIntent(contentIntent); // The intent to send when the entry is clicked // We'll have this notification do the default sound, vibration, and led. // Note that if you want any of these behaviors, you should always have // a preference for the user to turn them off. - notif.defaults = Notification.DEFAULT_ALL; - + notifBuilder.setDefaults(Notification.DEFAULT_ALL); // Note that we use R.layout.incoming_message_panel as the ID for // the notification. It could be any integer you want, but we use // the convention of using a resource id for a string related to // the notification. It will always be a unique number within your // application. - nm.notify(R.string.imcoming_message_ticker_text, notif); + nm.notify(R.string.imcoming_message_ticker_text, notifBuilder.build()); } - } diff --git a/src/com/example/android/apis/app/IncomingMessageInterstitial.java b/app/src/main/java/io/appium/android/apis/app/IncomingMessageInterstitial.java similarity index 96% rename from src/com/example/android/apis/app/IncomingMessageInterstitial.java rename to app/src/main/java/io/appium/android/apis/app/IncomingMessageInterstitial.java index 659598b..3f0a92f 100644 --- a/src/com/example/android/apis/app/IncomingMessageInterstitial.java +++ b/app/src/main/java/io/appium/android/apis/app/IncomingMessageInterstitial.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.app; +package io.appium.android.apis.app; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.app.NotificationManager; diff --git a/src/com/example/android/apis/app/IncomingMessageView.java b/app/src/main/java/io/appium/android/apis/app/IncomingMessageView.java similarity index 96% rename from src/com/example/android/apis/app/IncomingMessageView.java rename to app/src/main/java/io/appium/android/apis/app/IncomingMessageView.java index 144184d..23081a0 100644 --- a/src/com/example/android/apis/app/IncomingMessageView.java +++ b/app/src/main/java/io/appium/android/apis/app/IncomingMessageView.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.app; +package io.appium.android.apis.app; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.app.NotificationManager; diff --git a/src/com/example/android/apis/app/IntentActivityFlags.java b/app/src/main/java/io/appium/android/apis/app/IntentActivityFlags.java similarity index 85% rename from src/com/example/android/apis/app/IntentActivityFlags.java rename to app/src/main/java/io/appium/android/apis/app/IntentActivityFlags.java index 9d790d7..39d0047 100644 --- a/src/com/example/android/apis/app/IntentActivityFlags.java +++ b/app/src/main/java/io/appium/android/apis/app/IntentActivityFlags.java @@ -1,6 +1,6 @@ -package com.example.android.apis.app; +package io.appium.android.apis.app; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.app.PendingIntent; @@ -47,16 +47,16 @@ private Intent[] buildIntentsToViewsLists() { // This is a convenient way to make the proper Intent to launch and // reset an application's task. intents[0] = Intent.makeRestartActivityTask(new ComponentName(this, - com.example.android.apis.ApiDemos.class)); + io.appium.android.apis.ApiDemos.class)); Intent intent = new Intent(Intent.ACTION_MAIN); - intent.setClass(IntentActivityFlags.this, com.example.android.apis.ApiDemos.class); - intent.putExtra("com.example.android.apis.Path", "Views"); + intent.setClass(IntentActivityFlags.this, io.appium.android.apis.ApiDemos.class); + intent.putExtra("io.appium.android.apis.Path", "Views"); intents[1] = intent; intent = new Intent(Intent.ACTION_MAIN); - intent.setClass(IntentActivityFlags.this, com.example.android.apis.ApiDemos.class); - intent.putExtra("com.example.android.apis.Path", "Views/Lists"); + intent.setClass(IntentActivityFlags.this, io.appium.android.apis.ApiDemos.class); + intent.putExtra("io.appium.android.apis.Path", "Views/Lists"); intents[2] = intent; return intents; diff --git a/src/com/example/android/apis/app/Intents.java b/app/src/main/java/io/appium/android/apis/app/Intents.java similarity index 95% rename from src/com/example/android/apis/app/Intents.java rename to app/src/main/java/io/appium/android/apis/app/Intents.java index 8f02b83..9028bbb 100644 --- a/src/com/example/android/apis/app/Intents.java +++ b/app/src/main/java/io/appium/android/apis/app/Intents.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.app; +package io.appium.android.apis.app; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.content.Intent; diff --git a/src/com/example/android/apis/app/IsolatedService.java b/app/src/main/java/io/appium/android/apis/app/IsolatedService.java similarity index 99% rename from src/com/example/android/apis/app/IsolatedService.java rename to app/src/main/java/io/appium/android/apis/app/IsolatedService.java index bf3c523..c203e08 100644 --- a/src/com/example/android/apis/app/IsolatedService.java +++ b/app/src/main/java/io/appium/android/apis/app/IsolatedService.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.app; +package io.appium.android.apis.app; import android.app.Activity; import android.app.Service; @@ -35,7 +35,7 @@ // Need the following import to get access to the app resources, since this // class is in a sub-package. -import com.example.android.apis.R; +import io.appium.android.apis.R; /** * This is an example if implementing a Service that uses android:isolatedProcess. diff --git a/src/com/example/android/apis/app/IsolatedService2.java b/app/src/main/java/io/appium/android/apis/app/IsolatedService2.java similarity index 95% rename from src/com/example/android/apis/app/IsolatedService2.java rename to app/src/main/java/io/appium/android/apis/app/IsolatedService2.java index d313a67..51da023 100644 --- a/src/com/example/android/apis/app/IsolatedService2.java +++ b/app/src/main/java/io/appium/android/apis/app/IsolatedService2.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.app; +package io.appium.android.apis.app; /** * Stub to be able to have another instance of IsolatedService running. diff --git a/src/com/example/android/apis/app/LauncherShortcuts.java b/app/src/main/java/io/appium/android/apis/app/LauncherShortcuts.java similarity index 97% rename from src/com/example/android/apis/app/LauncherShortcuts.java rename to app/src/main/java/io/appium/android/apis/app/LauncherShortcuts.java index f28deab..004cb22 100644 --- a/src/com/example/android/apis/app/LauncherShortcuts.java +++ b/app/src/main/java/io/appium/android/apis/app/LauncherShortcuts.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.app; +package io.appium.android.apis.app; import android.app.Activity; import android.content.Intent; @@ -22,7 +22,7 @@ import android.os.Parcelable; import android.widget.TextView; -import com.example.android.apis.R; +import io.appium.android.apis.R; /** * This Activity actually handles two stages of a launcher shortcut's life cycle. @@ -51,7 +51,7 @@ */ public class LauncherShortcuts extends Activity { - private static final String EXTRA_KEY = "com.example.android.apis.app.LauncherShortcuts"; + private static final String EXTRA_KEY = "io.appium.android.apis.app.LauncherShortcuts"; @Override public void onCreate(Bundle icicle) { diff --git a/src/com/example/android/apis/app/LoaderCursor.java b/app/src/main/java/io/appium/android/apis/app/LoaderCursor.java similarity index 99% rename from src/com/example/android/apis/app/LoaderCursor.java rename to app/src/main/java/io/appium/android/apis/app/LoaderCursor.java index 1f99fad..10656df 100644 --- a/src/com/example/android/apis/app/LoaderCursor.java +++ b/app/src/main/java/io/appium/android/apis/app/LoaderCursor.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.app; +package io.appium.android.apis.app; import android.app.Activity; import android.app.FragmentManager; diff --git a/src/com/example/android/apis/app/LoaderCustom.java b/app/src/main/java/io/appium/android/apis/app/LoaderCustom.java similarity index 99% rename from src/com/example/android/apis/app/LoaderCustom.java rename to app/src/main/java/io/appium/android/apis/app/LoaderCustom.java index 1d5ff9d..c7d3677 100644 --- a/src/com/example/android/apis/app/LoaderCustom.java +++ b/app/src/main/java/io/appium/android/apis/app/LoaderCustom.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.app; +package io.appium.android.apis.app; -import com.example.android.apis.R; +import io.appium.android.apis.R; import java.io.File; import java.text.Collator; diff --git a/src/com/example/android/apis/app/LoaderRetained.java b/app/src/main/java/io/appium/android/apis/app/LoaderRetained.java similarity index 99% rename from src/com/example/android/apis/app/LoaderRetained.java rename to app/src/main/java/io/appium/android/apis/app/LoaderRetained.java index 48665ad..fdebb64 100644 --- a/src/com/example/android/apis/app/LoaderRetained.java +++ b/app/src/main/java/io/appium/android/apis/app/LoaderRetained.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.app; +package io.appium.android.apis.app; import android.app.Activity; import android.app.FragmentManager; diff --git a/src/com/example/android/apis/app/LoaderThrottle.java b/app/src/main/java/io/appium/android/apis/app/LoaderThrottle.java similarity index 99% rename from src/com/example/android/apis/app/LoaderThrottle.java rename to app/src/main/java/io/appium/android/apis/app/LoaderThrottle.java index 107f58e..c271cc4 100644 --- a/src/com/example/android/apis/app/LoaderThrottle.java +++ b/app/src/main/java/io/appium/android/apis/app/LoaderThrottle.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.app; +package io.appium.android.apis.app; import android.app.Activity; @@ -62,7 +62,7 @@ public class LoaderThrottle extends Activity { /** * The authority we use to get to our sample provider. */ - public static final String AUTHORITY = "com.example.android.apis.app.LoaderThrottle"; + public static final String AUTHORITY = "io.appium.android.apis.app.LoaderThrottle"; /** * Definition of the contract for the main table of our provider. diff --git a/src/com/example/android/apis/app/LocalSample.java b/app/src/main/java/io/appium/android/apis/app/LocalSample.java similarity index 95% rename from src/com/example/android/apis/app/LocalSample.java rename to app/src/main/java/io/appium/android/apis/app/LocalSample.java index 0e4b66e..8943e31 100644 --- a/src/com/example/android/apis/app/LocalSample.java +++ b/app/src/main/java/io/appium/android/apis/app/LocalSample.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.app; +package io.appium.android.apis.app; // Need the following import to get access to the app resources, since this // class is in a sub-package. @@ -25,7 +25,7 @@ import android.view.View.OnClickListener; import android.widget.Button; -import com.example.android.apis.R; +import io.appium.android.apis.R; /** * Front-end for launching {@link LocalSampleInstrumentation} example diff --git a/src/com/example/android/apis/app/LocalSampleInstrumentation.java b/app/src/main/java/io/appium/android/apis/app/LocalSampleInstrumentation.java similarity index 98% rename from src/com/example/android/apis/app/LocalSampleInstrumentation.java rename to app/src/main/java/io/appium/android/apis/app/LocalSampleInstrumentation.java index aabfec3..cc79766 100644 --- a/src/com/example/android/apis/app/LocalSampleInstrumentation.java +++ b/app/src/main/java/io/appium/android/apis/app/LocalSampleInstrumentation.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.app; +package io.appium.android.apis.app; import android.app.Activity; import android.app.Instrumentation; diff --git a/src/com/example/android/apis/app/LocalService.java b/app/src/main/java/io/appium/android/apis/app/LocalService.java similarity index 86% rename from src/com/example/android/apis/app/LocalService.java rename to app/src/main/java/io/appium/android/apis/app/LocalService.java index 900836b..3e5a38e 100644 --- a/src/com/example/android/apis/app/LocalService.java +++ b/app/src/main/java/io/appium/android/apis/app/LocalService.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.app; +package io.appium.android.apis.app; import android.app.Notification; import android.app.NotificationManager; @@ -28,7 +28,7 @@ // Need the following import to get access to the app resources, since this // class is in a sub-package. -import com.example.android.apis.R; +import io.appium.android.apis.R; /** * This is an example of implementing an application service that runs locally @@ -100,19 +100,18 @@ public IBinder onBind(Intent intent) { private void showNotification() { // In this sample, we'll use the same text for the ticker and the expanded notification CharSequence text = getText(R.string.local_service_started); - - // Set the icon, scrolling text and timestamp - Notification notification = new Notification(R.drawable.stat_sample, text, - System.currentTimeMillis()); - // The PendingIntent to launch our activity if the user selects this notification PendingIntent contentIntent = PendingIntent.getActivity(this, 0, new Intent(this, LocalServiceActivities.Controller.class), 0); - // Set the info for the views that show in the notification panel. - notification.setLatestEventInfo(this, getText(R.string.local_service_label), - text, contentIntent); - + Notification notification = new Notification.Builder(this) + .setSmallIcon(R.drawable.stat_sample) // the status icon + .setTicker(text) // the status text + .setWhen(System.currentTimeMillis()) // the time stamp + .setContentTitle(getText(R.string.local_service_label)) // the label of the entry + .setContentText(text) // the contents of the entry + .setContentIntent(contentIntent) // The intent to send when the entry is clicked + .build(); // Send the notification. mNM.notify(NOTIFICATION, notification); } diff --git a/src/com/example/android/apis/app/LocalServiceActivities.java b/app/src/main/java/io/appium/android/apis/app/LocalServiceActivities.java similarity index 98% rename from src/com/example/android/apis/app/LocalServiceActivities.java rename to app/src/main/java/io/appium/android/apis/app/LocalServiceActivities.java index f389011..cd882b6 100644 --- a/src/com/example/android/apis/app/LocalServiceActivities.java +++ b/app/src/main/java/io/appium/android/apis/app/LocalServiceActivities.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.app; +package io.appium.android.apis.app; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.content.ComponentName; diff --git a/src/com/example/android/apis/app/MenuInflateFromXml.java b/app/src/main/java/io/appium/android/apis/app/MenuInflateFromXml.java similarity index 98% rename from src/com/example/android/apis/app/MenuInflateFromXml.java rename to app/src/main/java/io/appium/android/apis/app/MenuInflateFromXml.java index 877714f..11ce034 100644 --- a/src/com/example/android/apis/app/MenuInflateFromXml.java +++ b/app/src/main/java/io/appium/android/apis/app/MenuInflateFromXml.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.app; +package io.appium.android.apis.app; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.os.Bundle; diff --git a/src/com/example/android/apis/app/MessengerService.java b/app/src/main/java/io/appium/android/apis/app/MessengerService.java similarity index 89% rename from src/com/example/android/apis/app/MessengerService.java rename to app/src/main/java/io/appium/android/apis/app/MessengerService.java index 637d6e1..d5c2bd4 100644 --- a/src/com/example/android/apis/app/MessengerService.java +++ b/app/src/main/java/io/appium/android/apis/app/MessengerService.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.app; +package io.appium.android.apis.app; import android.app.Notification; import android.app.NotificationManager; @@ -34,8 +34,8 @@ // Need the following import to get access to the app resources, since this // class is in a sub-package. -import com.example.android.apis.R; -import com.example.android.apis.app.RemoteService.Controller; +import io.appium.android.apis.R; +import io.appium.android.apis.app.RemoteService.Controller; /** * This is an example of implementing an application service that uses the @@ -148,19 +148,18 @@ public IBinder onBind(Intent intent) { private void showNotification() { // In this sample, we'll use the same text for the ticker and the expanded notification CharSequence text = getText(R.string.remote_service_started); - - // Set the icon, scrolling text and timestamp - Notification notification = new Notification(R.drawable.stat_sample, text, - System.currentTimeMillis()); - // The PendingIntent to launch our activity if the user selects this notification PendingIntent contentIntent = PendingIntent.getActivity(this, 0, new Intent(this, Controller.class), 0); - // Set the info for the views that show in the notification panel. - notification.setLatestEventInfo(this, getText(R.string.remote_service_label), - text, contentIntent); - + Notification notification = new Notification.Builder(this) + .setSmallIcon(R.drawable.stat_sample) // the status icon + .setTicker(text) // the status text + .setWhen(System.currentTimeMillis()) // the time stamp + .setContentTitle(getText(R.string.local_service_label)) // the label of the entry + .setContentText(text) // the contents of the entry + .setContentIntent(contentIntent) // The intent to send when the entry is clicked + .build(); // Send the notification. // We use a string id because it is a unique number. We use it later to cancel. mNM.notify(R.string.remote_service_started, notification); diff --git a/src/com/example/android/apis/app/MessengerServiceActivities.java b/app/src/main/java/io/appium/android/apis/app/MessengerServiceActivities.java similarity index 98% rename from src/com/example/android/apis/app/MessengerServiceActivities.java rename to app/src/main/java/io/appium/android/apis/app/MessengerServiceActivities.java index df80eec..e6a6bf2 100644 --- a/src/com/example/android/apis/app/MessengerServiceActivities.java +++ b/app/src/main/java/io/appium/android/apis/app/MessengerServiceActivities.java @@ -1,7 +1,7 @@ -package com.example.android.apis.app; +package io.appium.android.apis.app; -import com.example.android.apis.R; -import com.example.android.apis.app.LocalServiceActivities.Binding; +import io.appium.android.apis.R; +import io.appium.android.apis.app.LocalServiceActivities.Binding; import android.app.Activity; import android.content.ComponentName; diff --git a/src/com/example/android/apis/app/NotificationDisplay.java b/app/src/main/java/io/appium/android/apis/app/NotificationDisplay.java similarity index 97% rename from src/com/example/android/apis/app/NotificationDisplay.java rename to app/src/main/java/io/appium/android/apis/app/NotificationDisplay.java index 25b5d56..9ff591a 100644 --- a/src/com/example/android/apis/app/NotificationDisplay.java +++ b/app/src/main/java/io/appium/android/apis/app/NotificationDisplay.java @@ -14,11 +14,11 @@ * limitations under the License. */ -package com.example.android.apis.app; +package io.appium.android.apis.app; // Need the following import to get access to the app resources, since this // class is in a sub-package. -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.app.NotificationManager; diff --git a/src/com/example/android/apis/app/NotifyWithText.java b/app/src/main/java/io/appium/android/apis/app/NotifyWithText.java similarity index 97% rename from src/com/example/android/apis/app/NotifyWithText.java rename to app/src/main/java/io/appium/android/apis/app/NotifyWithText.java index 950ded9..f44f76b 100644 --- a/src/com/example/android/apis/app/NotifyWithText.java +++ b/app/src/main/java/io/appium/android/apis/app/NotifyWithText.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.app; +package io.appium.android.apis.app; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.widget.Button; diff --git a/src/com/example/android/apis/app/NotifyingController.java b/app/src/main/java/io/appium/android/apis/app/NotifyingController.java similarity index 96% rename from src/com/example/android/apis/app/NotifyingController.java rename to app/src/main/java/io/appium/android/apis/app/NotifyingController.java index b8b4e3f..1920a51 100644 --- a/src/com/example/android/apis/app/NotifyingController.java +++ b/app/src/main/java/io/appium/android/apis/app/NotifyingController.java @@ -14,11 +14,11 @@ * limitations under the License. */ -package com.example.android.apis.app; +package io.appium.android.apis.app; // Need the following import to get access to the app resources, since this // class is in a sub-package. -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.content.Intent; diff --git a/src/com/example/android/apis/app/NotifyingService.java b/app/src/main/java/io/appium/android/apis/app/NotifyingService.java similarity index 87% rename from src/com/example/android/apis/app/NotifyingService.java rename to app/src/main/java/io/appium/android/apis/app/NotifyingService.java index 3b8139f..bb370b2 100644 --- a/src/com/example/android/apis/app/NotifyingService.java +++ b/app/src/main/java/io/appium/android/apis/app/NotifyingService.java @@ -14,11 +14,11 @@ * limitations under the License. */ -package com.example.android.apis.app; +package io.appium.android.apis.app; // Need the following import to get access to the app resources, since this // class is in a sub-package. -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Notification; import android.app.NotificationManager; @@ -89,26 +89,26 @@ public void run() { public IBinder onBind(Intent intent) { return mBinder; } - + private void showNotification(int moodId, int textId) { // In this sample, we'll use the same text for the ticker and the expanded notification CharSequence text = getText(textId); - - // Set the icon, scrolling text and timestamp. - // Note that in this example, we pass null for tickerText. We update the icon enough that - // it is distracting to show the ticker text every time it changes. We strongly suggest - // that you do this as well. (Think of of the "New hardware found" or "Network connection - // changed" messages that always pop up) - Notification notification = new Notification(moodId, null, System.currentTimeMillis()); - // The PendingIntent to launch our activity if the user selects this notification PendingIntent contentIntent = PendingIntent.getActivity(this, 0, new Intent(this, NotifyingController.class), 0); - + // Set the icon and timestamp. + // Note that in this example, we do not set the tickerText. We update the icon enough that + // it is distracting to show the ticker text every time it changes. We strongly suggest + // that you do this as well. (Think of of the "New hardware found" or "Network connection + // changed" messages that always pop up) // Set the info for the views that show in the notification panel. - notification.setLatestEventInfo(this, getText(R.string.status_bar_notifications_mood_title), - text, contentIntent); - + Notification notification = new Notification.Builder(this) + .setSmallIcon(moodId) + .setWhen(System.currentTimeMillis()) + .setContentTitle(getText(R.string.status_bar_notifications_mood_title)) + .setContentText(text) // the contents of the entry + .setContentIntent(contentIntent) // The intent to send when the entry is clicked + .build(); // Send the notification. // We use a layout id because it is a unique number. We use it later to cancel. mNM.notify(MOOD_NOTIFICATIONS, notification); diff --git a/src/com/example/android/apis/app/OneShotAlarm.java b/app/src/main/java/io/appium/android/apis/app/OneShotAlarm.java similarity index 94% rename from src/com/example/android/apis/app/OneShotAlarm.java rename to app/src/main/java/io/appium/android/apis/app/OneShotAlarm.java index ec7e074..2d2eff2 100644 --- a/src/com/example/android/apis/app/OneShotAlarm.java +++ b/app/src/main/java/io/appium/android/apis/app/OneShotAlarm.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.app; +package io.appium.android.apis.app; import android.content.Context; import android.content.Intent; @@ -23,7 +23,7 @@ // Need the following import to get access to the app resources, since this // class is in a sub-package. -import com.example.android.apis.R; +import io.appium.android.apis.R; /** * This is an example of implement an {@link BroadcastReceiver} for an alarm that diff --git a/src/com/example/android/apis/app/PersistentState.java b/app/src/main/java/io/appium/android/apis/app/PersistentState.java similarity index 96% rename from src/com/example/android/apis/app/PersistentState.java rename to app/src/main/java/io/appium/android/apis/app/PersistentState.java index 618a692..c336053 100644 --- a/src/com/example/android/apis/app/PersistentState.java +++ b/app/src/main/java/io/appium/android/apis/app/PersistentState.java @@ -14,12 +14,12 @@ * limitations under the License. */ -package com.example.android.apis.app; +package io.appium.android.apis.app; // Need the following import to get access to the app resources, since this // class is in a sub-package. -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.content.SharedPreferences; @@ -53,7 +53,7 @@ *

Source files

*
src/com.example.android.apis/app/HelloWorld.javasrc/io.appium.android.apis/app/HelloWorld.javaThe Hello World Screen implementation
* - * + * * * * diff --git a/src/com/example/android/apis/app/PresentationActivity.java b/app/src/main/java/io/appium/android/apis/app/PresentationActivity.java similarity index 99% rename from src/com/example/android/apis/app/PresentationActivity.java rename to app/src/main/java/io/appium/android/apis/app/PresentationActivity.java index a98721f..ed2db3c 100644 --- a/src/com/example/android/apis/app/PresentationActivity.java +++ b/app/src/main/java/io/appium/android/apis/app/PresentationActivity.java @@ -14,11 +14,11 @@ * limitations under the License. */ -package com.example.android.apis.app; +package io.appium.android.apis.app; // Need the following import to get access to the app resources, since this // class is in a sub-package. -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.app.AlertDialog; diff --git a/src/com/example/android/apis/app/PresentationWithMediaRouterActivity.java b/app/src/main/java/io/appium/android/apis/app/PresentationWithMediaRouterActivity.java similarity index 98% rename from src/com/example/android/apis/app/PresentationWithMediaRouterActivity.java rename to app/src/main/java/io/appium/android/apis/app/PresentationWithMediaRouterActivity.java index da943d9..fb1757b 100644 --- a/src/com/example/android/apis/app/PresentationWithMediaRouterActivity.java +++ b/app/src/main/java/io/appium/android/apis/app/PresentationWithMediaRouterActivity.java @@ -14,10 +14,10 @@ * limitations under the License. */ -package com.example.android.apis.app; +package io.appium.android.apis.app; -import com.example.android.apis.R; -import com.example.android.apis.graphics.CubeRenderer; +import io.appium.android.apis.R; +import io.appium.android.apis.graphics.CubeRenderer; import android.app.Activity; import android.app.MediaRouteActionProvider; diff --git a/src/com/example/android/apis/app/QuickContactsDemo.java b/app/src/main/java/io/appium/android/apis/app/QuickContactsDemo.java similarity index 98% rename from src/com/example/android/apis/app/QuickContactsDemo.java rename to app/src/main/java/io/appium/android/apis/app/QuickContactsDemo.java index 004e568..0eed0a7 100644 --- a/src/com/example/android/apis/app/QuickContactsDemo.java +++ b/app/src/main/java/io/appium/android/apis/app/QuickContactsDemo.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.app; +package io.appium.android.apis.app; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.ListActivity; import android.content.Context; diff --git a/src/com/example/android/apis/app/ReceiveResult.java b/app/src/main/java/io/appium/android/apis/app/ReceiveResult.java similarity index 95% rename from src/com/example/android/apis/app/ReceiveResult.java rename to app/src/main/java/io/appium/android/apis/app/ReceiveResult.java index 22ae7f4..7b21992 100644 --- a/src/com/example/android/apis/app/ReceiveResult.java +++ b/app/src/main/java/io/appium/android/apis/app/ReceiveResult.java @@ -14,11 +14,11 @@ * limitations under the License. */ -package com.example.android.apis.app; +package io.appium.android.apis.app; // Need the following import to get access to the app resources, since this // class is in a sub-package. -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.content.Intent; @@ -50,11 +50,11 @@

Source files

src/com.example.android.apis/app/PersistentState.javasrc/io.appium.android.apis/app/PersistentState.javaThe Save/Restore Screen implementation
- + - + diff --git a/src/com/example/android/apis/app/RedirectEnter.java b/app/src/main/java/io/appium/android/apis/app/RedirectEnter.java similarity index 95% rename from src/com/example/android/apis/app/RedirectEnter.java rename to app/src/main/java/io/appium/android/apis/app/RedirectEnter.java index 3a3e6f2..164a82f 100644 --- a/src/com/example/android/apis/app/RedirectEnter.java +++ b/app/src/main/java/io/appium/android/apis/app/RedirectEnter.java @@ -14,11 +14,11 @@ * limitations under the License. */ -package com.example.android.apis.app; +package io.appium.android.apis.app; // Need the following import to get access to the app resources, since this // class is in a sub-package. -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.content.Intent; diff --git a/src/com/example/android/apis/app/RedirectGetter.java b/app/src/main/java/io/appium/android/apis/app/RedirectGetter.java similarity index 97% rename from src/com/example/android/apis/app/RedirectGetter.java rename to app/src/main/java/io/appium/android/apis/app/RedirectGetter.java index c96e1bb..7308c5d 100644 --- a/src/com/example/android/apis/app/RedirectGetter.java +++ b/app/src/main/java/io/appium/android/apis/app/RedirectGetter.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.app; +package io.appium.android.apis.app; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.content.SharedPreferences; diff --git a/src/com/example/android/apis/app/RedirectMain.java b/app/src/main/java/io/appium/android/apis/app/RedirectMain.java similarity index 98% rename from src/com/example/android/apis/app/RedirectMain.java rename to app/src/main/java/io/appium/android/apis/app/RedirectMain.java index 6d01ff0..0b075b5 100644 --- a/src/com/example/android/apis/app/RedirectMain.java +++ b/app/src/main/java/io/appium/android/apis/app/RedirectMain.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.app; +package io.appium.android.apis.app; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.content.Intent; diff --git a/src/com/example/android/apis/app/RemoteService.java b/app/src/main/java/io/appium/android/apis/app/RemoteService.java similarity index 97% rename from src/com/example/android/apis/app/RemoteService.java rename to app/src/main/java/io/appium/android/apis/app/RemoteService.java index c069491..ee78836 100644 --- a/src/com/example/android/apis/app/RemoteService.java +++ b/app/src/main/java/io/appium/android/apis/app/RemoteService.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.app; +package io.appium.android.apis.app; import android.app.Activity; import android.app.Notification; @@ -40,7 +40,7 @@ // Need the following import to get access to the app resources, since this // class is in a sub-package. -import com.example.android.apis.R; +import io.appium.android.apis.R; /** * This is an example of implementing an application service that runs in a @@ -176,30 +176,30 @@ public void onTaskRemoved(Intent rootIntent) { } }; + /** * Show a notification while this service is running. */ private void showNotification() { // In this sample, we'll use the same text for the ticker and the expanded notification CharSequence text = getText(R.string.remote_service_started); - - // Set the icon, scrolling text and timestamp - Notification notification = new Notification(R.drawable.stat_sample, text, - System.currentTimeMillis()); - // The PendingIntent to launch our activity if the user selects this notification PendingIntent contentIntent = PendingIntent.getActivity(this, 0, new Intent(this, Controller.class), 0); - // Set the info for the views that show in the notification panel. - notification.setLatestEventInfo(this, getText(R.string.remote_service_label), - text, contentIntent); - + Notification notification = new Notification.Builder(this) + .setSmallIcon(R.drawable.stat_sample) // the status icon + .setTicker(text) // the status text + .setWhen(System.currentTimeMillis()) // the time stamp + .setContentTitle(getText(R.string.remote_service_label)) // the label of the entry + .setContentText(text) // the contents of the entry + .setContentIntent(contentIntent) // The intent to send when the entry is clicked + .build(); // Send the notification. // We use a string id because it is a unique number. We use it later to cancel. mNM.notify(R.string.remote_service_started, notification); } - + // ---------------------------------------------------------------------- /** @@ -233,7 +233,7 @@ public void onClick(View v) { // the component name, so that other packages can replace // the service. startService(new Intent( - "com.example.android.apis.app.REMOTE_SERVICE")); + "io.appium.android.apis.app.REMOTE_SERVICE")); } }; @@ -243,7 +243,7 @@ public void onClick(View v) { // service will not actually stop at this point if there are // still bound clients. stopService(new Intent( - "com.example.android.apis.app.REMOTE_SERVICE")); + "io.appium.android.apis.app.REMOTE_SERVICE")); } }; } diff --git a/src/com/example/android/apis/app/ReorderFour.java b/app/src/main/java/io/appium/android/apis/app/ReorderFour.java similarity index 95% rename from src/com/example/android/apis/app/ReorderFour.java rename to app/src/main/java/io/appium/android/apis/app/ReorderFour.java index cdff538..bd4c6e1 100644 --- a/src/com/example/android/apis/app/ReorderFour.java +++ b/app/src/main/java/io/appium/android/apis/app/ReorderFour.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.app; +package io.appium.android.apis.app; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.content.Intent; diff --git a/src/com/example/android/apis/app/ReorderOnLaunch.java b/app/src/main/java/io/appium/android/apis/app/ReorderOnLaunch.java similarity index 94% rename from src/com/example/android/apis/app/ReorderOnLaunch.java rename to app/src/main/java/io/appium/android/apis/app/ReorderOnLaunch.java index 5856184..c66a178 100644 --- a/src/com/example/android/apis/app/ReorderOnLaunch.java +++ b/app/src/main/java/io/appium/android/apis/app/ReorderOnLaunch.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.app; +package io.appium.android.apis.app; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.content.Intent; diff --git a/src/com/example/android/apis/app/ReorderThree.java b/app/src/main/java/io/appium/android/apis/app/ReorderThree.java similarity index 94% rename from src/com/example/android/apis/app/ReorderThree.java rename to app/src/main/java/io/appium/android/apis/app/ReorderThree.java index 7f725a6..d68a06d 100644 --- a/src/com/example/android/apis/app/ReorderThree.java +++ b/app/src/main/java/io/appium/android/apis/app/ReorderThree.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.app; +package io.appium.android.apis.app; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.content.Intent; diff --git a/src/com/example/android/apis/app/ReorderTwo.java b/app/src/main/java/io/appium/android/apis/app/ReorderTwo.java similarity index 94% rename from src/com/example/android/apis/app/ReorderTwo.java rename to app/src/main/java/io/appium/android/apis/app/ReorderTwo.java index a1521d0..07ca115 100644 --- a/src/com/example/android/apis/app/ReorderTwo.java +++ b/app/src/main/java/io/appium/android/apis/app/ReorderTwo.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.app; +package io.appium.android.apis.app; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.content.Intent; diff --git a/src/com/example/android/apis/app/RepeatingAlarm.java b/app/src/main/java/io/appium/android/apis/app/RepeatingAlarm.java similarity index 94% rename from src/com/example/android/apis/app/RepeatingAlarm.java rename to app/src/main/java/io/appium/android/apis/app/RepeatingAlarm.java index 0027983..2df073f 100644 --- a/src/com/example/android/apis/app/RepeatingAlarm.java +++ b/app/src/main/java/io/appium/android/apis/app/RepeatingAlarm.java @@ -14,11 +14,11 @@ * limitations under the License. */ -package com.example.android.apis.app; +package io.appium.android.apis.app; // Need the following import to get access to the app resources, since this // class is in a sub-package. -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.content.Context; import android.content.Intent; diff --git a/src/com/example/android/apis/app/SaveRestoreState.java b/app/src/main/java/io/appium/android/apis/app/SaveRestoreState.java similarity index 95% rename from src/com/example/android/apis/app/SaveRestoreState.java rename to app/src/main/java/io/appium/android/apis/app/SaveRestoreState.java index bddedf3..3e342a9 100644 --- a/src/com/example/android/apis/app/SaveRestoreState.java +++ b/app/src/main/java/io/appium/android/apis/app/SaveRestoreState.java @@ -14,11 +14,11 @@ * limitations under the License. */ -package com.example.android.apis.app; +package io.appium.android.apis.app; // Need the following import to get access to the app resources, since this // class is in a sub-package. -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.os.Bundle; @@ -50,7 +50,7 @@ *

Source files

*
src/com.example.android.apis/app/ReceiveResult.javasrc/io.appium.android.apis/app/ReceiveResult.java Launches pick activity and receives its result
src/com.example.android.apis/app/SendResult.javasrc/io.appium.android.apis/app/SendResult.java Allows user to pick an option and sends it back to its caller
- + diff --git a/src/com/example/android/apis/app/ScreenOrientation.java b/app/src/main/java/io/appium/android/apis/app/ScreenOrientation.java similarity index 97% rename from src/com/example/android/apis/app/ScreenOrientation.java rename to app/src/main/java/io/appium/android/apis/app/ScreenOrientation.java index 3946b2a..99978d6 100644 --- a/src/com/example/android/apis/app/ScreenOrientation.java +++ b/app/src/main/java/io/appium/android/apis/app/ScreenOrientation.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.app; +package io.appium.android.apis.app; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.app.admin.DevicePolicyManager; diff --git a/src/com/example/android/apis/app/SearchInvoke.java b/app/src/main/java/io/appium/android/apis/app/SearchInvoke.java similarity index 99% rename from src/com/example/android/apis/app/SearchInvoke.java rename to app/src/main/java/io/appium/android/apis/app/SearchInvoke.java index a8d350c..4232379 100644 --- a/src/com/example/android/apis/app/SearchInvoke.java +++ b/app/src/main/java/io/appium/android/apis/app/SearchInvoke.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.app; +package io.appium.android.apis.app; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.app.AlertDialog; diff --git a/src/com/example/android/apis/app/SearchQueryResults.java b/app/src/main/java/io/appium/android/apis/app/SearchQueryResults.java similarity index 98% rename from src/com/example/android/apis/app/SearchQueryResults.java rename to app/src/main/java/io/appium/android/apis/app/SearchQueryResults.java index 668ad57..282f633 100644 --- a/src/com/example/android/apis/app/SearchQueryResults.java +++ b/app/src/main/java/io/appium/android/apis/app/SearchQueryResults.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.app; +package io.appium.android.apis.app; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.app.SearchManager; diff --git a/src/com/example/android/apis/app/SearchSuggestionSampleProvider.java b/app/src/main/java/io/appium/android/apis/app/SearchSuggestionSampleProvider.java similarity index 93% rename from src/com/example/android/apis/app/SearchSuggestionSampleProvider.java rename to app/src/main/java/io/appium/android/apis/app/SearchSuggestionSampleProvider.java index 4baccd0..7e31576 100644 --- a/src/com/example/android/apis/app/SearchSuggestionSampleProvider.java +++ b/app/src/main/java/io/appium/android/apis/app/SearchSuggestionSampleProvider.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.app; +package io.appium.android.apis.app; import android.content.SearchRecentSuggestionsProvider; @@ -31,7 +31,7 @@ public class SearchSuggestionSampleProvider extends SearchRecentSuggestionsProvi * Manifest file, and any time you instantiate a * {@link android.provider.SearchRecentSuggestions} helper class. */ - final static String AUTHORITY = "com.example.android.apis.SuggestionProvider"; + final static String AUTHORITY = "io.appium.android.apis.SuggestionProvider"; /** * These flags determine the operating mode of the suggestions provider. This value should * not change from run to run, because when it does change, your suggestions database may diff --git a/src/com/example/android/apis/app/SecureDialogActivity.java b/app/src/main/java/io/appium/android/apis/app/SecureDialogActivity.java similarity index 97% rename from src/com/example/android/apis/app/SecureDialogActivity.java rename to app/src/main/java/io/appium/android/apis/app/SecureDialogActivity.java index fe871aa..6d3f1fd 100644 --- a/src/com/example/android/apis/app/SecureDialogActivity.java +++ b/app/src/main/java/io/appium/android/apis/app/SecureDialogActivity.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.app; +package io.appium.android.apis.app; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.app.AlertDialog; diff --git a/src/com/example/android/apis/app/SecureSurfaceViewActivity.java b/app/src/main/java/io/appium/android/apis/app/SecureSurfaceViewActivity.java similarity index 96% rename from src/com/example/android/apis/app/SecureSurfaceViewActivity.java rename to app/src/main/java/io/appium/android/apis/app/SecureSurfaceViewActivity.java index 978c70c..dc53246 100644 --- a/src/com/example/android/apis/app/SecureSurfaceViewActivity.java +++ b/app/src/main/java/io/appium/android/apis/app/SecureSurfaceViewActivity.java @@ -14,10 +14,10 @@ * limitations under the License. */ -package com.example.android.apis.app; +package io.appium.android.apis.app; -import com.example.android.apis.R; -import com.example.android.apis.graphics.CubeRenderer; +import io.appium.android.apis.R; +import io.appium.android.apis.graphics.CubeRenderer; import android.app.Activity; import android.opengl.GLSurfaceView; diff --git a/src/com/example/android/apis/app/SecureWindowActivity.java b/app/src/main/java/io/appium/android/apis/app/SecureWindowActivity.java similarity index 97% rename from src/com/example/android/apis/app/SecureWindowActivity.java rename to app/src/main/java/io/appium/android/apis/app/SecureWindowActivity.java index 4b5e8b6..99af8da 100644 --- a/src/com/example/android/apis/app/SecureWindowActivity.java +++ b/app/src/main/java/io/appium/android/apis/app/SecureWindowActivity.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.app; +package io.appium.android.apis.app; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.os.Bundle; diff --git a/src/com/example/android/apis/app/SendResult.java b/app/src/main/java/io/appium/android/apis/app/SendResult.java similarity index 97% rename from src/com/example/android/apis/app/SendResult.java rename to app/src/main/java/io/appium/android/apis/app/SendResult.java index 1171eea..aa5b339 100644 --- a/src/com/example/android/apis/app/SendResult.java +++ b/app/src/main/java/io/appium/android/apis/app/SendResult.java @@ -14,11 +14,11 @@ * limitations under the License. */ -package com.example.android.apis.app; +package io.appium.android.apis.app; // Need the following import to get access to the app resources, since this // class is in a sub-package. -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.content.Intent; diff --git a/src/com/example/android/apis/app/ServiceStartArguments.java b/app/src/main/java/io/appium/android/apis/app/ServiceStartArguments.java similarity index 93% rename from src/com/example/android/apis/app/ServiceStartArguments.java rename to app/src/main/java/io/appium/android/apis/app/ServiceStartArguments.java index f551447..4ff4ac9 100644 --- a/src/com/example/android/apis/app/ServiceStartArguments.java +++ b/app/src/main/java/io/appium/android/apis/app/ServiceStartArguments.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.app; +package io.appium.android.apis.app; import android.app.Activity; import android.app.Notification; @@ -35,7 +35,7 @@ import android.widget.Button; import android.widget.Toast; -import com.example.android.apis.R; +import io.appium.android.apis.R; /** * This is an example of implementing an application service that runs locally @@ -174,24 +174,23 @@ public IBinder onBind(Intent intent) { * Show a notification while this service is running. */ private void showNotification(String text) { - // Set the icon, scrolling text and timestamp - Notification notification = new Notification(R.drawable.stat_sample, text, - System.currentTimeMillis()); - // The PendingIntent to launch our activity if the user selects this notification PendingIntent contentIntent = PendingIntent.getActivity(this, 0, new Intent(this, Controller.class), 0); - // Set the info for the views that show in the notification panel. - notification.setLatestEventInfo(this, getText(R.string.service_start_arguments_label), - text, contentIntent); - + Notification.Builder noteBuilder = new Notification.Builder(this) + .setSmallIcon(R.drawable.stat_sample) // the status icon + .setTicker(text) // the status text + .setWhen(System.currentTimeMillis()) // the time stamp + .setContentTitle(getText(R.string.service_start_arguments_label)) // the label + .setContentText(text) // the contents of the entry + .setContentIntent(contentIntent); // The intent to send when the entry is clicked // We show this for as long as our service is processing a command. - notification.flags |= Notification.FLAG_ONGOING_EVENT; - + noteBuilder.setOngoing(true); + // Send the notification. // We use a string id because it is a unique number. We use it later to cancel. - mNM.notify(R.string.service_created, notification); + mNM.notify(R.string.service_created, noteBuilder.build()); } private void hideNotification() { diff --git a/src/com/example/android/apis/app/SetWallpaperActivity.java b/app/src/main/java/io/appium/android/apis/app/SetWallpaperActivity.java similarity index 97% rename from src/com/example/android/apis/app/SetWallpaperActivity.java rename to app/src/main/java/io/appium/android/apis/app/SetWallpaperActivity.java index f3d4ffb..ca9059c 100644 --- a/src/com/example/android/apis/app/SetWallpaperActivity.java +++ b/app/src/main/java/io/appium/android/apis/app/SetWallpaperActivity.java @@ -14,11 +14,11 @@ * limitations under the License. */ -package com.example.android.apis.app; +package io.appium.android.apis.app; // Need the following import to get access to the app resources, since this // class is in a sub-package. -import com.example.android.apis.R; +import io.appium.android.apis.R; import java.io.IOException; diff --git a/src/com/example/android/apis/app/SoftInputModes.java b/app/src/main/java/io/appium/android/apis/app/SoftInputModes.java similarity index 97% rename from src/com/example/android/apis/app/SoftInputModes.java rename to app/src/main/java/io/appium/android/apis/app/SoftInputModes.java index 8c6dcc3..53193fe 100644 --- a/src/com/example/android/apis/app/SoftInputModes.java +++ b/app/src/main/java/io/appium/android/apis/app/SoftInputModes.java @@ -1,6 +1,6 @@ -package com.example.android.apis.app; +package io.appium.android.apis.app; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.app.admin.DevicePolicyManager; diff --git a/src/com/example/android/apis/app/StatusBarNotifications.java b/app/src/main/java/io/appium/android/apis/app/StatusBarNotifications.java similarity index 71% rename from src/com/example/android/apis/app/StatusBarNotifications.java rename to app/src/main/java/io/appium/android/apis/app/StatusBarNotifications.java index 0612289..268690a 100644 --- a/src/com/example/android/apis/app/StatusBarNotifications.java +++ b/app/src/main/java/io/appium/android/apis/app/StatusBarNotifications.java @@ -14,16 +14,19 @@ * limitations under the License. */ -package com.example.android.apis.app; +package io.appium.android.apis.app; -import com.example.android.apis.R; +import androidx.annotation.RequiresApi; +import io.appium.android.apis.R; import android.app.Activity; import android.app.Notification; +import android.app.NotificationChannel; import android.app.NotificationManager; import android.app.PendingIntent; import android.content.ComponentName; import android.content.Intent; +import android.os.Build; import android.os.Bundle; import android.view.View; import android.widget.Button; @@ -143,6 +146,8 @@ public void onClick(View v) { mNotificationManager.cancel(R.layout.status_bar_notifications); } }); + + createChannel(); } private PendingIntent makeMoodIntent(int moodId) { @@ -168,14 +173,14 @@ private PendingIntent makeDefaultIntent() { // This is a convenient way to make the proper Intent to launch and // reset an application's task. intents[0] = Intent.makeRestartActivityTask(new ComponentName(this, - com.example.android.apis.ApiDemos.class)); + io.appium.android.apis.ApiDemos.class)); // "App" - intents[1] = new Intent(this, com.example.android.apis.ApiDemos.class); - intents[1].putExtra("com.example.android.apis.Path", "App"); + intents[1] = new Intent(this, io.appium.android.apis.ApiDemos.class); + intents[1].putExtra("io.appium.android.apis.Path", "App"); // "App/Notification" - intents[2] = new Intent(this, com.example.android.apis.ApiDemos.class); - intents[2].putExtra("com.example.android.apis.Path", "App/Notification"); + intents[2] = new Intent(this, io.appium.android.apis.ApiDemos.class); + intents[2].putExtra("io.appium.android.apis.Path", "App/Notification"); // Now the activity to display to the user. intents[3] = new Intent(this, StatusBarNotifications.class); @@ -189,25 +194,51 @@ private PendingIntent makeDefaultIntent() { return contentIntent; } + private static final String CHANNEL_ID = "main_channel"; + private static final String CHANNEL_NAME = "Sample App"; + private static final String CHANNEL_DESCRIPTION = "Status Bar Notifications"; + + + @RequiresApi(Build.VERSION_CODES.O) + private void createChannel() { + NotificationManager mNotificationManager = (NotificationManager) this.getSystemService(NOTIFICATION_SERVICE); + if (mNotificationManager == null) { + return; + } + NotificationChannel mChannel = new NotificationChannel(CHANNEL_ID, CHANNEL_NAME, NotificationManager.IMPORTANCE_DEFAULT); + mChannel.setDescription(CHANNEL_DESCRIPTION); + mChannel.setShowBadge(true); + mChannel.setLockscreenVisibility(Notification.VISIBILITY_PUBLIC); + mNotificationManager.createNotificationChannel(mChannel); + } private void setMood(int moodId, int textId, boolean showTicker) { // In this sample, we'll use the same text for the ticker and the expanded notification CharSequence text = getText(textId); - - // choose the ticker text - String tickerText = showTicker ? getString(textId) : null; - - // Set the icon, scrolling text and timestamp - Notification notification = new Notification(moodId, tickerText, - System.currentTimeMillis()); - + // In this sample, we'll use this text for the title of the notification + CharSequence title = getText(R.string.status_bar_notifications_mood_title); // Set the info for the views that show in the notification panel. - notification.setLatestEventInfo(this, getText(R.string.status_bar_notifications_mood_title), - text, makeMoodIntent(moodId)); + Notification.Builder builder; + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { + builder = new Notification.Builder(this, CHANNEL_ID); + } else { + builder = new Notification.Builder(this); + } + + Notification.Builder notifBuidler = builder // the context to use + .setSmallIcon(moodId) // the status icon + .setWhen(System.currentTimeMillis()) // the timestamp for the notification + .setContentTitle(title) // the title for the notification + .setContentText(text) // the details to display in the notification + .setContentIntent(makeMoodIntent(moodId)); // The intent to send clicked + if (showTicker) { + // include the ticker text + notifBuidler.setTicker(getString(textId)); + } // Send the notification. // We use a layout id because it is a unique number. We use it later to cancel. - mNotificationManager.notify(MOOD_NOTIFICATIONS, notification); + mNotificationManager.notify(MOOD_NOTIFICATIONS, notifBuidler.build()); } private void setMoodView(int moodId, int textId) { @@ -237,34 +268,35 @@ private void setMoodView(int moodId, int textId) { // notification mNotificationManager.notify(MOOD_NOTIFICATIONS, notif); } - + private void setDefault(int defaults) { - - // This method sets the defaults on the notification before posting it. - // This is who should be launched if the user selects our notification. PendingIntent contentIntent = makeDefaultIntent(); - // In this sample, we'll use the same text for the ticker and the expanded notification CharSequence text = getText(R.string.status_bar_notifications_happy_message); + // In this sample, we'll use this text for the title of the notification + CharSequence title = getText(R.string.status_bar_notifications_mood_title); - final Notification notification = new Notification( - R.drawable.stat_happy, // the icon for the status bar - text, // the text to display in the ticker - System.currentTimeMillis()); // the timestamp for the notification - - notification.setLatestEventInfo( - this, // the context to use - getText(R.string.status_bar_notifications_mood_title), - // the title for the notification - text, // the details to display in the notification - contentIntent); // the contentIntent (see above) + Notification.Builder notifBuilder; + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { + notifBuilder = new Notification.Builder(this, CHANNEL_ID); + } else { + notifBuilder = new Notification.Builder(this); + } - notification.defaults = defaults; - + // Set the info for the views that show in the notification panel. + Notification notification = notifBuilder // the context to use + .setSmallIcon(R.drawable.stat_happy) // the status icon + .setTicker(text) // the text to display in the ticker + .setWhen(System.currentTimeMillis()) // the timestamp for the notification + .setContentTitle(title) // the title for the notification + .setContentText(text) // the details to display in the notification + .setContentIntent(contentIntent) // The intent to send when the entry is clicked + .setDefaults(defaults) + .build(); mNotificationManager.notify( MOOD_NOTIFICATIONS, // we use a string id because it is a unique - // number. we use it later to cancel the notification + // number. we use it later to cancel the notification notification); - } + } } diff --git a/src/com/example/android/apis/app/TextToSpeechActivity.java b/app/src/main/java/io/appium/android/apis/app/TextToSpeechActivity.java similarity index 98% rename from src/com/example/android/apis/app/TextToSpeechActivity.java rename to app/src/main/java/io/appium/android/apis/app/TextToSpeechActivity.java index a693e80..e83b709 100644 --- a/src/com/example/android/apis/app/TextToSpeechActivity.java +++ b/app/src/main/java/io/appium/android/apis/app/TextToSpeechActivity.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.app; +package io.appium.android.apis.app; import android.app.Activity; import android.os.Bundle; @@ -23,7 +23,7 @@ import android.view.View; import android.widget.Button; -import com.example.android.apis.R; +import io.appium.android.apis.R; import java.util.Locale; import java.util.Random; diff --git a/src/com/example/android/apis/app/TranslucentActivity.java b/app/src/main/java/io/appium/android/apis/app/TranslucentActivity.java similarity index 95% rename from src/com/example/android/apis/app/TranslucentActivity.java rename to app/src/main/java/io/appium/android/apis/app/TranslucentActivity.java index 522fe13..ab33331 100644 --- a/src/com/example/android/apis/app/TranslucentActivity.java +++ b/app/src/main/java/io/appium/android/apis/app/TranslucentActivity.java @@ -14,11 +14,11 @@ * limitations under the License. */ -package com.example.android.apis.app; +package io.appium.android.apis.app; // Need the following import to get access to the app resources, since this // class is in a sub-package. -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.os.Bundle; diff --git a/src/com/example/android/apis/app/TranslucentBlurActivity.java b/app/src/main/java/io/appium/android/apis/app/TranslucentBlurActivity.java similarity index 96% rename from src/com/example/android/apis/app/TranslucentBlurActivity.java rename to app/src/main/java/io/appium/android/apis/app/TranslucentBlurActivity.java index dd88227..a81a884 100644 --- a/src/com/example/android/apis/app/TranslucentBlurActivity.java +++ b/app/src/main/java/io/appium/android/apis/app/TranslucentBlurActivity.java @@ -14,11 +14,11 @@ * limitations under the License. */ -package com.example.android.apis.app; +package io.appium.android.apis.app; // Need the following import to get access to the app resources, since this // class is in a sub-package. -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.os.Bundle; diff --git a/src/com/example/android/apis/app/VoiceRecognition.java b/app/src/main/java/io/appium/android/apis/app/VoiceRecognition.java similarity index 99% rename from src/com/example/android/apis/app/VoiceRecognition.java rename to app/src/main/java/io/appium/android/apis/app/VoiceRecognition.java index 10d9ae0..75e6c53 100644 --- a/src/com/example/android/apis/app/VoiceRecognition.java +++ b/app/src/main/java/io/appium/android/apis/app/VoiceRecognition.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.app; +package io.appium.android.apis.app; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.content.BroadcastReceiver; diff --git a/src/com/example/android/apis/app/WallpaperActivity.java b/app/src/main/java/io/appium/android/apis/app/WallpaperActivity.java similarity index 95% rename from src/com/example/android/apis/app/WallpaperActivity.java rename to app/src/main/java/io/appium/android/apis/app/WallpaperActivity.java index 7b5eea2..46722db 100644 --- a/src/com/example/android/apis/app/WallpaperActivity.java +++ b/app/src/main/java/io/appium/android/apis/app/WallpaperActivity.java @@ -14,11 +14,11 @@ * limitations under the License. */ -package com.example.android.apis.app; +package io.appium.android.apis.app; // Need the following import to get access to the app resources, since this // class is in a sub-package. -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.os.Bundle; diff --git a/src/com/example/android/apis/appwidget/ExampleAppWidgetConfigure.java b/app/src/main/java/io/appium/android/apis/appwidget/ExampleAppWidgetConfigure.java similarity index 96% rename from src/com/example/android/apis/appwidget/ExampleAppWidgetConfigure.java rename to app/src/main/java/io/appium/android/apis/appwidget/ExampleAppWidgetConfigure.java index e2cd1ca..8d1b925 100644 --- a/src/com/example/android/apis/appwidget/ExampleAppWidgetConfigure.java +++ b/app/src/main/java/io/appium/android/apis/appwidget/ExampleAppWidgetConfigure.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.appwidget; +package io.appium.android.apis.appwidget; import android.app.Activity; import android.appwidget.AppWidgetManager; @@ -29,7 +29,7 @@ // Need the following import to get access to the app resources, since this // class is in a sub-package. -import com.example.android.apis.R; +import io.appium.android.apis.R; /** * The configuration screen for the ExampleAppWidgetProvider widget sample. @@ -38,7 +38,7 @@ public class ExampleAppWidgetConfigure extends Activity { static final String TAG = "ExampleAppWidgetConfigure"; private static final String PREFS_NAME - = "com.example.android.apis.appwidget.ExampleAppWidgetProvider"; + = "io.appium.android.apis.appwidget.ExampleAppWidgetProvider"; private static final String PREF_PREFIX_KEY = "prefix_"; int mAppWidgetId = AppWidgetManager.INVALID_APPWIDGET_ID; diff --git a/src/com/example/android/apis/appwidget/ExampleAppWidgetProvider.java b/app/src/main/java/io/appium/android/apis/appwidget/ExampleAppWidgetProvider.java similarity index 94% rename from src/com/example/android/apis/appwidget/ExampleAppWidgetProvider.java rename to app/src/main/java/io/appium/android/apis/appwidget/ExampleAppWidgetProvider.java index 61aba63..7064597 100644 --- a/src/com/example/android/apis/appwidget/ExampleAppWidgetProvider.java +++ b/app/src/main/java/io/appium/android/apis/appwidget/ExampleAppWidgetProvider.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.appwidget; +package io.appium.android.apis.appwidget; import android.appwidget.AppWidgetManager; import android.appwidget.AppWidgetProvider; @@ -27,7 +27,7 @@ // Need the following import to get access to the app resources, since this // class is in a sub-package. -import com.example.android.apis.R; +import io.appium.android.apis.R; /** * A widget provider. We have a string that we pull from a preference in order to show @@ -82,7 +82,7 @@ public void onEnabled(Context context) { // be called after boot if there is a widget instance for this provider. PackageManager pm = context.getPackageManager(); pm.setComponentEnabledSetting( - new ComponentName("com.example.android.apis", ".appwidget.ExampleBroadcastReceiver"), + new ComponentName("io.appium.android.apis", ".appwidget.ExampleBroadcastReceiver"), PackageManager.COMPONENT_ENABLED_STATE_ENABLED, PackageManager.DONT_KILL_APP); } @@ -94,7 +94,7 @@ public void onDisabled(Context context) { Log.d(TAG, "onDisabled"); PackageManager pm = context.getPackageManager(); pm.setComponentEnabledSetting( - new ComponentName("com.example.android.apis", ".appwidget.ExampleBroadcastReceiver"), + new ComponentName("io.appium.android.apis", ".appwidget.ExampleBroadcastReceiver"), PackageManager.COMPONENT_ENABLED_STATE_ENABLED, PackageManager.DONT_KILL_APP); } diff --git a/src/com/example/android/apis/appwidget/ExampleBroadcastReceiver.java b/app/src/main/java/io/appium/android/apis/appwidget/ExampleBroadcastReceiver.java similarity index 97% rename from src/com/example/android/apis/appwidget/ExampleBroadcastReceiver.java rename to app/src/main/java/io/appium/android/apis/appwidget/ExampleBroadcastReceiver.java index cf23f3d..5e02d1b 100644 --- a/src/com/example/android/apis/appwidget/ExampleBroadcastReceiver.java +++ b/app/src/main/java/io/appium/android/apis/appwidget/ExampleBroadcastReceiver.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.appwidget; +package io.appium.android.apis.appwidget; import android.appwidget.AppWidgetManager; import android.content.BroadcastReceiver; diff --git a/src/com/example/android/apis/content/ClipboardSample.java b/app/src/main/java/io/appium/android/apis/content/ClipboardSample.java similarity index 98% rename from src/com/example/android/apis/content/ClipboardSample.java rename to app/src/main/java/io/appium/android/apis/content/ClipboardSample.java index cf7d027..5a2295b 100644 --- a/src/com/example/android/apis/content/ClipboardSample.java +++ b/app/src/main/java/io/appium/android/apis/content/ClipboardSample.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.content; +package io.appium.android.apis.content; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.content.ClipboardManager; diff --git a/src/com/example/android/apis/content/ExternalStorage.java b/app/src/main/java/io/appium/android/apis/content/ExternalStorage.java similarity index 99% rename from src/com/example/android/apis/content/ExternalStorage.java rename to app/src/main/java/io/appium/android/apis/content/ExternalStorage.java index 48525e1..0e5b386 100644 --- a/src/com/example/android/apis/content/ExternalStorage.java +++ b/app/src/main/java/io/appium/android/apis/content/ExternalStorage.java @@ -14,11 +14,11 @@ * limitations under the License. */ -package com.example.android.apis.content; +package io.appium.android.apis.content; //Need the following import to get access to the app resources, since this //class is in a sub-package. -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.content.BroadcastReceiver; diff --git a/src/com/example/android/apis/content/FileProvider.java b/app/src/main/java/io/appium/android/apis/content/FileProvider.java similarity index 98% rename from src/com/example/android/apis/content/FileProvider.java rename to app/src/main/java/io/appium/android/apis/content/FileProvider.java index 156625a..19749fa 100644 --- a/src/com/example/android/apis/content/FileProvider.java +++ b/app/src/main/java/io/appium/android/apis/content/FileProvider.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.content; +package io.appium.android.apis.content; import java.io.FileNotFoundException; import java.io.FileOutputStream; diff --git a/src/com/example/android/apis/content/InstallApk.java b/app/src/main/java/io/appium/android/apis/content/InstallApk.java similarity index 98% rename from src/com/example/android/apis/content/InstallApk.java rename to app/src/main/java/io/appium/android/apis/content/InstallApk.java index 9036ee0..ed59406 100644 --- a/src/com/example/android/apis/content/InstallApk.java +++ b/app/src/main/java/io/appium/android/apis/content/InstallApk.java @@ -14,11 +14,11 @@ * limitations under the License. */ -package com.example.android.apis.content; +package io.appium.android.apis.content; // Need the following import to get access to the app resources, since this // class is in a sub-package. -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.content.ContentProvider; diff --git a/src/com/example/android/apis/content/PickContact.java b/app/src/main/java/io/appium/android/apis/content/PickContact.java similarity index 98% rename from src/com/example/android/apis/content/PickContact.java rename to app/src/main/java/io/appium/android/apis/content/PickContact.java index 8ee85cc..1dcae68 100644 --- a/src/com/example/android/apis/content/PickContact.java +++ b/app/src/main/java/io/appium/android/apis/content/PickContact.java @@ -14,11 +14,11 @@ * limitations under the License. */ -package com.example.android.apis.content; +package io.appium.android.apis.content; // Need the following import to get access to the app resources, since this // class is in a sub-package. -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.app.AlarmManager; diff --git a/src/com/example/android/apis/content/ReadAsset.java b/app/src/main/java/io/appium/android/apis/content/ReadAsset.java similarity index 96% rename from src/com/example/android/apis/content/ReadAsset.java rename to app/src/main/java/io/appium/android/apis/content/ReadAsset.java index 47503c4..e59d7f9 100644 --- a/src/com/example/android/apis/content/ReadAsset.java +++ b/app/src/main/java/io/appium/android/apis/content/ReadAsset.java @@ -14,11 +14,11 @@ * limitations under the License. */ -package com.example.android.apis.content; +package io.appium.android.apis.content; // Need the following import to get access to the app resources, since this // class is in a sub-package. -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.os.Bundle; diff --git a/src/com/example/android/apis/content/ResourcesLayoutReference.java b/app/src/main/java/io/appium/android/apis/content/ResourcesLayoutReference.java similarity index 93% rename from src/com/example/android/apis/content/ResourcesLayoutReference.java rename to app/src/main/java/io/appium/android/apis/content/ResourcesLayoutReference.java index 0682bcb..a170bb7 100644 --- a/src/com/example/android/apis/content/ResourcesLayoutReference.java +++ b/app/src/main/java/io/appium/android/apis/content/ResourcesLayoutReference.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.content; +package io.appium.android.apis.content; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.os.Bundle; diff --git a/src/com/example/android/apis/content/ResourcesSample.java b/app/src/main/java/io/appium/android/apis/content/ResourcesSample.java similarity index 97% rename from src/com/example/android/apis/content/ResourcesSample.java rename to app/src/main/java/io/appium/android/apis/content/ResourcesSample.java index d46a851..22b3510 100644 --- a/src/com/example/android/apis/content/ResourcesSample.java +++ b/app/src/main/java/io/appium/android/apis/content/ResourcesSample.java @@ -14,11 +14,11 @@ * limitations under the License. */ -package com.example.android.apis.content; +package io.appium.android.apis.content; // Need the following import to get access to the app resources, since this // class is in a sub-package. -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.content.Context; diff --git a/src/com/example/android/apis/content/ResourcesSmallestWidth.java b/app/src/main/java/io/appium/android/apis/content/ResourcesSmallestWidth.java similarity index 93% rename from src/com/example/android/apis/content/ResourcesSmallestWidth.java rename to app/src/main/java/io/appium/android/apis/content/ResourcesSmallestWidth.java index 9e2eeb9..b6b6cc6 100644 --- a/src/com/example/android/apis/content/ResourcesSmallestWidth.java +++ b/app/src/main/java/io/appium/android/apis/content/ResourcesSmallestWidth.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.content; +package io.appium.android.apis.content; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.os.Bundle; diff --git a/src/com/example/android/apis/content/ResourcesWidthAndHeight.java b/app/src/main/java/io/appium/android/apis/content/ResourcesWidthAndHeight.java similarity index 93% rename from src/com/example/android/apis/content/ResourcesWidthAndHeight.java rename to app/src/main/java/io/appium/android/apis/content/ResourcesWidthAndHeight.java index c35d738..e53108d 100644 --- a/src/com/example/android/apis/content/ResourcesWidthAndHeight.java +++ b/app/src/main/java/io/appium/android/apis/content/ResourcesWidthAndHeight.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.content; +package io.appium.android.apis.content; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.os.Bundle; diff --git a/src/com/example/android/apis/content/StyledText.java b/app/src/main/java/io/appium/android/apis/content/StyledText.java similarity index 95% rename from src/com/example/android/apis/content/StyledText.java rename to app/src/main/java/io/appium/android/apis/content/StyledText.java index b158929..bf97cda 100644 --- a/src/com/example/android/apis/content/StyledText.java +++ b/app/src/main/java/io/appium/android/apis/content/StyledText.java @@ -14,11 +14,11 @@ * limitations under the License. */ -package com.example.android.apis.content; +package io.appium.android.apis.content; // Need the following import to get access to the app resources, since this // class is in a sub-package. -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.os.Bundle; diff --git a/src/com/example/android/apis/graphics/AlphaBitmap.java b/app/src/main/java/io/appium/android/apis/graphics/AlphaBitmap.java similarity index 97% rename from src/com/example/android/apis/graphics/AlphaBitmap.java rename to app/src/main/java/io/appium/android/apis/graphics/AlphaBitmap.java index 90d3450..f674996 100644 --- a/src/com/example/android/apis/graphics/AlphaBitmap.java +++ b/app/src/main/java/io/appium/android/apis/graphics/AlphaBitmap.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.graphics; +package io.appium.android.apis.graphics; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.content.Context; import android.graphics.*; diff --git a/src/com/example/android/apis/graphics/AnimateDrawable.java b/app/src/main/java/io/appium/android/apis/graphics/AnimateDrawable.java similarity index 97% rename from src/com/example/android/apis/graphics/AnimateDrawable.java rename to app/src/main/java/io/appium/android/apis/graphics/AnimateDrawable.java index 330924e..bf66140 100644 --- a/src/com/example/android/apis/graphics/AnimateDrawable.java +++ b/app/src/main/java/io/appium/android/apis/graphics/AnimateDrawable.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.graphics; +package io.appium.android.apis.graphics; import android.graphics.Canvas; import android.graphics.drawable.Drawable; diff --git a/src/com/example/android/apis/graphics/AnimateDrawables.java b/app/src/main/java/io/appium/android/apis/graphics/AnimateDrawables.java similarity index 96% rename from src/com/example/android/apis/graphics/AnimateDrawables.java rename to app/src/main/java/io/appium/android/apis/graphics/AnimateDrawables.java index 0398fbf..f51e875 100644 --- a/src/com/example/android/apis/graphics/AnimateDrawables.java +++ b/app/src/main/java/io/appium/android/apis/graphics/AnimateDrawables.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.graphics; +package io.appium.android.apis.graphics; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.content.Context; import android.graphics.Canvas; diff --git a/src/com/example/android/apis/graphics/Arcs.java b/app/src/main/java/io/appium/android/apis/graphics/Arcs.java similarity index 97% rename from src/com/example/android/apis/graphics/Arcs.java rename to app/src/main/java/io/appium/android/apis/graphics/Arcs.java index 1bd07f9..b30be04 100644 --- a/src/com/example/android/apis/graphics/Arcs.java +++ b/app/src/main/java/io/appium/android/apis/graphics/Arcs.java @@ -14,11 +14,11 @@ * limitations under the License. */ -package com.example.android.apis.graphics; +package io.appium.android.apis.graphics; // Need the following import to get access to the app resources, since this // class is in a sub-package. -//import com.example.android.apis.R; +//import io.appium.android.apis.R; import android.content.Context; import android.graphics.*; diff --git a/src/com/example/android/apis/graphics/BitmapDecode.java b/app/src/main/java/io/appium/android/apis/graphics/BitmapDecode.java similarity index 98% rename from src/com/example/android/apis/graphics/BitmapDecode.java rename to app/src/main/java/io/appium/android/apis/graphics/BitmapDecode.java index 6a8b542..fa341b2 100644 --- a/src/com/example/android/apis/graphics/BitmapDecode.java +++ b/app/src/main/java/io/appium/android/apis/graphics/BitmapDecode.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.graphics; +package io.appium.android.apis.graphics; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.content.Context; import android.graphics.*; diff --git a/src/com/example/android/apis/graphics/BitmapMesh.java b/app/src/main/java/io/appium/android/apis/graphics/BitmapMesh.java similarity index 94% rename from src/com/example/android/apis/graphics/BitmapMesh.java rename to app/src/main/java/io/appium/android/apis/graphics/BitmapMesh.java index 12c79ca..d9079ae 100644 --- a/src/com/example/android/apis/graphics/BitmapMesh.java +++ b/app/src/main/java/io/appium/android/apis/graphics/BitmapMesh.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.graphics; +package io.appium.android.apis.graphics; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.content.Context; import android.graphics.*; @@ -92,12 +92,10 @@ private void warp(float cx, float cy) { float dx = cx - x; float dy = cy - y; float dd = dx*dx + dy*dy; - float d = FloatMath.sqrt(dd); + float d = (float) Math.sqrt(dd); float pull = K / (dd + 0.000001f); - pull /= (d + 0.000001f); - // android.util.Log.d("skia", "index " + i + " dist=" + d + " pull=" + pull); - + // android.util.Log.d("skia", "index " + i + " dist=" + d + " pull=" + pull); if (pull >= 1) { dst[i+0] = cx; dst[i+1] = cy; diff --git a/src/com/example/android/apis/graphics/BitmapPixels.java b/app/src/main/java/io/appium/android/apis/graphics/BitmapPixels.java similarity index 99% rename from src/com/example/android/apis/graphics/BitmapPixels.java rename to app/src/main/java/io/appium/android/apis/graphics/BitmapPixels.java index e9b2167..9e6285e 100644 --- a/src/com/example/android/apis/graphics/BitmapPixels.java +++ b/app/src/main/java/io/appium/android/apis/graphics/BitmapPixels.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.graphics; +package io.appium.android.apis.graphics; import android.content.Context; import android.graphics.*; diff --git a/src/com/example/android/apis/graphics/CameraPreview.java b/app/src/main/java/io/appium/android/apis/graphics/CameraPreview.java similarity index 99% rename from src/com/example/android/apis/graphics/CameraPreview.java rename to app/src/main/java/io/appium/android/apis/graphics/CameraPreview.java index 73d50cb..a62adb3 100644 --- a/src/com/example/android/apis/graphics/CameraPreview.java +++ b/app/src/main/java/io/appium/android/apis/graphics/CameraPreview.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.graphics; +package io.appium.android.apis.graphics; import android.app.Activity; import android.app.AlertDialog; @@ -39,7 +39,7 @@ // Need the following import to get access to the app resources, since this // class is in a sub-package. -import com.example.android.apis.R; +import io.appium.android.apis.R; // ---------------------------------------------------------------------- diff --git a/src/com/example/android/apis/graphics/Clipping.java b/app/src/main/java/io/appium/android/apis/graphics/Clipping.java similarity index 98% rename from src/com/example/android/apis/graphics/Clipping.java rename to app/src/main/java/io/appium/android/apis/graphics/Clipping.java index 42f8be3..e3f1c16 100644 --- a/src/com/example/android/apis/graphics/Clipping.java +++ b/app/src/main/java/io/appium/android/apis/graphics/Clipping.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.graphics; +package io.appium.android.apis.graphics; import android.content.Context; import android.graphics.*; diff --git a/src/com/example/android/apis/graphics/ColorFilters.java b/app/src/main/java/io/appium/android/apis/graphics/ColorFilters.java similarity index 98% rename from src/com/example/android/apis/graphics/ColorFilters.java rename to app/src/main/java/io/appium/android/apis/graphics/ColorFilters.java index 8eb60b5..7d4a32d 100644 --- a/src/com/example/android/apis/graphics/ColorFilters.java +++ b/app/src/main/java/io/appium/android/apis/graphics/ColorFilters.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.graphics; +package io.appium.android.apis.graphics; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.content.Context; diff --git a/src/com/example/android/apis/graphics/ColorMatrixSample.java b/app/src/main/java/io/appium/android/apis/graphics/ColorMatrixSample.java similarity index 98% rename from src/com/example/android/apis/graphics/ColorMatrixSample.java rename to app/src/main/java/io/appium/android/apis/graphics/ColorMatrixSample.java index f438e73..f496007 100644 --- a/src/com/example/android/apis/graphics/ColorMatrixSample.java +++ b/app/src/main/java/io/appium/android/apis/graphics/ColorMatrixSample.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.graphics; +package io.appium.android.apis.graphics; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.content.Context; import android.graphics.*; diff --git a/src/com/example/android/apis/graphics/ColorPickerDialog.java b/app/src/main/java/io/appium/android/apis/graphics/ColorPickerDialog.java similarity index 99% rename from src/com/example/android/apis/graphics/ColorPickerDialog.java rename to app/src/main/java/io/appium/android/apis/graphics/ColorPickerDialog.java index 1c7125f..d3abd7d 100644 --- a/src/com/example/android/apis/graphics/ColorPickerDialog.java +++ b/app/src/main/java/io/appium/android/apis/graphics/ColorPickerDialog.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.graphics; +package io.appium.android.apis.graphics; import android.os.Bundle; import android.app.Dialog; diff --git a/src/com/example/android/apis/graphics/Compass.java b/app/src/main/java/io/appium/android/apis/graphics/Compass.java similarity index 98% rename from src/com/example/android/apis/graphics/Compass.java rename to app/src/main/java/io/appium/android/apis/graphics/Compass.java index 241d98f..0bfce30 100644 --- a/src/com/example/android/apis/graphics/Compass.java +++ b/app/src/main/java/io/appium/android/apis/graphics/Compass.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.graphics; +package io.appium.android.apis.graphics; import android.content.Context; import android.graphics.*; diff --git a/src/com/example/android/apis/graphics/CompressedTextureActivity.java b/app/src/main/java/io/appium/android/apis/graphics/CompressedTextureActivity.java similarity index 98% rename from src/com/example/android/apis/graphics/CompressedTextureActivity.java rename to app/src/main/java/io/appium/android/apis/graphics/CompressedTextureActivity.java index f3b5478..ca77e18 100644 --- a/src/com/example/android/apis/graphics/CompressedTextureActivity.java +++ b/app/src/main/java/io/appium/android/apis/graphics/CompressedTextureActivity.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.graphics; +package io.appium.android.apis.graphics; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; @@ -33,7 +33,7 @@ import android.os.Bundle; import android.util.Log; -import com.example.android.apis.R; +import io.appium.android.apis.R; /** * Demonstrate how to use ETC1 format compressed textures. diff --git a/src/com/example/android/apis/graphics/CreateBitmap.java b/app/src/main/java/io/appium/android/apis/graphics/CreateBitmap.java similarity index 99% rename from src/com/example/android/apis/graphics/CreateBitmap.java rename to app/src/main/java/io/appium/android/apis/graphics/CreateBitmap.java index 61fe9d5..d4556d1 100644 --- a/src/com/example/android/apis/graphics/CreateBitmap.java +++ b/app/src/main/java/io/appium/android/apis/graphics/CreateBitmap.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.graphics; +package io.appium.android.apis.graphics; import android.content.Context; import android.graphics.*; diff --git a/src/com/example/android/apis/graphics/Cube.java b/app/src/main/java/io/appium/android/apis/graphics/Cube.java similarity index 98% rename from src/com/example/android/apis/graphics/Cube.java rename to app/src/main/java/io/appium/android/apis/graphics/Cube.java index 715e175..ee61471 100644 --- a/src/com/example/android/apis/graphics/Cube.java +++ b/app/src/main/java/io/appium/android/apis/graphics/Cube.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.graphics; +package io.appium.android.apis.graphics; import java.nio.ByteBuffer; import java.nio.ByteOrder; diff --git a/src/com/example/android/apis/graphics/CubeMapActivity.java b/app/src/main/java/io/appium/android/apis/graphics/CubeMapActivity.java similarity index 99% rename from src/com/example/android/apis/graphics/CubeMapActivity.java rename to app/src/main/java/io/appium/android/apis/graphics/CubeMapActivity.java index 5e3e0fd..c7d08e3 100644 --- a/src/com/example/android/apis/graphics/CubeMapActivity.java +++ b/app/src/main/java/io/appium/android/apis/graphics/CubeMapActivity.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.graphics; +package io.appium.android.apis.graphics; import java.io.IOException; import java.io.InputStream; @@ -39,7 +39,7 @@ import android.os.Bundle; import android.util.Log; -import com.example.android.apis.R; +import io.appium.android.apis.R; /** * Demonstrate how to use the OES_texture_cube_map extension, available on some diff --git a/src/com/example/android/apis/graphics/CubeRenderer.java b/app/src/main/java/io/appium/android/apis/graphics/CubeRenderer.java similarity index 98% rename from src/com/example/android/apis/graphics/CubeRenderer.java rename to app/src/main/java/io/appium/android/apis/graphics/CubeRenderer.java index b30808c..fd13d8c 100644 --- a/src/com/example/android/apis/graphics/CubeRenderer.java +++ b/app/src/main/java/io/appium/android/apis/graphics/CubeRenderer.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.graphics; +package io.appium.android.apis.graphics; import javax.microedition.khronos.egl.EGLConfig; import javax.microedition.khronos.opengles.GL10; diff --git a/src/com/example/android/apis/graphics/DensityActivity.java b/app/src/main/java/io/appium/android/apis/graphics/DensityActivity.java similarity index 99% rename from src/com/example/android/apis/graphics/DensityActivity.java rename to app/src/main/java/io/appium/android/apis/graphics/DensityActivity.java index 0288ad1..1e995de 100644 --- a/src/com/example/android/apis/graphics/DensityActivity.java +++ b/app/src/main/java/io/appium/android/apis/graphics/DensityActivity.java @@ -14,11 +14,11 @@ * limitations under the License. */ -package com.example.android.apis.graphics; +package io.appium.android.apis.graphics; //Need the following import to get access to the app resources, since this //class is in a sub-package. -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.os.Bundle; diff --git a/src/com/example/android/apis/graphics/DrawPoints.java b/app/src/main/java/io/appium/android/apis/graphics/DrawPoints.java similarity index 98% rename from src/com/example/android/apis/graphics/DrawPoints.java rename to app/src/main/java/io/appium/android/apis/graphics/DrawPoints.java index 21eba0d..0d4997f 100644 --- a/src/com/example/android/apis/graphics/DrawPoints.java +++ b/app/src/main/java/io/appium/android/apis/graphics/DrawPoints.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.graphics; +package io.appium.android.apis.graphics; import android.content.Context; import android.graphics.*; diff --git a/src/com/example/android/apis/graphics/FingerPaint.java b/app/src/main/java/io/appium/android/apis/graphics/FingerPaint.java similarity index 99% rename from src/com/example/android/apis/graphics/FingerPaint.java rename to app/src/main/java/io/appium/android/apis/graphics/FingerPaint.java index 321eb08..2c7442c 100644 --- a/src/com/example/android/apis/graphics/FingerPaint.java +++ b/app/src/main/java/io/appium/android/apis/graphics/FingerPaint.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.graphics; +package io.appium.android.apis.graphics; import android.content.Context; import android.graphics.*; diff --git a/src/com/example/android/apis/graphics/FrameBufferObjectActivity.java b/app/src/main/java/io/appium/android/apis/graphics/FrameBufferObjectActivity.java similarity index 99% rename from src/com/example/android/apis/graphics/FrameBufferObjectActivity.java rename to app/src/main/java/io/appium/android/apis/graphics/FrameBufferObjectActivity.java index e3d4a28..55b6cb6 100644 --- a/src/com/example/android/apis/graphics/FrameBufferObjectActivity.java +++ b/app/src/main/java/io/appium/android/apis/graphics/FrameBufferObjectActivity.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.graphics; +package io.appium.android.apis.graphics; import javax.microedition.khronos.egl.EGLConfig; import javax.microedition.khronos.opengles.GL; diff --git a/src/com/example/android/apis/graphics/GLES20Activity.java b/app/src/main/java/io/appium/android/apis/graphics/GLES20Activity.java similarity index 98% rename from src/com/example/android/apis/graphics/GLES20Activity.java rename to app/src/main/java/io/appium/android/apis/graphics/GLES20Activity.java index f5573cf..3b906f3 100644 --- a/src/com/example/android/apis/graphics/GLES20Activity.java +++ b/app/src/main/java/io/appium/android/apis/graphics/GLES20Activity.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.graphics; +package io.appium.android.apis.graphics; import android.app.Activity; import android.app.ActivityManager; diff --git a/src/com/example/android/apis/graphics/GLES20TriangleRenderer.java b/app/src/main/java/io/appium/android/apis/graphics/GLES20TriangleRenderer.java similarity index 99% rename from src/com/example/android/apis/graphics/GLES20TriangleRenderer.java rename to app/src/main/java/io/appium/android/apis/graphics/GLES20TriangleRenderer.java index 956eb68..8d011d1 100644 --- a/src/com/example/android/apis/graphics/GLES20TriangleRenderer.java +++ b/app/src/main/java/io/appium/android/apis/graphics/GLES20TriangleRenderer.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.graphics; +package io.appium.android.apis.graphics; import java.io.IOException; import java.io.InputStream; @@ -35,7 +35,7 @@ import android.os.SystemClock; import android.util.Log; -import com.example.android.apis.R; +import io.appium.android.apis.R; class GLES20TriangleRenderer implements GLSurfaceView.Renderer { diff --git a/src/com/example/android/apis/graphics/GLSurfaceViewActivity.java b/app/src/main/java/io/appium/android/apis/graphics/GLSurfaceViewActivity.java similarity index 97% rename from src/com/example/android/apis/graphics/GLSurfaceViewActivity.java rename to app/src/main/java/io/appium/android/apis/graphics/GLSurfaceViewActivity.java index f852186..601055f 100644 --- a/src/com/example/android/apis/graphics/GLSurfaceViewActivity.java +++ b/app/src/main/java/io/appium/android/apis/graphics/GLSurfaceViewActivity.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.graphics; +package io.appium.android.apis.graphics; import android.app.Activity; import android.opengl.GLSurfaceView; diff --git a/src/com/example/android/apis/graphics/GradientDrawable1.java b/app/src/main/java/io/appium/android/apis/graphics/GradientDrawable1.java similarity index 92% rename from src/com/example/android/apis/graphics/GradientDrawable1.java rename to app/src/main/java/io/appium/android/apis/graphics/GradientDrawable1.java index fa7a6b7..d3150d5 100644 --- a/src/com/example/android/apis/graphics/GradientDrawable1.java +++ b/app/src/main/java/io/appium/android/apis/graphics/GradientDrawable1.java @@ -14,11 +14,11 @@ * limitations under the License. */ -package com.example.android.apis.graphics; +package io.appium.android.apis.graphics; // Need the following import to get access to the app resources, since this // class is in a sub-package. -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.os.Bundle; diff --git a/src/com/example/android/apis/graphics/GraphicsActivity.java b/app/src/main/java/io/appium/android/apis/graphics/GraphicsActivity.java similarity index 96% rename from src/com/example/android/apis/graphics/GraphicsActivity.java rename to app/src/main/java/io/appium/android/apis/graphics/GraphicsActivity.java index 69682d4..decce89 100644 --- a/src/com/example/android/apis/graphics/GraphicsActivity.java +++ b/app/src/main/java/io/appium/android/apis/graphics/GraphicsActivity.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.graphics; +package io.appium.android.apis.graphics; import android.app.Activity; import android.os.Bundle; diff --git a/src/com/example/android/apis/graphics/Layers.java b/app/src/main/java/io/appium/android/apis/graphics/Layers.java similarity index 73% rename from src/com/example/android/apis/graphics/Layers.java rename to app/src/main/java/io/appium/android/apis/graphics/Layers.java index 7e2a694..408f2eb 100644 --- a/src/com/example/android/apis/graphics/Layers.java +++ b/app/src/main/java/io/appium/android/apis/graphics/Layers.java @@ -14,50 +14,41 @@ * limitations under the License. */ -package com.example.android.apis.graphics; +package io.appium.android.apis.graphics; import android.content.Context; import android.graphics.*; +import android.os.Build; import android.os.Bundle; import android.view.*; public class Layers extends GraphicsActivity { - @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(new SampleView(this)); } - private static class SampleView extends View { - private static final int LAYER_FLAGS = Canvas.MATRIX_SAVE_FLAG | - Canvas.CLIP_SAVE_FLAG | - Canvas.HAS_ALPHA_LAYER_SAVE_FLAG | - Canvas.FULL_COLOR_LAYER_SAVE_FLAG | - Canvas.CLIP_TO_LAYER_SAVE_FLAG; - private Paint mPaint; public SampleView(Context context) { super(context); setFocusable(true); - mPaint = new Paint(); mPaint.setAntiAlias(true); } - @Override protected void onDraw(Canvas canvas) { + @Override + protected void onDraw(Canvas canvas) { canvas.drawColor(Color.WHITE); - canvas.translate(10, 10); - - canvas.saveLayerAlpha(0, 0, 200, 200, 0x88, LAYER_FLAGS); - + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { + canvas.saveLayerAlpha(0, 0, 200, 200, 0x88); + } mPaint.setColor(Color.RED); canvas.drawCircle(75, 75, 75, mPaint); mPaint.setColor(Color.BLUE); canvas.drawCircle(125, 125, 75, mPaint); - canvas.restore(); } } diff --git a/src/com/example/android/apis/graphics/MatrixPaletteActivity.java b/app/src/main/java/io/appium/android/apis/graphics/MatrixPaletteActivity.java similarity index 97% rename from src/com/example/android/apis/graphics/MatrixPaletteActivity.java rename to app/src/main/java/io/appium/android/apis/graphics/MatrixPaletteActivity.java index 520e0e1..7426bad 100644 --- a/src/com/example/android/apis/graphics/MatrixPaletteActivity.java +++ b/app/src/main/java/io/appium/android/apis/graphics/MatrixPaletteActivity.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.graphics; +package io.appium.android.apis.graphics; import android.app.Activity; import android.opengl.GLSurfaceView; diff --git a/src/com/example/android/apis/graphics/MatrixPaletteRenderer.java b/app/src/main/java/io/appium/android/apis/graphics/MatrixPaletteRenderer.java similarity index 99% rename from src/com/example/android/apis/graphics/MatrixPaletteRenderer.java rename to app/src/main/java/io/appium/android/apis/graphics/MatrixPaletteRenderer.java index e0e2db1..79f2c28 100644 --- a/src/com/example/android/apis/graphics/MatrixPaletteRenderer.java +++ b/app/src/main/java/io/appium/android/apis/graphics/MatrixPaletteRenderer.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.graphics; +package io.appium.android.apis.graphics; import java.io.IOException; import java.io.InputStream; @@ -37,7 +37,7 @@ import android.opengl.GLUtils; import android.os.SystemClock; -import com.example.android.apis.R; +import io.appium.android.apis.R; public class MatrixPaletteRenderer implements GLSurfaceView.Renderer{ private Context mContext; diff --git a/src/com/example/android/apis/graphics/MeasureText.java b/app/src/main/java/io/appium/android/apis/graphics/MeasureText.java similarity index 98% rename from src/com/example/android/apis/graphics/MeasureText.java rename to app/src/main/java/io/appium/android/apis/graphics/MeasureText.java index c2d433e..029617e 100644 --- a/src/com/example/android/apis/graphics/MeasureText.java +++ b/app/src/main/java/io/appium/android/apis/graphics/MeasureText.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.graphics; +package io.appium.android.apis.graphics; import android.content.Context; import android.graphics.*; diff --git a/src/com/example/android/apis/graphics/PathEffects.java b/app/src/main/java/io/appium/android/apis/graphics/PathEffects.java similarity index 98% rename from src/com/example/android/apis/graphics/PathEffects.java rename to app/src/main/java/io/appium/android/apis/graphics/PathEffects.java index 2894fa9..3d1190f 100644 --- a/src/com/example/android/apis/graphics/PathEffects.java +++ b/app/src/main/java/io/appium/android/apis/graphics/PathEffects.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.graphics; +package io.appium.android.apis.graphics; import android.content.Context; import android.graphics.*; diff --git a/src/com/example/android/apis/graphics/PathFillTypes.java b/app/src/main/java/io/appium/android/apis/graphics/PathFillTypes.java similarity index 96% rename from src/com/example/android/apis/graphics/PathFillTypes.java rename to app/src/main/java/io/appium/android/apis/graphics/PathFillTypes.java index 10cfc49..ece2e3c 100644 --- a/src/com/example/android/apis/graphics/PathFillTypes.java +++ b/app/src/main/java/io/appium/android/apis/graphics/PathFillTypes.java @@ -14,11 +14,11 @@ * limitations under the License. */ -package com.example.android.apis.graphics; +package io.appium.android.apis.graphics; // Need the following import to get access to the app resources, since this // class is in a sub-package. -//import com.example.android.apis.R; +//import io.appium.android.apis.R; import android.content.Context; import android.graphics.*; diff --git a/src/com/example/android/apis/graphics/Patterns.java b/app/src/main/java/io/appium/android/apis/graphics/Patterns.java similarity index 98% rename from src/com/example/android/apis/graphics/Patterns.java rename to app/src/main/java/io/appium/android/apis/graphics/Patterns.java index 6b6d8e1..707cb23 100644 --- a/src/com/example/android/apis/graphics/Patterns.java +++ b/app/src/main/java/io/appium/android/apis/graphics/Patterns.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.graphics; +package io.appium.android.apis.graphics; import android.content.Context; import android.graphics.*; diff --git a/src/com/example/android/apis/graphics/PictureLayout.java b/app/src/main/java/io/appium/android/apis/graphics/PictureLayout.java similarity index 99% rename from src/com/example/android/apis/graphics/PictureLayout.java rename to app/src/main/java/io/appium/android/apis/graphics/PictureLayout.java index c1d22a8..2c8597f 100644 --- a/src/com/example/android/apis/graphics/PictureLayout.java +++ b/app/src/main/java/io/appium/android/apis/graphics/PictureLayout.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.graphics; +package io.appium.android.apis.graphics; import android.content.Context; import android.graphics.Canvas; diff --git a/src/com/example/android/apis/graphics/PolyToPoly.java b/app/src/main/java/io/appium/android/apis/graphics/PolyToPoly.java similarity index 97% rename from src/com/example/android/apis/graphics/PolyToPoly.java rename to app/src/main/java/io/appium/android/apis/graphics/PolyToPoly.java index a1f1ed4..14cfc73 100644 --- a/src/com/example/android/apis/graphics/PolyToPoly.java +++ b/app/src/main/java/io/appium/android/apis/graphics/PolyToPoly.java @@ -14,11 +14,11 @@ * limitations under the License. */ -package com.example.android.apis.graphics; +package io.appium.android.apis.graphics; // Need the following import to get access to the app resources, since this // class is in a sub-package. -//import com.example.android.apis.R; +//import io.appium.android.apis.R; import android.content.Context; import android.graphics.*; diff --git a/src/com/example/android/apis/graphics/ProxyDrawable.java b/app/src/main/java/io/appium/android/apis/graphics/ProxyDrawable.java similarity index 98% rename from src/com/example/android/apis/graphics/ProxyDrawable.java rename to app/src/main/java/io/appium/android/apis/graphics/ProxyDrawable.java index 635132e..ef2f992 100644 --- a/src/com/example/android/apis/graphics/ProxyDrawable.java +++ b/app/src/main/java/io/appium/android/apis/graphics/ProxyDrawable.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.graphics; +package io.appium.android.apis.graphics; import android.graphics.Canvas; import android.graphics.ColorFilter; diff --git a/src/com/example/android/apis/graphics/PurgeableBitmap.java b/app/src/main/java/io/appium/android/apis/graphics/PurgeableBitmap.java similarity index 98% rename from src/com/example/android/apis/graphics/PurgeableBitmap.java rename to app/src/main/java/io/appium/android/apis/graphics/PurgeableBitmap.java index 14ec8c4..a04ef69 100644 --- a/src/com/example/android/apis/graphics/PurgeableBitmap.java +++ b/app/src/main/java/io/appium/android/apis/graphics/PurgeableBitmap.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.graphics; +package io.appium.android.apis.graphics; import android.app.AlertDialog; import android.content.DialogInterface; diff --git a/src/com/example/android/apis/graphics/PurgeableBitmapView.java b/app/src/main/java/io/appium/android/apis/graphics/PurgeableBitmapView.java similarity index 98% rename from src/com/example/android/apis/graphics/PurgeableBitmapView.java rename to app/src/main/java/io/appium/android/apis/graphics/PurgeableBitmapView.java index 2105628..0e1909e 100644 --- a/src/com/example/android/apis/graphics/PurgeableBitmapView.java +++ b/app/src/main/java/io/appium/android/apis/graphics/PurgeableBitmapView.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.graphics; +package io.appium.android.apis.graphics; import android.content.Context; import android.graphics.Bitmap; diff --git a/src/com/example/android/apis/graphics/Regions.java b/app/src/main/java/io/appium/android/apis/graphics/Regions.java similarity index 98% rename from src/com/example/android/apis/graphics/Regions.java rename to app/src/main/java/io/appium/android/apis/graphics/Regions.java index fc0aa08..546bc55 100644 --- a/src/com/example/android/apis/graphics/Regions.java +++ b/app/src/main/java/io/appium/android/apis/graphics/Regions.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.graphics; +package io.appium.android.apis.graphics; import android.content.Context; import android.graphics.*; diff --git a/src/com/example/android/apis/graphics/RoundRects.java b/app/src/main/java/io/appium/android/apis/graphics/RoundRects.java similarity index 98% rename from src/com/example/android/apis/graphics/RoundRects.java rename to app/src/main/java/io/appium/android/apis/graphics/RoundRects.java index 74c2406..81c9f98 100644 --- a/src/com/example/android/apis/graphics/RoundRects.java +++ b/app/src/main/java/io/appium/android/apis/graphics/RoundRects.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.graphics; +package io.appium.android.apis.graphics; import android.content.Context; import android.graphics.*; diff --git a/src/com/example/android/apis/graphics/ScaleToFit.java b/app/src/main/java/io/appium/android/apis/graphics/ScaleToFit.java similarity index 98% rename from src/com/example/android/apis/graphics/ScaleToFit.java rename to app/src/main/java/io/appium/android/apis/graphics/ScaleToFit.java index 6ffdb5b..73c5168 100644 --- a/src/com/example/android/apis/graphics/ScaleToFit.java +++ b/app/src/main/java/io/appium/android/apis/graphics/ScaleToFit.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.graphics; +package io.appium.android.apis.graphics; import android.content.Context; import android.graphics.*; diff --git a/src/com/example/android/apis/graphics/SensorTest.java b/app/src/main/java/io/appium/android/apis/graphics/SensorTest.java similarity index 99% rename from src/com/example/android/apis/graphics/SensorTest.java rename to app/src/main/java/io/appium/android/apis/graphics/SensorTest.java index 7273cae..3fdf3f0 100644 --- a/src/com/example/android/apis/graphics/SensorTest.java +++ b/app/src/main/java/io/appium/android/apis/graphics/SensorTest.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.graphics; +package io.appium.android.apis.graphics; import android.content.Context; import android.graphics.*; diff --git a/src/com/example/android/apis/graphics/ShapeDrawable1.java b/app/src/main/java/io/appium/android/apis/graphics/ShapeDrawable1.java similarity index 99% rename from src/com/example/android/apis/graphics/ShapeDrawable1.java rename to app/src/main/java/io/appium/android/apis/graphics/ShapeDrawable1.java index 236f4fc..7eb7623 100644 --- a/src/com/example/android/apis/graphics/ShapeDrawable1.java +++ b/app/src/main/java/io/appium/android/apis/graphics/ShapeDrawable1.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.graphics; +package io.appium.android.apis.graphics; import android.content.Context; import android.graphics.*; diff --git a/src/com/example/android/apis/graphics/StaticTriangleRenderer.java b/app/src/main/java/io/appium/android/apis/graphics/StaticTriangleRenderer.java similarity index 99% rename from src/com/example/android/apis/graphics/StaticTriangleRenderer.java rename to app/src/main/java/io/appium/android/apis/graphics/StaticTriangleRenderer.java index 7ef0841..57d4fcf 100644 --- a/src/com/example/android/apis/graphics/StaticTriangleRenderer.java +++ b/app/src/main/java/io/appium/android/apis/graphics/StaticTriangleRenderer.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.graphics; +package io.appium.android.apis.graphics; import static android.opengl.GLES10.*; @@ -36,7 +36,7 @@ import android.opengl.GLUtils; import android.os.SystemClock; -import com.example.android.apis.R; +import io.appium.android.apis.R; /** * A GLSurfaceView.Renderer that uses the Android-specific diff --git a/src/com/example/android/apis/graphics/SurfaceViewOverlay.java b/app/src/main/java/io/appium/android/apis/graphics/SurfaceViewOverlay.java similarity index 97% rename from src/com/example/android/apis/graphics/SurfaceViewOverlay.java rename to app/src/main/java/io/appium/android/apis/graphics/SurfaceViewOverlay.java index 45e5d60..3222035 100644 --- a/src/com/example/android/apis/graphics/SurfaceViewOverlay.java +++ b/app/src/main/java/io/appium/android/apis/graphics/SurfaceViewOverlay.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.graphics; +package io.appium.android.apis.graphics; import android.app.Activity; import android.opengl.GLSurfaceView; @@ -25,7 +25,7 @@ //Need the following import to get access to the app resources, since this //class is in a sub-package. -import com.example.android.apis.R; +import io.appium.android.apis.R; /** * Demonstration of overlays placed on top of a SurfaceView. diff --git a/src/com/example/android/apis/graphics/Sweep.java b/app/src/main/java/io/appium/android/apis/graphics/Sweep.java similarity index 98% rename from src/com/example/android/apis/graphics/Sweep.java rename to app/src/main/java/io/appium/android/apis/graphics/Sweep.java index 5da10cf..08fadca 100644 --- a/src/com/example/android/apis/graphics/Sweep.java +++ b/app/src/main/java/io/appium/android/apis/graphics/Sweep.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.graphics; +package io.appium.android.apis.graphics; import android.content.Context; import android.graphics.*; diff --git a/src/com/example/android/apis/graphics/TextAlign.java b/app/src/main/java/io/appium/android/apis/graphics/TextAlign.java similarity index 99% rename from src/com/example/android/apis/graphics/TextAlign.java rename to app/src/main/java/io/appium/android/apis/graphics/TextAlign.java index 0ecba16..ee5ec4c 100644 --- a/src/com/example/android/apis/graphics/TextAlign.java +++ b/app/src/main/java/io/appium/android/apis/graphics/TextAlign.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.graphics; +package io.appium.android.apis.graphics; import android.content.Context; import android.graphics.*; diff --git a/src/com/example/android/apis/graphics/TouchPaint.java b/app/src/main/java/io/appium/android/apis/graphics/TouchPaint.java similarity index 99% rename from src/com/example/android/apis/graphics/TouchPaint.java rename to app/src/main/java/io/appium/android/apis/graphics/TouchPaint.java index c3c8a6c..6cb6efe 100644 --- a/src/com/example/android/apis/graphics/TouchPaint.java +++ b/app/src/main/java/io/appium/android/apis/graphics/TouchPaint.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.graphics; +package io.appium.android.apis.graphics; import android.content.Context; import android.graphics.Bitmap; @@ -457,7 +457,7 @@ private void paint(PaintMode mode, float x, float y, float pressure, private final RectF mReusableOvalRect = new RectF(); private void drawOval(Canvas canvas, float x, float y, float major, float minor, float orientation, Paint paint) { - canvas.save(Canvas.MATRIX_SAVE_FLAG); + canvas.save(); canvas.rotate((float) (orientation * 180 / Math.PI), x, y); mReusableOvalRect.left = x - minor / 2; mReusableOvalRect.right = x + minor / 2; diff --git a/src/com/example/android/apis/graphics/TouchRotateActivity.java b/app/src/main/java/io/appium/android/apis/graphics/TouchRotateActivity.java similarity index 99% rename from src/com/example/android/apis/graphics/TouchRotateActivity.java rename to app/src/main/java/io/appium/android/apis/graphics/TouchRotateActivity.java index 4133c04..b42a26b 100644 --- a/src/com/example/android/apis/graphics/TouchRotateActivity.java +++ b/app/src/main/java/io/appium/android/apis/graphics/TouchRotateActivity.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.graphics; +package io.appium.android.apis.graphics; import javax.microedition.khronos.egl.EGLConfig; import javax.microedition.khronos.opengles.GL10; diff --git a/src/com/example/android/apis/graphics/TranslucentGLSurfaceViewActivity.java b/app/src/main/java/io/appium/android/apis/graphics/TranslucentGLSurfaceViewActivity.java similarity index 97% rename from src/com/example/android/apis/graphics/TranslucentGLSurfaceViewActivity.java rename to app/src/main/java/io/appium/android/apis/graphics/TranslucentGLSurfaceViewActivity.java index a0bad4b..b06f422 100644 --- a/src/com/example/android/apis/graphics/TranslucentGLSurfaceViewActivity.java +++ b/app/src/main/java/io/appium/android/apis/graphics/TranslucentGLSurfaceViewActivity.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.graphics; +package io.appium.android.apis.graphics; import android.app.Activity; import android.graphics.PixelFormat; diff --git a/src/com/example/android/apis/graphics/TriangleActivity.java b/app/src/main/java/io/appium/android/apis/graphics/TriangleActivity.java similarity index 97% rename from src/com/example/android/apis/graphics/TriangleActivity.java rename to app/src/main/java/io/appium/android/apis/graphics/TriangleActivity.java index f678324..8382412 100644 --- a/src/com/example/android/apis/graphics/TriangleActivity.java +++ b/app/src/main/java/io/appium/android/apis/graphics/TriangleActivity.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.graphics; +package io.appium.android.apis.graphics; import android.app.Activity; import android.opengl.GLSurfaceView; diff --git a/src/com/example/android/apis/graphics/TriangleRenderer.java b/app/src/main/java/io/appium/android/apis/graphics/TriangleRenderer.java similarity index 98% rename from src/com/example/android/apis/graphics/TriangleRenderer.java rename to app/src/main/java/io/appium/android/apis/graphics/TriangleRenderer.java index c41d173..b3a00d1 100644 --- a/src/com/example/android/apis/graphics/TriangleRenderer.java +++ b/app/src/main/java/io/appium/android/apis/graphics/TriangleRenderer.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.graphics; +package io.appium.android.apis.graphics; import java.io.IOException; import java.io.InputStream; @@ -34,7 +34,7 @@ import android.opengl.GLUtils; import android.os.SystemClock; -import com.example.android.apis.R; +import io.appium.android.apis.R; public class TriangleRenderer implements GLSurfaceView.Renderer{ diff --git a/src/com/example/android/apis/graphics/Typefaces.java b/app/src/main/java/io/appium/android/apis/graphics/Typefaces.java similarity index 97% rename from src/com/example/android/apis/graphics/Typefaces.java rename to app/src/main/java/io/appium/android/apis/graphics/Typefaces.java index 08facaa..9699a66 100644 --- a/src/com/example/android/apis/graphics/Typefaces.java +++ b/app/src/main/java/io/appium/android/apis/graphics/Typefaces.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.graphics; +package io.appium.android.apis.graphics; import android.content.Context; import android.graphics.*; diff --git a/src/com/example/android/apis/graphics/UnicodeChart.java b/app/src/main/java/io/appium/android/apis/graphics/UnicodeChart.java similarity index 98% rename from src/com/example/android/apis/graphics/UnicodeChart.java rename to app/src/main/java/io/appium/android/apis/graphics/UnicodeChart.java index 0a2f630..727007a 100644 --- a/src/com/example/android/apis/graphics/UnicodeChart.java +++ b/app/src/main/java/io/appium/android/apis/graphics/UnicodeChart.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.graphics; +package io.appium.android.apis.graphics; import android.content.Context; import android.graphics.*; diff --git a/src/com/example/android/apis/graphics/Vertices.java b/app/src/main/java/io/appium/android/apis/graphics/Vertices.java similarity index 97% rename from src/com/example/android/apis/graphics/Vertices.java rename to app/src/main/java/io/appium/android/apis/graphics/Vertices.java index ac1ab8a..f40dabd 100644 --- a/src/com/example/android/apis/graphics/Vertices.java +++ b/app/src/main/java/io/appium/android/apis/graphics/Vertices.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.graphics; +package io.appium.android.apis.graphics; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.content.Context; import android.graphics.*; diff --git a/src/com/example/android/apis/graphics/WindowSurface.java b/app/src/main/java/io/appium/android/apis/graphics/WindowSurface.java similarity index 99% rename from src/com/example/android/apis/graphics/WindowSurface.java rename to app/src/main/java/io/appium/android/apis/graphics/WindowSurface.java index 305147c..70c5ee2 100644 --- a/src/com/example/android/apis/graphics/WindowSurface.java +++ b/app/src/main/java/io/appium/android/apis/graphics/WindowSurface.java @@ -1,4 +1,4 @@ -package com.example.android.apis.graphics; +package io.appium.android.apis.graphics; import android.app.Activity; import android.graphics.Canvas; diff --git a/src/com/example/android/apis/graphics/Xfermodes.java b/app/src/main/java/io/appium/android/apis/graphics/Xfermodes.java similarity index 91% rename from src/com/example/android/apis/graphics/Xfermodes.java rename to app/src/main/java/io/appium/android/apis/graphics/Xfermodes.java index 54e15e3..85986fa 100644 --- a/src/com/example/android/apis/graphics/Xfermodes.java +++ b/app/src/main/java/io/appium/android/apis/graphics/Xfermodes.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.graphics; +package io.appium.android.apis.graphics; import android.content.Context; import android.graphics.Bitmap; @@ -116,15 +116,11 @@ public SampleView(Context context) { @Override protected void onDraw(Canvas canvas) { canvas.drawColor(Color.WHITE); - Paint labelP = new Paint(Paint.ANTI_ALIAS_FLAG); labelP.setTextAlign(Paint.Align.CENTER); - Paint paint = new Paint(); paint.setFilterBitmap(false); - canvas.translate(15, 35); - int x = 0; int y = 0; for (int i = 0; i < sModes.length; i++) { @@ -132,33 +128,23 @@ public SampleView(Context context) { paint.setStyle(Paint.Style.STROKE); paint.setShader(null); canvas.drawRect(x - 0.5f, y - 0.5f, - x + W + 0.5f, y + H + 0.5f, paint); - + x + W + 0.5f, y + H + 0.5f, paint); // draw the checker-board pattern paint.setStyle(Paint.Style.FILL); paint.setShader(mBG); canvas.drawRect(x, y, x + W, y + H, paint); - // draw the src/dst example into our offscreen bitmap - int sc = canvas.saveLayer(x, y, x + W, y + H, null, - Canvas.MATRIX_SAVE_FLAG | - Canvas.CLIP_SAVE_FLAG | - Canvas.HAS_ALPHA_LAYER_SAVE_FLAG | - Canvas.FULL_COLOR_LAYER_SAVE_FLAG | - Canvas.CLIP_TO_LAYER_SAVE_FLAG); + int sc = canvas.saveLayer(x, y, x + W, y + H, null); canvas.translate(x, y); canvas.drawBitmap(mDstB, 0, 0, paint); paint.setXfermode(sModes[i]); canvas.drawBitmap(mSrcB, 0, 0, paint); paint.setXfermode(null); canvas.restoreToCount(sc); - // draw the label canvas.drawText(sLabels[i], - x + W/2, y - labelP.getTextSize()/2, labelP); - + x + W/2, y - labelP.getTextSize()/2, labelP); x += W + 10; - // wrap around when we've drawn enough for one row if ((i % ROW_MAX) == ROW_MAX - 1) { x = 0; diff --git a/src/com/example/android/apis/graphics/kube/Cube.java b/app/src/main/java/io/appium/android/apis/graphics/kube/Cube.java similarity index 97% rename from src/com/example/android/apis/graphics/kube/Cube.java rename to app/src/main/java/io/appium/android/apis/graphics/kube/Cube.java index 015e19e..856a190 100644 --- a/src/com/example/android/apis/graphics/kube/Cube.java +++ b/app/src/main/java/io/appium/android/apis/graphics/kube/Cube.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.graphics.kube; +package io.appium.android.apis.graphics.kube; public class Cube extends GLShape { diff --git a/src/com/example/android/apis/graphics/kube/GLColor.java b/app/src/main/java/io/appium/android/apis/graphics/kube/GLColor.java similarity index 96% rename from src/com/example/android/apis/graphics/kube/GLColor.java rename to app/src/main/java/io/appium/android/apis/graphics/kube/GLColor.java index 7478cf4..5320077 100644 --- a/src/com/example/android/apis/graphics/kube/GLColor.java +++ b/app/src/main/java/io/appium/android/apis/graphics/kube/GLColor.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.graphics.kube; +package io.appium.android.apis.graphics.kube; public class GLColor { diff --git a/src/com/example/android/apis/graphics/kube/GLFace.java b/app/src/main/java/io/appium/android/apis/graphics/kube/GLFace.java similarity index 97% rename from src/com/example/android/apis/graphics/kube/GLFace.java rename to app/src/main/java/io/appium/android/apis/graphics/kube/GLFace.java index d6e6754..4e9c635 100644 --- a/src/com/example/android/apis/graphics/kube/GLFace.java +++ b/app/src/main/java/io/appium/android/apis/graphics/kube/GLFace.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.graphics.kube; +package io.appium.android.apis.graphics.kube; import android.util.Log; diff --git a/src/com/example/android/apis/graphics/kube/GLShape.java b/app/src/main/java/io/appium/android/apis/graphics/kube/GLShape.java similarity index 98% rename from src/com/example/android/apis/graphics/kube/GLShape.java rename to app/src/main/java/io/appium/android/apis/graphics/kube/GLShape.java index 2b6a824..8f012dc 100644 --- a/src/com/example/android/apis/graphics/kube/GLShape.java +++ b/app/src/main/java/io/appium/android/apis/graphics/kube/GLShape.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.graphics.kube; +package io.appium.android.apis.graphics.kube; import java.nio.ShortBuffer; import java.util.ArrayList; diff --git a/src/com/example/android/apis/graphics/kube/GLVertex.java b/app/src/main/java/io/appium/android/apis/graphics/kube/GLVertex.java similarity index 98% rename from src/com/example/android/apis/graphics/kube/GLVertex.java rename to app/src/main/java/io/appium/android/apis/graphics/kube/GLVertex.java index 6e3bf68..45b0e49 100644 --- a/src/com/example/android/apis/graphics/kube/GLVertex.java +++ b/app/src/main/java/io/appium/android/apis/graphics/kube/GLVertex.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.graphics.kube; +package io.appium.android.apis.graphics.kube; import java.nio.IntBuffer; diff --git a/src/com/example/android/apis/graphics/kube/GLWorld.java b/app/src/main/java/io/appium/android/apis/graphics/kube/GLWorld.java similarity index 98% rename from src/com/example/android/apis/graphics/kube/GLWorld.java rename to app/src/main/java/io/appium/android/apis/graphics/kube/GLWorld.java index dd73174..353be76 100644 --- a/src/com/example/android/apis/graphics/kube/GLWorld.java +++ b/app/src/main/java/io/appium/android/apis/graphics/kube/GLWorld.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.graphics.kube; +package io.appium.android.apis.graphics.kube; import java.nio.ByteBuffer; import java.nio.ByteOrder; diff --git a/src/com/example/android/apis/graphics/kube/Kube.java b/app/src/main/java/io/appium/android/apis/graphics/kube/Kube.java similarity index 99% rename from src/com/example/android/apis/graphics/kube/Kube.java rename to app/src/main/java/io/appium/android/apis/graphics/kube/Kube.java index 9332941..7006a9f 100644 --- a/src/com/example/android/apis/graphics/kube/Kube.java +++ b/app/src/main/java/io/appium/android/apis/graphics/kube/Kube.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.graphics.kube; +package io.appium.android.apis.graphics.kube; import android.app.Activity; import android.os.Bundle; diff --git a/src/com/example/android/apis/graphics/kube/KubeRenderer.java b/app/src/main/java/io/appium/android/apis/graphics/kube/KubeRenderer.java similarity index 98% rename from src/com/example/android/apis/graphics/kube/KubeRenderer.java rename to app/src/main/java/io/appium/android/apis/graphics/kube/KubeRenderer.java index 58b03da..7cf6e6e 100644 --- a/src/com/example/android/apis/graphics/kube/KubeRenderer.java +++ b/app/src/main/java/io/appium/android/apis/graphics/kube/KubeRenderer.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.graphics.kube; +package io.appium.android.apis.graphics.kube; import android.opengl.GLSurfaceView; diff --git a/src/com/example/android/apis/graphics/kube/Layer.java b/app/src/main/java/io/appium/android/apis/graphics/kube/Layer.java similarity index 98% rename from src/com/example/android/apis/graphics/kube/Layer.java rename to app/src/main/java/io/appium/android/apis/graphics/kube/Layer.java index 5e27296..df5549b 100644 --- a/src/com/example/android/apis/graphics/kube/Layer.java +++ b/app/src/main/java/io/appium/android/apis/graphics/kube/Layer.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.graphics.kube; +package io.appium.android.apis.graphics.kube; public class Layer { diff --git a/src/com/example/android/apis/graphics/kube/M4.java b/app/src/main/java/io/appium/android/apis/graphics/kube/M4.java similarity index 97% rename from src/com/example/android/apis/graphics/kube/M4.java rename to app/src/main/java/io/appium/android/apis/graphics/kube/M4.java index b6cc2fe..8dbb67f 100644 --- a/src/com/example/android/apis/graphics/kube/M4.java +++ b/app/src/main/java/io/appium/android/apis/graphics/kube/M4.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.graphics.kube; +package io.appium.android.apis.graphics.kube; /** * diff --git a/src/com/example/android/apis/graphics/spritetext/Grid.java b/app/src/main/java/io/appium/android/apis/graphics/spritetext/Grid.java similarity index 98% rename from src/com/example/android/apis/graphics/spritetext/Grid.java rename to app/src/main/java/io/appium/android/apis/graphics/spritetext/Grid.java index 3b9ebe9..9c72c33 100644 --- a/src/com/example/android/apis/graphics/spritetext/Grid.java +++ b/app/src/main/java/io/appium/android/apis/graphics/spritetext/Grid.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.graphics.spritetext; +package io.appium.android.apis.graphics.spritetext; import java.nio.ByteBuffer; import java.nio.ByteOrder; diff --git a/src/com/example/android/apis/graphics/spritetext/LabelMaker.java b/app/src/main/java/io/appium/android/apis/graphics/spritetext/LabelMaker.java similarity index 99% rename from src/com/example/android/apis/graphics/spritetext/LabelMaker.java rename to app/src/main/java/io/appium/android/apis/graphics/spritetext/LabelMaker.java index 0c48e4a..522420c 100644 --- a/src/com/example/android/apis/graphics/spritetext/LabelMaker.java +++ b/app/src/main/java/io/appium/android/apis/graphics/spritetext/LabelMaker.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.graphics.spritetext; +package io.appium.android.apis.graphics.spritetext; import android.graphics.Bitmap; import android.graphics.Canvas; diff --git a/src/com/example/android/apis/graphics/spritetext/MatrixGrabber.java b/app/src/main/java/io/appium/android/apis/graphics/spritetext/MatrixGrabber.java similarity index 97% rename from src/com/example/android/apis/graphics/spritetext/MatrixGrabber.java rename to app/src/main/java/io/appium/android/apis/graphics/spritetext/MatrixGrabber.java index 87c9076..63593a2 100644 --- a/src/com/example/android/apis/graphics/spritetext/MatrixGrabber.java +++ b/app/src/main/java/io/appium/android/apis/graphics/spritetext/MatrixGrabber.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.graphics.spritetext; +package io.appium.android.apis.graphics.spritetext; import javax.microedition.khronos.opengles.GL10; diff --git a/src/com/example/android/apis/graphics/spritetext/MatrixStack.java b/app/src/main/java/io/appium/android/apis/graphics/spritetext/MatrixStack.java similarity index 99% rename from src/com/example/android/apis/graphics/spritetext/MatrixStack.java rename to app/src/main/java/io/appium/android/apis/graphics/spritetext/MatrixStack.java index a07f614..9e582ad 100644 --- a/src/com/example/android/apis/graphics/spritetext/MatrixStack.java +++ b/app/src/main/java/io/appium/android/apis/graphics/spritetext/MatrixStack.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.graphics.spritetext; +package io.appium.android.apis.graphics.spritetext; import android.opengl.Matrix; diff --git a/src/com/example/android/apis/graphics/spritetext/MatrixTrackingGL.java b/app/src/main/java/io/appium/android/apis/graphics/spritetext/MatrixTrackingGL.java similarity index 99% rename from src/com/example/android/apis/graphics/spritetext/MatrixTrackingGL.java rename to app/src/main/java/io/appium/android/apis/graphics/spritetext/MatrixTrackingGL.java index a02761d..b1bbc98 100644 --- a/src/com/example/android/apis/graphics/spritetext/MatrixTrackingGL.java +++ b/app/src/main/java/io/appium/android/apis/graphics/spritetext/MatrixTrackingGL.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.graphics.spritetext; +package io.appium.android.apis.graphics.spritetext; import android.util.Log; diff --git a/src/com/example/android/apis/graphics/spritetext/NumericSprite.java b/app/src/main/java/io/appium/android/apis/graphics/spritetext/NumericSprite.java similarity index 98% rename from src/com/example/android/apis/graphics/spritetext/NumericSprite.java rename to app/src/main/java/io/appium/android/apis/graphics/spritetext/NumericSprite.java index e70dfda..69baf53 100644 --- a/src/com/example/android/apis/graphics/spritetext/NumericSprite.java +++ b/app/src/main/java/io/appium/android/apis/graphics/spritetext/NumericSprite.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.graphics.spritetext; +package io.appium.android.apis.graphics.spritetext; import javax.microedition.khronos.opengles.GL10; diff --git a/src/com/example/android/apis/graphics/spritetext/Projector.java b/app/src/main/java/io/appium/android/apis/graphics/spritetext/Projector.java similarity index 97% rename from src/com/example/android/apis/graphics/spritetext/Projector.java rename to app/src/main/java/io/appium/android/apis/graphics/spritetext/Projector.java index b52fa3e..6d917d3 100644 --- a/src/com/example/android/apis/graphics/spritetext/Projector.java +++ b/app/src/main/java/io/appium/android/apis/graphics/spritetext/Projector.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.graphics.spritetext; +package io.appium.android.apis.graphics.spritetext; import android.opengl.Matrix; diff --git a/src/com/example/android/apis/graphics/spritetext/SpriteTextActivity.java b/app/src/main/java/io/appium/android/apis/graphics/spritetext/SpriteTextActivity.java similarity index 96% rename from src/com/example/android/apis/graphics/spritetext/SpriteTextActivity.java rename to app/src/main/java/io/appium/android/apis/graphics/spritetext/SpriteTextActivity.java index 1e58dae..651e1de 100644 --- a/src/com/example/android/apis/graphics/spritetext/SpriteTextActivity.java +++ b/app/src/main/java/io/appium/android/apis/graphics/spritetext/SpriteTextActivity.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.graphics.spritetext; +package io.appium.android.apis.graphics.spritetext; import javax.microedition.khronos.opengles.GL; diff --git a/src/com/example/android/apis/graphics/spritetext/SpriteTextRenderer.java b/app/src/main/java/io/appium/android/apis/graphics/spritetext/SpriteTextRenderer.java similarity index 99% rename from src/com/example/android/apis/graphics/spritetext/SpriteTextRenderer.java rename to app/src/main/java/io/appium/android/apis/graphics/spritetext/SpriteTextRenderer.java index 551f7d2..5e929ea 100644 --- a/src/com/example/android/apis/graphics/spritetext/SpriteTextRenderer.java +++ b/app/src/main/java/io/appium/android/apis/graphics/spritetext/SpriteTextRenderer.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.graphics.spritetext; +package io.appium.android.apis.graphics.spritetext; import java.io.IOException; import java.io.InputStream; @@ -36,7 +36,7 @@ import android.os.SystemClock; import android.util.Log; -import com.example.android.apis.R; +import io.appium.android.apis.R; public class SpriteTextRenderer implements GLSurfaceView.Renderer{ diff --git a/src/com/example/android/apis/media/AudioFxDemo.java b/app/src/main/java/io/appium/android/apis/media/AudioFxDemo.java similarity index 99% rename from src/com/example/android/apis/media/AudioFxDemo.java rename to app/src/main/java/io/appium/android/apis/media/AudioFxDemo.java index 7b4db1f..263c6c3 100644 --- a/src/com/example/android/apis/media/AudioFxDemo.java +++ b/app/src/main/java/io/appium/android/apis/media/AudioFxDemo.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.media; +package io.appium.android.apis.media; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.content.Context; diff --git a/src/com/example/android/apis/media/MediaPlayerDemo.java b/app/src/main/java/io/appium/android/apis/media/MediaPlayerDemo.java similarity index 97% rename from src/com/example/android/apis/media/MediaPlayerDemo.java rename to app/src/main/java/io/appium/android/apis/media/MediaPlayerDemo.java index 1303d35..4768064 100644 --- a/src/com/example/android/apis/media/MediaPlayerDemo.java +++ b/app/src/main/java/io/appium/android/apis/media/MediaPlayerDemo.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.media; +package io.appium.android.apis.media; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.content.Intent; import android.os.Bundle; diff --git a/src/com/example/android/apis/media/MediaPlayerDemo_Audio.java b/app/src/main/java/io/appium/android/apis/media/MediaPlayerDemo_Audio.java similarity index 97% rename from src/com/example/android/apis/media/MediaPlayerDemo_Audio.java rename to app/src/main/java/io/appium/android/apis/media/MediaPlayerDemo_Audio.java index b209ce9..7c8af2c 100644 --- a/src/com/example/android/apis/media/MediaPlayerDemo_Audio.java +++ b/app/src/main/java/io/appium/android/apis/media/MediaPlayerDemo_Audio.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.media; +package io.appium.android.apis.media; import android.app.Activity; import android.media.MediaPlayer; @@ -23,7 +23,7 @@ import android.widget.TextView; import android.widget.Toast; -import com.example.android.apis.R; +import io.appium.android.apis.R; public class MediaPlayerDemo_Audio extends Activity { diff --git a/src/com/example/android/apis/media/MediaPlayerDemo_Video.java b/app/src/main/java/io/appium/android/apis/media/MediaPlayerDemo_Video.java similarity index 98% rename from src/com/example/android/apis/media/MediaPlayerDemo_Video.java rename to app/src/main/java/io/appium/android/apis/media/MediaPlayerDemo_Video.java index 9853d67..8a84559 100644 --- a/src/com/example/android/apis/media/MediaPlayerDemo_Video.java +++ b/app/src/main/java/io/appium/android/apis/media/MediaPlayerDemo_Video.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.media; +package io.appium.android.apis.media; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.media.AudioManager; diff --git a/src/com/example/android/apis/media/VideoViewDemo.java b/app/src/main/java/io/appium/android/apis/media/VideoViewDemo.java similarity index 96% rename from src/com/example/android/apis/media/VideoViewDemo.java rename to app/src/main/java/io/appium/android/apis/media/VideoViewDemo.java index e72c077..08c0417 100644 --- a/src/com/example/android/apis/media/VideoViewDemo.java +++ b/app/src/main/java/io/appium/android/apis/media/VideoViewDemo.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.media; +package io.appium.android.apis.media; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.os.Bundle; import android.widget.MediaController; diff --git a/src/com/example/android/apis/nfc/ForegroundDispatch.java b/app/src/main/java/io/appium/android/apis/nfc/ForegroundDispatch.java similarity index 97% rename from src/com/example/android/apis/nfc/ForegroundDispatch.java rename to app/src/main/java/io/appium/android/apis/nfc/ForegroundDispatch.java index d6247cb..e25b6d9 100644 --- a/src/com/example/android/apis/nfc/ForegroundDispatch.java +++ b/app/src/main/java/io/appium/android/apis/nfc/ForegroundDispatch.java @@ -14,9 +14,9 @@ * limitations under the License */ -package com.example.android.apis.nfc; +package io.appium.android.apis.nfc; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.app.PendingIntent; diff --git a/src/com/example/android/apis/nfc/ForegroundNdefPush.java b/app/src/main/java/io/appium/android/apis/nfc/ForegroundNdefPush.java similarity index 95% rename from src/com/example/android/apis/nfc/ForegroundNdefPush.java rename to app/src/main/java/io/appium/android/apis/nfc/ForegroundNdefPush.java index 08eb839..4816a91 100644 --- a/src/com/example/android/apis/nfc/ForegroundNdefPush.java +++ b/app/src/main/java/io/appium/android/apis/nfc/ForegroundNdefPush.java @@ -14,9 +14,9 @@ * limitations under the License */ -package com.example.android.apis.nfc; +package io.appium.android.apis.nfc; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.nfc.NdefMessage; diff --git a/src/com/example/android/apis/nfc/TechFilter.java b/app/src/main/java/io/appium/android/apis/nfc/TechFilter.java similarity index 95% rename from src/com/example/android/apis/nfc/TechFilter.java rename to app/src/main/java/io/appium/android/apis/nfc/TechFilter.java index 10784c2..c6bab37 100644 --- a/src/com/example/android/apis/nfc/TechFilter.java +++ b/app/src/main/java/io/appium/android/apis/nfc/TechFilter.java @@ -14,9 +14,9 @@ * limitations under the License */ -package com.example.android.apis.nfc; +package io.appium.android.apis.nfc; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.content.Intent; diff --git a/src/com/example/android/apis/os/MorseCode.java b/app/src/main/java/io/appium/android/apis/os/MorseCode.java similarity index 95% rename from src/com/example/android/apis/os/MorseCode.java rename to app/src/main/java/io/appium/android/apis/os/MorseCode.java index b8ae074..7fb2bb3 100644 --- a/src/com/example/android/apis/os/MorseCode.java +++ b/app/src/main/java/io/appium/android/apis/os/MorseCode.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.os; +package io.appium.android.apis.os; // Need the following import to get access to the app resources, since this // class is in a sub-package. @@ -25,7 +25,7 @@ import android.os.Vibrator; import android.view.View; import android.widget.TextView; -import com.example.android.apis.R; +import io.appium.android.apis.R; /** *

App that vibrates the vibrator with the Morse Code for a string.

@@ -38,7 +38,7 @@

Source files

*
src/com.example.android.apis/app/SaveRestoreState.javasrc/io.appium.android.apis/app/SaveRestoreState.java The Save/Restore Screen implementation
* - * + * * * * diff --git a/src/com/example/android/apis/os/MorseCodeConverter.java b/app/src/main/java/io/appium/android/apis/os/MorseCodeConverter.java similarity index 99% rename from src/com/example/android/apis/os/MorseCodeConverter.java rename to app/src/main/java/io/appium/android/apis/os/MorseCodeConverter.java index 831cf85..e0b78de 100644 --- a/src/com/example/android/apis/os/MorseCodeConverter.java +++ b/app/src/main/java/io/appium/android/apis/os/MorseCodeConverter.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.os; +package io.appium.android.apis.os; /** Class that implements the text to morse code coversion */ class MorseCodeConverter { diff --git a/src/com/example/android/apis/os/RotationVectorDemo.java b/app/src/main/java/io/appium/android/apis/os/RotationVectorDemo.java similarity index 93% rename from src/com/example/android/apis/os/RotationVectorDemo.java rename to app/src/main/java/io/appium/android/apis/os/RotationVectorDemo.java index 7417809..6332cc7 100644 --- a/src/com/example/android/apis/os/RotationVectorDemo.java +++ b/app/src/main/java/io/appium/android/apis/os/RotationVectorDemo.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.os; +package io.appium.android.apis.os; import java.nio.ByteBuffer; import java.nio.ByteOrder; @@ -89,11 +89,17 @@ public MyRenderer() { Sensor.TYPE_ROTATION_VECTOR); mCube = new Cube(); - // initialize the rotation matrix to identity - mRotationMatrix[ 0] = 1; - mRotationMatrix[ 4] = 1; - mRotationMatrix[ 8] = 1; - mRotationMatrix[12] = 1; + // initialize the rotation matrix to identity,and it's 4x4 row-major matrix + /* + / M[ 0] M[ 1] M[ 2] M[ 3] \ + | M[ 4] M[ 5] M[ 6] M[ 7] | + | M[ 8] M[ 9] M[10] M[11] | + \ M[12] M[13] M[14] M[15] / + */ + mRotationMatrix[0] = 1; + mRotationMatrix[5] = 1; + mRotationMatrix[10] = 1; + mRotationMatrix[15] = 1; } public void start() { diff --git a/src/com/example/android/apis/os/Sensors.java b/app/src/main/java/io/appium/android/apis/os/Sensors.java similarity index 96% rename from src/com/example/android/apis/os/Sensors.java rename to app/src/main/java/io/appium/android/apis/os/Sensors.java index 9863222..b246802 100644 --- a/src/com/example/android/apis/os/Sensors.java +++ b/app/src/main/java/io/appium/android/apis/os/Sensors.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.os; +package io.appium.android.apis.os; import android.app.Activity; import android.content.Context; @@ -42,7 +42,7 @@

Source files

*
src/com.example.android.apis/os/MorseCode.javasrc/io.appium.android.apis/os/MorseCode.javaThe Morse Code Vibrator
* - * + * * * *
src/com.example.android.apis/os/Sensors.javasrc/io.appium.android.apis/os/Sensors.javaSensors
@@ -131,9 +131,9 @@ protected void onDraw(Canvas canvas) { float w = w0 - 32; float x = w0*0.5f; for (int i=0 ; i<3 ; i++) { - canvas.save(Canvas.MATRIX_SAVE_FLAG); + canvas.save(); canvas.translate(x, w*0.5f + 4.0f); - canvas.save(Canvas.MATRIX_SAVE_FLAG); + canvas.save(); paint.setColor(outer); canvas.scale(w, w); canvas.drawOval(mRect, paint); @@ -150,9 +150,9 @@ protected void onDraw(Canvas canvas) { float h = h0 - 32; float y = h0*0.5f; for (int i=0 ; i<3 ; i++) { - canvas.save(Canvas.MATRIX_SAVE_FLAG); + canvas.save(); canvas.translate(mWidth - (h*0.5f + 4.0f), y); - canvas.save(Canvas.MATRIX_SAVE_FLAG); + canvas.save(); paint.setColor(outer); canvas.scale(h, h); canvas.drawOval(mRect, paint); diff --git a/src/com/example/android/apis/os/SmsMessageReceiver.java b/app/src/main/java/io/appium/android/apis/os/SmsMessageReceiver.java similarity index 98% rename from src/com/example/android/apis/os/SmsMessageReceiver.java rename to app/src/main/java/io/appium/android/apis/os/SmsMessageReceiver.java index ec80955..fb64562 100644 --- a/src/com/example/android/apis/os/SmsMessageReceiver.java +++ b/app/src/main/java/io/appium/android/apis/os/SmsMessageReceiver.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.os; +package io.appium.android.apis.os; import android.content.BroadcastReceiver; import android.content.Context; diff --git a/src/com/example/android/apis/os/SmsMessagingDemo.java b/app/src/main/java/io/appium/android/apis/os/SmsMessagingDemo.java similarity index 93% rename from src/com/example/android/apis/os/SmsMessagingDemo.java rename to app/src/main/java/io/appium/android/apis/os/SmsMessagingDemo.java index 94f4e5a..dce8381 100644 --- a/src/com/example/android/apis/os/SmsMessagingDemo.java +++ b/app/src/main/java/io/appium/android/apis/os/SmsMessagingDemo.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.os; +package io.appium.android.apis.os; import java.util.List; @@ -41,15 +41,15 @@ import android.widget.Toast; import android.widget.CompoundButton.OnCheckedChangeListener; -import com.example.android.apis.R; +import io.appium.android.apis.R; public class SmsMessagingDemo extends Activity { /** Tag string for our debug logs */ private static final String TAG = "SmsMessagingDemo"; - public static final String SMS_RECIPIENT_EXTRA = "com.example.android.apis.os.SMS_RECIPIENT"; + public static final String SMS_RECIPIENT_EXTRA = "io.appium.android.apis.os.SMS_RECIPIENT"; - public static final String ACTION_SMS_SENT = "com.example.android.apis.os.SMS_SENT_ACTION"; + public static final String ACTION_SMS_SENT = "io.appium.android.apis.os.SMS_SENT_ACTION"; @Override protected void onCreate(Bundle savedInstanceState) { @@ -68,8 +68,8 @@ protected void onCreate(Bundle savedInstanceState) { CheckBox enableCheckBox = (CheckBox) findViewById(R.id.sms_enable_receiver); final PackageManager pm = this.getPackageManager(); - final ComponentName componentName = new ComponentName("com.example.android.apis", - "com.example.android.apis.os.SmsMessageReceiver"); + final ComponentName componentName = new ComponentName("io.appium.android.apis", + "io.appium.android.apis.os.SmsMessageReceiver"); enableCheckBox.setChecked(pm.getComponentEnabledSetting(componentName) == PackageManager.COMPONENT_ENABLED_STATE_ENABLED); diff --git a/src/com/example/android/apis/os/SmsReceivedDialog.java b/app/src/main/java/io/appium/android/apis/os/SmsReceivedDialog.java similarity index 91% rename from src/com/example/android/apis/os/SmsReceivedDialog.java rename to app/src/main/java/io/appium/android/apis/os/SmsReceivedDialog.java index 0df93a7..d933e8f 100644 --- a/src/com/example/android/apis/os/SmsReceivedDialog.java +++ b/app/src/main/java/io/appium/android/apis/os/SmsReceivedDialog.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.os; +package io.appium.android.apis.os; import java.util.Locale; @@ -28,16 +28,16 @@ import android.speech.tts.TextToSpeech.OnInitListener; import android.util.Log; -import com.example.android.apis.R; +import io.appium.android.apis.R; public class SmsReceivedDialog extends Activity implements OnInitListener { private static final String TAG = "SmsReceivedDialog"; private static final int DIALOG_SHOW_MESSAGE = 1; - public static final String SMS_FROM_ADDRESS_EXTRA = "com.example.android.apis.os.SMS_FROM_ADDRESS"; - public static final String SMS_FROM_DISPLAY_NAME_EXTRA = "com.example.android.apis.os.SMS_FROM_DISPLAY_NAME"; - public static final String SMS_MESSAGE_EXTRA = "com.example.android.apis.os.SMS_MESSAGE"; + public static final String SMS_FROM_ADDRESS_EXTRA = "io.appium.android.apis.os.SMS_FROM_ADDRESS"; + public static final String SMS_FROM_DISPLAY_NAME_EXTRA = "io.appium.android.apis.os.SMS_FROM_DISPLAY_NAME"; + public static final String SMS_MESSAGE_EXTRA = "io.appium.android.apis.os.SMS_MESSAGE"; private TextToSpeech mTts; diff --git a/src/com/example/android/apis/preference/AdvancedPreferences.java b/app/src/main/java/io/appium/android/apis/preference/AdvancedPreferences.java similarity index 97% rename from src/com/example/android/apis/preference/AdvancedPreferences.java rename to app/src/main/java/io/appium/android/apis/preference/AdvancedPreferences.java index 0328b03..f428aa6 100644 --- a/src/com/example/android/apis/preference/AdvancedPreferences.java +++ b/app/src/main/java/io/appium/android/apis/preference/AdvancedPreferences.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.preference; +package io.appium.android.apis.preference; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.content.SharedPreferences; import android.content.SharedPreferences.OnSharedPreferenceChangeListener; diff --git a/src/com/example/android/apis/preference/DefaultValues.java b/app/src/main/java/io/appium/android/apis/preference/DefaultValues.java similarity index 96% rename from src/com/example/android/apis/preference/DefaultValues.java rename to app/src/main/java/io/appium/android/apis/preference/DefaultValues.java index 84cd5b2..af9958b 100644 --- a/src/com/example/android/apis/preference/DefaultValues.java +++ b/app/src/main/java/io/appium/android/apis/preference/DefaultValues.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.preference; +package io.appium.android.apis.preference; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.content.Context; import android.content.SharedPreferences; diff --git a/src/com/example/android/apis/preference/FragmentPreferences.java b/app/src/main/java/io/appium/android/apis/preference/FragmentPreferences.java similarity index 94% rename from src/com/example/android/apis/preference/FragmentPreferences.java rename to app/src/main/java/io/appium/android/apis/preference/FragmentPreferences.java index 714b647..3fdd2b7 100644 --- a/src/com/example/android/apis/preference/FragmentPreferences.java +++ b/app/src/main/java/io/appium/android/apis/preference/FragmentPreferences.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.preference; +package io.appium.android.apis.preference; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.os.Bundle; diff --git a/src/com/example/android/apis/preference/LaunchingPreferences.java b/app/src/main/java/io/appium/android/apis/preference/LaunchingPreferences.java similarity index 97% rename from src/com/example/android/apis/preference/LaunchingPreferences.java rename to app/src/main/java/io/appium/android/apis/preference/LaunchingPreferences.java index 573330c..b7d0e86 100644 --- a/src/com/example/android/apis/preference/LaunchingPreferences.java +++ b/app/src/main/java/io/appium/android/apis/preference/LaunchingPreferences.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.preference; +package io.appium.android.apis.preference; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.content.Intent; diff --git a/src/com/example/android/apis/preference/MyPreference.java b/app/src/main/java/io/appium/android/apis/preference/MyPreference.java similarity index 98% rename from src/com/example/android/apis/preference/MyPreference.java rename to app/src/main/java/io/appium/android/apis/preference/MyPreference.java index aeb8bf9..1710686 100644 --- a/src/com/example/android/apis/preference/MyPreference.java +++ b/app/src/main/java/io/appium/android/apis/preference/MyPreference.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.preference; +package io.appium.android.apis.preference; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.content.Context; import android.content.res.TypedArray; diff --git a/src/com/example/android/apis/preference/PreferenceDependencies.java b/app/src/main/java/io/appium/android/apis/preference/PreferenceDependencies.java similarity index 92% rename from src/com/example/android/apis/preference/PreferenceDependencies.java rename to app/src/main/java/io/appium/android/apis/preference/PreferenceDependencies.java index 3aa4e39..b137f66 100644 --- a/src/com/example/android/apis/preference/PreferenceDependencies.java +++ b/app/src/main/java/io/appium/android/apis/preference/PreferenceDependencies.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.preference; +package io.appium.android.apis.preference; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.os.Bundle; import android.preference.PreferenceActivity; diff --git a/src/com/example/android/apis/preference/PreferenceWithHeaders.java b/app/src/main/java/io/appium/android/apis/preference/PreferenceWithHeaders.java similarity index 97% rename from src/com/example/android/apis/preference/PreferenceWithHeaders.java rename to app/src/main/java/io/appium/android/apis/preference/PreferenceWithHeaders.java index 0190be1..d8791f5 100644 --- a/src/com/example/android/apis/preference/PreferenceWithHeaders.java +++ b/app/src/main/java/io/appium/android/apis/preference/PreferenceWithHeaders.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.preference; +package io.appium.android.apis.preference; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.os.Bundle; import android.preference.PreferenceActivity; diff --git a/src/com/example/android/apis/preference/PreferencesFromCode.java b/app/src/main/java/io/appium/android/apis/preference/PreferencesFromCode.java similarity index 98% rename from src/com/example/android/apis/preference/PreferencesFromCode.java rename to app/src/main/java/io/appium/android/apis/preference/PreferencesFromCode.java index 884991b..9ff1d95 100644 --- a/src/com/example/android/apis/preference/PreferencesFromCode.java +++ b/app/src/main/java/io/appium/android/apis/preference/PreferencesFromCode.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.preference; +package io.appium.android.apis.preference; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.content.Intent; import android.content.res.TypedArray; diff --git a/src/com/example/android/apis/preference/PreferencesFromXml.java b/app/src/main/java/io/appium/android/apis/preference/PreferencesFromXml.java similarity index 92% rename from src/com/example/android/apis/preference/PreferencesFromXml.java rename to app/src/main/java/io/appium/android/apis/preference/PreferencesFromXml.java index 868e33c..6792ee4 100644 --- a/src/com/example/android/apis/preference/PreferencesFromXml.java +++ b/app/src/main/java/io/appium/android/apis/preference/PreferencesFromXml.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.preference; +package io.appium.android.apis.preference; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.os.Bundle; import android.preference.PreferenceActivity; diff --git a/src/com/example/android/apis/preference/SwitchPreference.java b/app/src/main/java/io/appium/android/apis/preference/SwitchPreference.java similarity index 93% rename from src/com/example/android/apis/preference/SwitchPreference.java rename to app/src/main/java/io/appium/android/apis/preference/SwitchPreference.java index 191c6ac..568b13d 100644 --- a/src/com/example/android/apis/preference/SwitchPreference.java +++ b/app/src/main/java/io/appium/android/apis/preference/SwitchPreference.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.preference; +package io.appium.android.apis.preference; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.os.Bundle; import android.preference.PreferenceActivity; diff --git a/app/src/main/java/io/appium/android/apis/text/KeyEventText.java b/app/src/main/java/io/appium/android/apis/text/KeyEventText.java new file mode 100644 index 0000000..9dd81f1 --- /dev/null +++ b/app/src/main/java/io/appium/android/apis/text/KeyEventText.java @@ -0,0 +1,64 @@ +/* + * Copyright (C) 2007 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package io.appium.android.apis.text; + +import io.appium.android.apis.R; + +import android.app.Activity; +import android.os.Bundle; +import android.view.View; +import android.widget.Button; +import android.view.KeyEvent; + +/** + * Using a LogTextBox to display a scrollable text area + * to which text is appended. + * + */ +public class KeyEventText extends Activity { + + private LogTextBox mText; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + + setContentView(R.layout.key_event_text); + + mText = (LogTextBox) findViewById(R.id.text); + + Button clearButton = (Button) findViewById(R.id.clear); + clearButton.setOnClickListener(new View.OnClickListener() { + public void onClick(View v) { + mText.setText(""); + } + }); + } + + @Override + public boolean onKeyUp(int keyCode, KeyEvent event) { + mText.append("[keycode=" + String.valueOf(keyCode) + "] " + event.toString()); + mText.append("\n\n"); + return true; + } + @Override + public boolean onKeyDown(int keyCode, KeyEvent event) { + mText.append("[keycode=" + String.valueOf(keyCode) + "] " + event.toString()); + mText.append("\n\n"); + return true; + } +} diff --git a/src/com/example/android/apis/text/Link.java b/app/src/main/java/io/appium/android/apis/text/Link.java similarity index 97% rename from src/com/example/android/apis/text/Link.java rename to app/src/main/java/io/appium/android/apis/text/Link.java index cc3ed5b..bf09f69 100644 --- a/src/com/example/android/apis/text/Link.java +++ b/app/src/main/java/io/appium/android/apis/text/Link.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.text; +package io.appium.android.apis.text; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.graphics.Typeface; diff --git a/src/com/example/android/apis/text/LogTextBox.java b/app/src/main/java/io/appium/android/apis/text/LogTextBox.java similarity index 97% rename from src/com/example/android/apis/text/LogTextBox.java rename to app/src/main/java/io/appium/android/apis/text/LogTextBox.java index 09957c5..0721a92 100644 --- a/src/com/example/android/apis/text/LogTextBox.java +++ b/app/src/main/java/io/appium/android/apis/text/LogTextBox.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.text; +package io.appium.android.apis.text; import android.widget.TextView; import android.content.Context; diff --git a/src/com/example/android/apis/text/LogTextBox1.java b/app/src/main/java/io/appium/android/apis/text/LogTextBox1.java similarity index 95% rename from src/com/example/android/apis/text/LogTextBox1.java rename to app/src/main/java/io/appium/android/apis/text/LogTextBox1.java index 1813629..a77cfc5 100644 --- a/src/com/example/android/apis/text/LogTextBox1.java +++ b/app/src/main/java/io/appium/android/apis/text/LogTextBox1.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.text; +package io.appium.android.apis.text; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.os.Bundle; diff --git a/src/com/example/android/apis/text/Marquee.java b/app/src/main/java/io/appium/android/apis/text/Marquee.java similarity index 92% rename from src/com/example/android/apis/text/Marquee.java rename to app/src/main/java/io/appium/android/apis/text/Marquee.java index ba82ed6..f5d7464 100644 --- a/src/com/example/android/apis/text/Marquee.java +++ b/app/src/main/java/io/appium/android/apis/text/Marquee.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.text; +package io.appium.android.apis.text; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.os.Bundle; diff --git a/app/src/main/java/io/appium/android/apis/text/Unicode.java b/app/src/main/java/io/appium/android/apis/text/Unicode.java new file mode 100644 index 0000000..fab15d7 --- /dev/null +++ b/app/src/main/java/io/appium/android/apis/text/Unicode.java @@ -0,0 +1,44 @@ +/* + * Copyright (C) 2007 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package io.appium.android.apis.text; + +import android.app.ListActivity; +import android.os.Bundle; +import android.widget.ArrayAdapter; + +/** + * A list view example where the + * data for the list comes from an array of strings. + */ +public class Unicode extends ListActivity { + + @Override + public void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + + // Use an existing ListAdapter that will map an array + // of strings to TextViews + setListAdapter(new ArrayAdapter(this, + android.R.layout.simple_list_item_1, mStrings)); + getListView().setTextFilterEnabled(true); + } + + private String[] mStrings = { + "عربي", // Arabic + "தமிழ்" // Tamil + }; +} diff --git a/src/com/example/android/apis/view/Animation1.java b/app/src/main/java/io/appium/android/apis/view/Animation1.java similarity index 95% rename from src/com/example/android/apis/view/Animation1.java rename to app/src/main/java/io/appium/android/apis/view/Animation1.java index 73563f3..f357bf9 100644 --- a/src/com/example/android/apis/view/Animation1.java +++ b/app/src/main/java/io/appium/android/apis/view/Animation1.java @@ -14,11 +14,11 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; // Need the following import to get access to the app resources, since this // class is in a sub-package. -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.os.Bundle; diff --git a/src/com/example/android/apis/view/Animation2.java b/app/src/main/java/io/appium/android/apis/view/Animation2.java similarity index 97% rename from src/com/example/android/apis/view/Animation2.java rename to app/src/main/java/io/appium/android/apis/view/Animation2.java index 041794e..5cbabb8 100644 --- a/src/com/example/android/apis/view/Animation2.java +++ b/app/src/main/java/io/appium/android/apis/view/Animation2.java @@ -14,11 +14,11 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; // Need the following import to get access to the app resources, since this // class is in a sub-package. -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.os.Bundle; diff --git a/src/com/example/android/apis/view/Animation3.java b/app/src/main/java/io/appium/android/apis/view/Animation3.java similarity index 98% rename from src/com/example/android/apis/view/Animation3.java rename to app/src/main/java/io/appium/android/apis/view/Animation3.java index 2cd7605..dcff36a 100644 --- a/src/com/example/android/apis/view/Animation3.java +++ b/app/src/main/java/io/appium/android/apis/view/Animation3.java @@ -14,11 +14,11 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; // Need the following import to get access to the app resources, since this // class is in a sub-package. -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.os.Bundle; diff --git a/src/com/example/android/apis/view/AutoComplete1.java b/app/src/main/java/io/appium/android/apis/view/AutoComplete1.java similarity index 98% rename from src/com/example/android/apis/view/AutoComplete1.java rename to app/src/main/java/io/appium/android/apis/view/AutoComplete1.java index bec4a5d..09825b4 100644 --- a/src/com/example/android/apis/view/AutoComplete1.java +++ b/app/src/main/java/io/appium/android/apis/view/AutoComplete1.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.widget.ArrayAdapter; diff --git a/src/com/example/android/apis/view/AutoComplete2.java b/app/src/main/java/io/appium/android/apis/view/AutoComplete2.java similarity index 94% rename from src/com/example/android/apis/view/AutoComplete2.java rename to app/src/main/java/io/appium/android/apis/view/AutoComplete2.java index 2dcfc12..8b20fc7 100644 --- a/src/com/example/android/apis/view/AutoComplete2.java +++ b/app/src/main/java/io/appium/android/apis/view/AutoComplete2.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.os.Bundle; diff --git a/src/com/example/android/apis/view/AutoComplete3.java b/app/src/main/java/io/appium/android/apis/view/AutoComplete3.java similarity index 94% rename from src/com/example/android/apis/view/AutoComplete3.java rename to app/src/main/java/io/appium/android/apis/view/AutoComplete3.java index bb9408f..17f6bb3 100644 --- a/src/com/example/android/apis/view/AutoComplete3.java +++ b/app/src/main/java/io/appium/android/apis/view/AutoComplete3.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.os.Bundle; diff --git a/src/com/example/android/apis/view/AutoComplete4.java b/app/src/main/java/io/appium/android/apis/view/AutoComplete4.java similarity index 97% rename from src/com/example/android/apis/view/AutoComplete4.java rename to app/src/main/java/io/appium/android/apis/view/AutoComplete4.java index 3d63a91..9cfb6ba 100644 --- a/src/com/example/android/apis/view/AutoComplete4.java +++ b/app/src/main/java/io/appium/android/apis/view/AutoComplete4.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.content.ContentResolver; diff --git a/src/com/example/android/apis/view/AutoComplete5.java b/app/src/main/java/io/appium/android/apis/view/AutoComplete5.java similarity index 95% rename from src/com/example/android/apis/view/AutoComplete5.java rename to app/src/main/java/io/appium/android/apis/view/AutoComplete5.java index 2009d8a..863bafe 100644 --- a/src/com/example/android/apis/view/AutoComplete5.java +++ b/app/src/main/java/io/appium/android/apis/view/AutoComplete5.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.content.ContentResolver; diff --git a/src/com/example/android/apis/view/AutoComplete6.java b/app/src/main/java/io/appium/android/apis/view/AutoComplete6.java similarity index 98% rename from src/com/example/android/apis/view/AutoComplete6.java rename to app/src/main/java/io/appium/android/apis/view/AutoComplete6.java index 2c28d65..7745652 100644 --- a/src/com/example/android/apis/view/AutoComplete6.java +++ b/app/src/main/java/io/appium/android/apis/view/AutoComplete6.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.widget.ArrayAdapter; diff --git a/src/com/example/android/apis/view/Baseline1.java b/app/src/main/java/io/appium/android/apis/view/Baseline1.java similarity index 92% rename from src/com/example/android/apis/view/Baseline1.java rename to app/src/main/java/io/appium/android/apis/view/Baseline1.java index c77b71f..735c524 100644 --- a/src/com/example/android/apis/view/Baseline1.java +++ b/app/src/main/java/io/appium/android/apis/view/Baseline1.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.os.Bundle; diff --git a/src/com/example/android/apis/view/Baseline2.java b/app/src/main/java/io/appium/android/apis/view/Baseline2.java similarity index 92% rename from src/com/example/android/apis/view/Baseline2.java rename to app/src/main/java/io/appium/android/apis/view/Baseline2.java index 7189fe8..48739fd 100644 --- a/src/com/example/android/apis/view/Baseline2.java +++ b/app/src/main/java/io/appium/android/apis/view/Baseline2.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.os.Bundle; diff --git a/src/com/example/android/apis/view/Baseline3.java b/app/src/main/java/io/appium/android/apis/view/Baseline3.java similarity index 93% rename from src/com/example/android/apis/view/Baseline3.java rename to app/src/main/java/io/appium/android/apis/view/Baseline3.java index 9261c5c..aaee86e 100644 --- a/src/com/example/android/apis/view/Baseline3.java +++ b/app/src/main/java/io/appium/android/apis/view/Baseline3.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.os.Bundle; diff --git a/src/com/example/android/apis/view/Baseline4.java b/app/src/main/java/io/appium/android/apis/view/Baseline4.java similarity index 92% rename from src/com/example/android/apis/view/Baseline4.java rename to app/src/main/java/io/appium/android/apis/view/Baseline4.java index bedfde7..08bde6c 100644 --- a/src/com/example/android/apis/view/Baseline4.java +++ b/app/src/main/java/io/appium/android/apis/view/Baseline4.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.os.Bundle; diff --git a/src/com/example/android/apis/view/Baseline6.java b/app/src/main/java/io/appium/android/apis/view/Baseline6.java similarity index 92% rename from src/com/example/android/apis/view/Baseline6.java rename to app/src/main/java/io/appium/android/apis/view/Baseline6.java index e96e10a..85ab35c 100644 --- a/src/com/example/android/apis/view/Baseline6.java +++ b/app/src/main/java/io/appium/android/apis/view/Baseline6.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.os.Bundle; diff --git a/src/com/example/android/apis/view/Baseline7.java b/app/src/main/java/io/appium/android/apis/view/Baseline7.java similarity index 92% rename from src/com/example/android/apis/view/Baseline7.java rename to app/src/main/java/io/appium/android/apis/view/Baseline7.java index 1795e7d..3bcde35 100644 --- a/src/com/example/android/apis/view/Baseline7.java +++ b/app/src/main/java/io/appium/android/apis/view/Baseline7.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.os.Bundle; diff --git a/src/com/example/android/apis/view/BaselineNested1.java b/app/src/main/java/io/appium/android/apis/view/BaselineNested1.java similarity index 93% rename from src/com/example/android/apis/view/BaselineNested1.java rename to app/src/main/java/io/appium/android/apis/view/BaselineNested1.java index ab7898c..9d5a92b 100644 --- a/src/com/example/android/apis/view/BaselineNested1.java +++ b/app/src/main/java/io/appium/android/apis/view/BaselineNested1.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.os.Bundle; diff --git a/src/com/example/android/apis/view/BaselineNested2.java b/app/src/main/java/io/appium/android/apis/view/BaselineNested2.java similarity index 93% rename from src/com/example/android/apis/view/BaselineNested2.java rename to app/src/main/java/io/appium/android/apis/view/BaselineNested2.java index 1b2c585..d45abe9 100644 --- a/src/com/example/android/apis/view/BaselineNested2.java +++ b/app/src/main/java/io/appium/android/apis/view/BaselineNested2.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.os.Bundle; diff --git a/src/com/example/android/apis/view/BaselineNested3.java b/app/src/main/java/io/appium/android/apis/view/BaselineNested3.java similarity index 93% rename from src/com/example/android/apis/view/BaselineNested3.java rename to app/src/main/java/io/appium/android/apis/view/BaselineNested3.java index 854a10f..4b693c7 100644 --- a/src/com/example/android/apis/view/BaselineNested3.java +++ b/app/src/main/java/io/appium/android/apis/view/BaselineNested3.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.os.Bundle; diff --git a/src/com/example/android/apis/view/Buttons1.java b/app/src/main/java/io/appium/android/apis/view/Buttons1.java similarity index 93% rename from src/com/example/android/apis/view/Buttons1.java rename to app/src/main/java/io/appium/android/apis/view/Buttons1.java index a88ee30..63f15bf 100644 --- a/src/com/example/android/apis/view/Buttons1.java +++ b/app/src/main/java/io/appium/android/apis/view/Buttons1.java @@ -14,11 +14,11 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; // Need the following import to get access to the app resources, since this // class is in a sub-package. -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.os.Bundle; diff --git a/src/com/example/android/apis/view/CheckableFrameLayout.java b/app/src/main/java/io/appium/android/apis/view/CheckableFrameLayout.java similarity index 97% rename from src/com/example/android/apis/view/CheckableFrameLayout.java rename to app/src/main/java/io/appium/android/apis/view/CheckableFrameLayout.java index ecb222f..965d61a 100644 --- a/src/com/example/android/apis/view/CheckableFrameLayout.java +++ b/app/src/main/java/io/appium/android/apis/view/CheckableFrameLayout.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; import android.content.Context; import android.graphics.drawable.ColorDrawable; diff --git a/src/com/example/android/apis/view/Cheeses.java b/app/src/main/java/io/appium/android/apis/view/Cheeses.java similarity index 99% rename from src/com/example/android/apis/view/Cheeses.java rename to app/src/main/java/io/appium/android/apis/view/Cheeses.java index bcf7d61..e415f37 100644 --- a/src/com/example/android/apis/view/Cheeses.java +++ b/app/src/main/java/io/appium/android/apis/view/Cheeses.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; public class Cheeses { diff --git a/src/com/example/android/apis/view/ChronometerDemo.java b/app/src/main/java/io/appium/android/apis/view/ChronometerDemo.java similarity index 97% rename from src/com/example/android/apis/view/ChronometerDemo.java rename to app/src/main/java/io/appium/android/apis/view/ChronometerDemo.java index 752adc6..32b8b30 100644 --- a/src/com/example/android/apis/view/ChronometerDemo.java +++ b/app/src/main/java/io/appium/android/apis/view/ChronometerDemo.java @@ -14,11 +14,11 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; // Need the following import to get access to the app resources, since this // class is in a sub-package. -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.os.Bundle; diff --git a/src/com/example/android/apis/view/ContentBrowserActivity.java b/app/src/main/java/io/appium/android/apis/view/ContentBrowserActivity.java similarity index 99% rename from src/com/example/android/apis/view/ContentBrowserActivity.java rename to app/src/main/java/io/appium/android/apis/view/ContentBrowserActivity.java index 2708408..fda1b30 100644 --- a/src/com/example/android/apis/view/ContentBrowserActivity.java +++ b/app/src/main/java/io/appium/android/apis/view/ContentBrowserActivity.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; import android.app.ActionBar; import android.app.ActionBar.Tab; @@ -42,7 +42,7 @@ import android.widget.Toast; import android.widget.SearchView.OnQueryTextListener; -import com.example.android.apis.R; +import io.appium.android.apis.R; /** * This activity demonstrates how to use system UI flags to implement diff --git a/src/com/example/android/apis/view/Controls1.java b/app/src/main/java/io/appium/android/apis/view/Controls1.java similarity index 96% rename from src/com/example/android/apis/view/Controls1.java rename to app/src/main/java/io/appium/android/apis/view/Controls1.java index 2b5a3f5..bc0a0e3 100644 --- a/src/com/example/android/apis/view/Controls1.java +++ b/app/src/main/java/io/appium/android/apis/view/Controls1.java @@ -14,11 +14,11 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; // Need the following import to get access to the app resources, since this // class is in a sub-package. -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.os.Bundle; diff --git a/src/com/example/android/apis/view/Controls2.java b/app/src/main/java/io/appium/android/apis/view/Controls2.java similarity index 94% rename from src/com/example/android/apis/view/Controls2.java rename to app/src/main/java/io/appium/android/apis/view/Controls2.java index 42bc297..ada727d 100644 --- a/src/com/example/android/apis/view/Controls2.java +++ b/app/src/main/java/io/appium/android/apis/view/Controls2.java @@ -14,6 +14,6 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; public class Controls2 extends Controls1 {} diff --git a/src/com/example/android/apis/view/Controls3.java b/app/src/main/java/io/appium/android/apis/view/Controls3.java similarity index 94% rename from src/com/example/android/apis/view/Controls3.java rename to app/src/main/java/io/appium/android/apis/view/Controls3.java index 407767f..47bd2cb 100644 --- a/src/com/example/android/apis/view/Controls3.java +++ b/app/src/main/java/io/appium/android/apis/view/Controls3.java @@ -14,6 +14,6 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; public class Controls3 extends Controls1 {} diff --git a/src/com/example/android/apis/view/Controls4.java b/app/src/main/java/io/appium/android/apis/view/Controls4.java similarity index 94% rename from src/com/example/android/apis/view/Controls4.java rename to app/src/main/java/io/appium/android/apis/view/Controls4.java index 3dcf310..ad86903 100644 --- a/src/com/example/android/apis/view/Controls4.java +++ b/app/src/main/java/io/appium/android/apis/view/Controls4.java @@ -14,6 +14,6 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; public class Controls4 extends Controls1 {} diff --git a/src/com/example/android/apis/view/Controls5.java b/app/src/main/java/io/appium/android/apis/view/Controls5.java similarity index 94% rename from src/com/example/android/apis/view/Controls5.java rename to app/src/main/java/io/appium/android/apis/view/Controls5.java index dcc515b..86fd1a8 100644 --- a/src/com/example/android/apis/view/Controls5.java +++ b/app/src/main/java/io/appium/android/apis/view/Controls5.java @@ -14,6 +14,6 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; public class Controls5 extends Controls1 {} diff --git a/src/com/example/android/apis/view/Controls6.java b/app/src/main/java/io/appium/android/apis/view/Controls6.java similarity index 94% rename from src/com/example/android/apis/view/Controls6.java rename to app/src/main/java/io/appium/android/apis/view/Controls6.java index 3002259..ad992af 100644 --- a/src/com/example/android/apis/view/Controls6.java +++ b/app/src/main/java/io/appium/android/apis/view/Controls6.java @@ -14,6 +14,6 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; public class Controls6 extends Controls1 {} diff --git a/app/src/main/java/io/appium/android/apis/view/CustomPicker1.java b/app/src/main/java/io/appium/android/apis/view/CustomPicker1.java new file mode 100644 index 0000000..3643ff6 --- /dev/null +++ b/app/src/main/java/io/appium/android/apis/view/CustomPicker1.java @@ -0,0 +1,54 @@ +/* + * Copyright (C) 2007 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package io.appium.android.apis.view; + +// Need the following import to get access to the app resources, since this +// class is in a sub-package. +import io.appium.android.apis.R; + +import android.app.Activity; +import android.os.Bundle; +import android.widget.NumberPicker; +import android.widget.TextView; + +public class CustomPicker1 extends Activity { + + private NumberPicker numberPicker1; + private TextView textView1; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.custom_picker_1); + numberPicker1= (NumberPicker) findViewById(R.id.numberPicker1); + textView1 = (TextView) findViewById(R.id.textView1); + final String values[] = { "परीक्षण", "测试", "テスト", "kupima", "การทดสอบ" }; + + numberPicker1.setMinValue(0); + numberPicker1.setMaxValue(values.length - 1); + numberPicker1.setDisplayedValues(values); + + NumberPicker.OnValueChangeListener myValChangedListener = new NumberPicker.OnValueChangeListener() { + @Override + public void onValueChange(NumberPicker picker, int oldVal, int newVal) { + textView1.setText("Value: " + values[newVal]); + } + }; + + numberPicker1.setOnValueChangedListener(myValChangedListener); + } +} diff --git a/src/com/example/android/apis/view/CustomView1.java b/app/src/main/java/io/appium/android/apis/view/CustomView1.java similarity index 88% rename from src/com/example/android/apis/view/CustomView1.java rename to app/src/main/java/io/appium/android/apis/view/CustomView1.java index 314738e..f41ea5c 100644 --- a/src/com/example/android/apis/view/CustomView1.java +++ b/app/src/main/java/io/appium/android/apis/view/CustomView1.java @@ -14,11 +14,11 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; // Need the following import to get access to the app resources, since this // class is in a sub-package. -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.os.Bundle; @@ -26,7 +26,7 @@ /** * Demonstrates creating a Screen that uses custom views. This example uses - * {@link com.example.android.apis.view.LabelView}, which is defined in + * {@link io.appium.android.apis.view.LabelView}, which is defined in * SDK/src/com/example/android/apis/view/LabelView.java. * */ diff --git a/src/com/example/android/apis/view/DateWidgets1.java b/app/src/main/java/io/appium/android/apis/view/DateWidgets1.java similarity index 86% rename from src/com/example/android/apis/view/DateWidgets1.java rename to app/src/main/java/io/appium/android/apis/view/DateWidgets1.java index f0b1d22..cbd8bbf 100644 --- a/src/com/example/android/apis/view/DateWidgets1.java +++ b/app/src/main/java/io/appium/android/apis/view/DateWidgets1.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.app.DatePickerDialog; @@ -53,6 +53,7 @@ public class DateWidgets1 extends Activity { static final int TIME_DIALOG_ID = 0; static final int DATE_DIALOG_ID = 1; + static final int TIME_DIALOG_SPINNER_ID = 2; @Override protected void onCreate(Bundle savedInstanceState) { @@ -78,12 +79,20 @@ public void onClick(View v) { } }); + Button pickTimeSpinner = (Button) findViewById(R.id.pickTimeSpinner); + pickTimeSpinner.setOnClickListener(new View.OnClickListener() { + + public void onClick(View v) { + showDialog(TIME_DIALOG_SPINNER_ID); + } + }); + final Calendar c = Calendar.getInstance(); mYear = c.get(Calendar.YEAR); mMonth = c.get(Calendar.MONTH); mDay = c.get(Calendar.DAY_OF_MONTH); - mHour = c.get(Calendar.HOUR_OF_DAY); - mMinute = c.get(Calendar.MINUTE); + mHour = 1; + mMinute = 2; updateDisplay(); } @@ -94,6 +103,9 @@ protected Dialog onCreateDialog(int id) { case TIME_DIALOG_ID: return new TimePickerDialog(this, mTimeSetListener, mHour, mMinute, false); + case TIME_DIALOG_SPINNER_ID: + return new TimePickerDialog(this, android.R.style.Theme_Holo_Dialog_NoActionBar, + mTimeSetListener, mHour, mMinute, false); case DATE_DIALOG_ID: return new DatePickerDialog(this, mDateSetListener, @@ -108,6 +120,9 @@ protected void onPrepareDialog(int id, Dialog dialog) { case TIME_DIALOG_ID: ((TimePickerDialog) dialog).updateTime(mHour, mMinute); break; + case TIME_DIALOG_SPINNER_ID: + ((TimePickerDialog) dialog).updateTime(mHour, mMinute); + break; case DATE_DIALOG_ID: ((DatePickerDialog) dialog).updateDate(mYear, mMonth, mDay); break; diff --git a/src/com/example/android/apis/view/DateWidgets2.java b/app/src/main/java/io/appium/android/apis/view/DateWidgets2.java similarity index 96% rename from src/com/example/android/apis/view/DateWidgets2.java rename to app/src/main/java/io/appium/android/apis/view/DateWidgets2.java index 15123a8..821e7b0 100644 --- a/src/com/example/android/apis/view/DateWidgets2.java +++ b/app/src/main/java/io/appium/android/apis/view/DateWidgets2.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.widget.TextView; diff --git a/src/com/example/android/apis/view/DragAndDropDemo.java b/app/src/main/java/io/appium/android/apis/view/DragAndDropDemo.java similarity index 91% rename from src/com/example/android/apis/view/DragAndDropDemo.java rename to app/src/main/java/io/appium/android/apis/view/DragAndDropDemo.java index e1f3b56..6d0f596 100644 --- a/src/com/example/android/apis/view/DragAndDropDemo.java +++ b/app/src/main/java/io/appium/android/apis/view/DragAndDropDemo.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.os.Bundle; @@ -47,6 +47,7 @@ protected void onCreate(Bundle savedInstanceState) { mResultText = (TextView) findViewById(R.id.drag_result_text); mResultText.setOnDragListener(new View.OnDragListener() { public boolean onDrag(View v, DragEvent event) { + mResultText.setText("Dragging..."); final int action = event.getAction(); switch (action) { case DragEvent.ACTION_DRAG_STARTED: { @@ -65,8 +66,9 @@ public boolean onDrag(View v, DragEvent event) { mResultText.setText(dropped ? "Dropped!" : "No drop"); } break; } - return false; + // watch all events, or on Android 7+ we don't get the ACTION_DRAG_ENDED event + return true; } }); } -} \ No newline at end of file +} diff --git a/src/com/example/android/apis/view/DraggableDot.java b/app/src/main/java/io/appium/android/apis/view/DraggableDot.java similarity index 99% rename from src/com/example/android/apis/view/DraggableDot.java rename to app/src/main/java/io/appium/android/apis/view/DraggableDot.java index 5ac4ea5..cd32996 100644 --- a/src/com/example/android/apis/view/DraggableDot.java +++ b/app/src/main/java/io/appium/android/apis/view/DraggableDot.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.content.ClipData; import android.content.Context; diff --git a/src/com/example/android/apis/view/ExpandableList1.java b/app/src/main/java/io/appium/android/apis/view/ExpandableList1.java similarity index 98% rename from src/com/example/android/apis/view/ExpandableList1.java rename to app/src/main/java/io/appium/android/apis/view/ExpandableList1.java index bda366b..99c8f93 100644 --- a/src/com/example/android/apis/view/ExpandableList1.java +++ b/app/src/main/java/io/appium/android/apis/view/ExpandableList1.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; import android.app.ExpandableListActivity; import android.os.Bundle; @@ -32,7 +32,7 @@ import android.widget.Toast; import android.widget.ExpandableListView.ExpandableListContextMenuInfo; -import com.example.android.apis.R; +import io.appium.android.apis.R; /** * Demonstrates expandable lists using a custom {@link ExpandableListAdapter} diff --git a/src/com/example/android/apis/view/ExpandableList2.java b/app/src/main/java/io/appium/android/apis/view/ExpandableList2.java similarity index 99% rename from src/com/example/android/apis/view/ExpandableList2.java rename to app/src/main/java/io/appium/android/apis/view/ExpandableList2.java index 8b2cb43..e192540 100644 --- a/src/com/example/android/apis/view/ExpandableList2.java +++ b/app/src/main/java/io/appium/android/apis/view/ExpandableList2.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; import android.app.ExpandableListActivity; import android.content.AsyncQueryHandler; diff --git a/src/com/example/android/apis/view/ExpandableList3.java b/app/src/main/java/io/appium/android/apis/view/ExpandableList3.java similarity index 98% rename from src/com/example/android/apis/view/ExpandableList3.java rename to app/src/main/java/io/appium/android/apis/view/ExpandableList3.java index 3a298b3..46ca165 100644 --- a/src/com/example/android/apis/view/ExpandableList3.java +++ b/app/src/main/java/io/appium/android/apis/view/ExpandableList3.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; import android.app.ExpandableListActivity; import android.os.Bundle; diff --git a/src/com/example/android/apis/view/Focus1.java b/app/src/main/java/io/appium/android/apis/view/Focus1.java similarity index 95% rename from src/com/example/android/apis/view/Focus1.java rename to app/src/main/java/io/appium/android/apis/view/Focus1.java index 00e19bf..1b25c07 100644 --- a/src/com/example/android/apis/view/Focus1.java +++ b/app/src/main/java/io/appium/android/apis/view/Focus1.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.os.Bundle; diff --git a/src/com/example/android/apis/view/Focus2.java b/app/src/main/java/io/appium/android/apis/view/Focus2.java similarity index 92% rename from src/com/example/android/apis/view/Focus2.java rename to app/src/main/java/io/appium/android/apis/view/Focus2.java index 5ffd847..66af948 100644 --- a/src/com/example/android/apis/view/Focus2.java +++ b/app/src/main/java/io/appium/android/apis/view/Focus2.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.os.Bundle; diff --git a/src/com/example/android/apis/view/Focus3.java b/app/src/main/java/io/appium/android/apis/view/Focus3.java similarity index 94% rename from src/com/example/android/apis/view/Focus3.java rename to app/src/main/java/io/appium/android/apis/view/Focus3.java index c952a64..922de9d 100644 --- a/src/com/example/android/apis/view/Focus3.java +++ b/app/src/main/java/io/appium/android/apis/view/Focus3.java @@ -14,12 +14,12 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; import android.app.Activity; import android.os.Bundle; import android.widget.Button; -import com.example.android.apis.R; +import io.appium.android.apis.R; public class Focus3 extends Activity { private Button mTopButton; diff --git a/src/com/example/android/apis/view/Focus5.java b/app/src/main/java/io/appium/android/apis/view/Focus5.java similarity index 92% rename from src/com/example/android/apis/view/Focus5.java rename to app/src/main/java/io/appium/android/apis/view/Focus5.java index 728671c..349eb57 100644 --- a/src/com/example/android/apis/view/Focus5.java +++ b/app/src/main/java/io/appium/android/apis/view/Focus5.java @@ -14,12 +14,12 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; import android.app.Activity; import android.os.Bundle; import android.widget.Button; -import com.example.android.apis.R; +import io.appium.android.apis.R; public class Focus5 extends Activity { @Override diff --git a/src/com/example/android/apis/view/Gallery1.java b/app/src/main/java/io/appium/android/apis/view/Gallery1.java similarity index 98% rename from src/com/example/android/apis/view/Gallery1.java rename to app/src/main/java/io/appium/android/apis/view/Gallery1.java index b252d5a..e851e98 100644 --- a/src/com/example/android/apis/view/Gallery1.java +++ b/app/src/main/java/io/appium/android/apis/view/Gallery1.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.content.Context; diff --git a/src/com/example/android/apis/view/Gallery2.java b/app/src/main/java/io/appium/android/apis/view/Gallery2.java similarity index 96% rename from src/com/example/android/apis/view/Gallery2.java rename to app/src/main/java/io/appium/android/apis/view/Gallery2.java index ed33451..f57469b 100644 --- a/src/com/example/android/apis/view/Gallery2.java +++ b/app/src/main/java/io/appium/android/apis/view/Gallery2.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; import android.app.Activity; import android.database.Cursor; @@ -26,7 +26,7 @@ // Need the following import to get access to the app resources, since this // class is in a sub-package. -import com.example.android.apis.R; +import io.appium.android.apis.R; public class Gallery2 extends Activity { diff --git a/src/com/example/android/apis/view/GameControllerInput.java b/app/src/main/java/io/appium/android/apis/view/GameControllerInput.java similarity index 99% rename from src/com/example/android/apis/view/GameControllerInput.java rename to app/src/main/java/io/appium/android/apis/view/GameControllerInput.java index ce7c749..9a1f7c5 100644 --- a/src/com/example/android/apis/view/GameControllerInput.java +++ b/app/src/main/java/io/appium/android/apis/view/GameControllerInput.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.content.Context; diff --git a/src/com/example/android/apis/view/GameView.java b/app/src/main/java/io/appium/android/apis/view/GameView.java similarity index 99% rename from src/com/example/android/apis/view/GameView.java rename to app/src/main/java/io/appium/android/apis/view/GameView.java index 2904147..c9ba700 100644 --- a/src/com/example/android/apis/view/GameView.java +++ b/app/src/main/java/io/appium/android/apis/view/GameView.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; import android.content.Context; import android.graphics.Canvas; @@ -690,7 +690,7 @@ public void draw(Canvas canvas) { 255, 63, 255, 63, 0, 255, 0, 0); - canvas.save(Canvas.MATRIX_SAVE_FLAG); + canvas.save(); canvas.translate(mPositionX, mPositionY); canvas.rotate(mHeadingAngle * TO_DEGREES); canvas.drawPath(mPath, mPaint); diff --git a/src/com/example/android/apis/view/Grid1.java b/app/src/main/java/io/appium/android/apis/view/Grid1.java similarity index 97% rename from src/com/example/android/apis/view/Grid1.java rename to app/src/main/java/io/appium/android/apis/view/Grid1.java index d52d4f5..224092e 100644 --- a/src/com/example/android/apis/view/Grid1.java +++ b/app/src/main/java/io/appium/android/apis/view/Grid1.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; import android.app.Activity; import android.content.Intent; @@ -30,7 +30,7 @@ //Need the following import to get access to the app resources, since this //class is in a sub-package. -import com.example.android.apis.R; +import io.appium.android.apis.R; public class Grid1 extends Activity { diff --git a/src/com/example/android/apis/view/Grid2.java b/app/src/main/java/io/appium/android/apis/view/Grid2.java similarity index 99% rename from src/com/example/android/apis/view/Grid2.java rename to app/src/main/java/io/appium/android/apis/view/Grid2.java index 916eccb..135be5b 100644 --- a/src/com/example/android/apis/view/Grid2.java +++ b/app/src/main/java/io/appium/android/apis/view/Grid2.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.content.Context; diff --git a/src/com/example/android/apis/view/Grid3.java b/app/src/main/java/io/appium/android/apis/view/Grid3.java similarity index 98% rename from src/com/example/android/apis/view/Grid3.java rename to app/src/main/java/io/appium/android/apis/view/Grid3.java index 3b853e1..8753684 100644 --- a/src/com/example/android/apis/view/Grid3.java +++ b/app/src/main/java/io/appium/android/apis/view/Grid3.java @@ -13,9 +13,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.content.Context; diff --git a/src/com/example/android/apis/view/GridLayout1.java b/app/src/main/java/io/appium/android/apis/view/GridLayout1.java similarity index 93% rename from src/com/example/android/apis/view/GridLayout1.java rename to app/src/main/java/io/appium/android/apis/view/GridLayout1.java index 3221fa0..405b11c 100644 --- a/src/com/example/android/apis/view/GridLayout1.java +++ b/app/src/main/java/io/appium/android/apis/view/GridLayout1.java @@ -14,11 +14,11 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; import android.app.Activity; import android.os.Bundle; -import com.example.android.apis.R; +import io.appium.android.apis.R; /** * Demonstrates using GridLayout to build the same "Simple Form" as in the diff --git a/src/com/example/android/apis/view/GridLayout2.java b/app/src/main/java/io/appium/android/apis/view/GridLayout2.java similarity index 92% rename from src/com/example/android/apis/view/GridLayout2.java rename to app/src/main/java/io/appium/android/apis/view/GridLayout2.java index 2ad09f4..820aa0a 100644 --- a/src/com/example/android/apis/view/GridLayout2.java +++ b/app/src/main/java/io/appium/android/apis/view/GridLayout2.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.os.Bundle; diff --git a/src/com/example/android/apis/view/GridLayout3.java b/app/src/main/java/io/appium/android/apis/view/GridLayout3.java similarity index 99% rename from src/com/example/android/apis/view/GridLayout3.java rename to app/src/main/java/io/appium/android/apis/view/GridLayout3.java index 48a5546..36e6c18 100644 --- a/src/com/example/android/apis/view/GridLayout3.java +++ b/app/src/main/java/io/appium/android/apis/view/GridLayout3.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; import android.app.Activity; import android.content.Context; diff --git a/src/com/example/android/apis/view/HorizontalScrollView1.java b/app/src/main/java/io/appium/android/apis/view/HorizontalScrollView1.java similarity index 92% rename from src/com/example/android/apis/view/HorizontalScrollView1.java rename to app/src/main/java/io/appium/android/apis/view/HorizontalScrollView1.java index 758ab01..115dde9 100644 --- a/src/com/example/android/apis/view/HorizontalScrollView1.java +++ b/app/src/main/java/io/appium/android/apis/view/HorizontalScrollView1.java @@ -14,13 +14,13 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; import android.app.Activity; import android.os.Bundle; import android.view.View; -import com.example.android.apis.R; +import io.appium.android.apis.R; public class HorizontalScrollView1 extends Activity { diff --git a/src/com/example/android/apis/view/Hover.java b/app/src/main/java/io/appium/android/apis/view/Hover.java similarity index 98% rename from src/com/example/android/apis/view/Hover.java rename to app/src/main/java/io/appium/android/apis/view/Hover.java index 9dc7bad..f7da9e0 100644 --- a/src/com/example/android/apis/view/Hover.java +++ b/app/src/main/java/io/appium/android/apis/view/Hover.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.content.Context; diff --git a/src/com/example/android/apis/view/HoverInterceptorView.java b/app/src/main/java/io/appium/android/apis/view/HoverInterceptorView.java similarity index 97% rename from src/com/example/android/apis/view/HoverInterceptorView.java rename to app/src/main/java/io/appium/android/apis/view/HoverInterceptorView.java index f5a1319..421fcbc 100644 --- a/src/com/example/android/apis/view/HoverInterceptorView.java +++ b/app/src/main/java/io/appium/android/apis/view/HoverInterceptorView.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.content.Context; import android.util.AttributeSet; diff --git a/src/com/example/android/apis/view/ImageButton1.java b/app/src/main/java/io/appium/android/apis/view/ImageButton1.java similarity index 92% rename from src/com/example/android/apis/view/ImageButton1.java rename to app/src/main/java/io/appium/android/apis/view/ImageButton1.java index 5d1fb19..4ea0f71 100644 --- a/src/com/example/android/apis/view/ImageButton1.java +++ b/app/src/main/java/io/appium/android/apis/view/ImageButton1.java @@ -14,13 +14,13 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; import android.app.Activity; import android.os.Bundle; -import com.example.android.apis.R; +import io.appium.android.apis.R; public class ImageButton1 extends Activity { diff --git a/src/com/example/android/apis/view/ImageSwitcher1.java b/app/src/main/java/io/appium/android/apis/view/ImageSwitcher1.java similarity index 98% rename from src/com/example/android/apis/view/ImageSwitcher1.java rename to app/src/main/java/io/appium/android/apis/view/ImageSwitcher1.java index 7f17c82..171efe5 100644 --- a/src/com/example/android/apis/view/ImageSwitcher1.java +++ b/app/src/main/java/io/appium/android/apis/view/ImageSwitcher1.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.content.Context; diff --git a/src/com/example/android/apis/view/ImageView1.java b/app/src/main/java/io/appium/android/apis/view/ImageView1.java similarity index 92% rename from src/com/example/android/apis/view/ImageView1.java rename to app/src/main/java/io/appium/android/apis/view/ImageView1.java index f63b01a..b3373c3 100644 --- a/src/com/example/android/apis/view/ImageView1.java +++ b/app/src/main/java/io/appium/android/apis/view/ImageView1.java @@ -14,12 +14,12 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; import android.app.Activity; import android.os.Bundle; -import com.example.android.apis.R; +import io.appium.android.apis.R; /** diff --git a/src/com/example/android/apis/view/InternalSelectionFocus.java b/app/src/main/java/io/appium/android/apis/view/InternalSelectionFocus.java similarity index 98% rename from src/com/example/android/apis/view/InternalSelectionFocus.java rename to app/src/main/java/io/appium/android/apis/view/InternalSelectionFocus.java index 876af8d..ecff788 100644 --- a/src/com/example/android/apis/view/InternalSelectionFocus.java +++ b/app/src/main/java/io/appium/android/apis/view/InternalSelectionFocus.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; import android.app.Activity; import android.os.Bundle; diff --git a/src/com/example/android/apis/view/InternalSelectionScroll.java b/app/src/main/java/io/appium/android/apis/view/InternalSelectionScroll.java similarity index 98% rename from src/com/example/android/apis/view/InternalSelectionScroll.java rename to app/src/main/java/io/appium/android/apis/view/InternalSelectionScroll.java index 987eaed..3cefe0a 100644 --- a/src/com/example/android/apis/view/InternalSelectionScroll.java +++ b/app/src/main/java/io/appium/android/apis/view/InternalSelectionScroll.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; import android.app.Activity; import android.os.Bundle; diff --git a/src/com/example/android/apis/view/InternalSelectionView.java b/app/src/main/java/io/appium/android/apis/view/InternalSelectionView.java similarity index 99% rename from src/com/example/android/apis/view/InternalSelectionView.java rename to app/src/main/java/io/appium/android/apis/view/InternalSelectionView.java index fe415bd..ab1e767 100644 --- a/src/com/example/android/apis/view/InternalSelectionView.java +++ b/app/src/main/java/io/appium/android/apis/view/InternalSelectionView.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; import android.content.Context; import android.graphics.Canvas; diff --git a/src/com/example/android/apis/view/LabelView.java b/app/src/main/java/io/appium/android/apis/view/LabelView.java similarity index 98% rename from src/com/example/android/apis/view/LabelView.java rename to app/src/main/java/io/appium/android/apis/view/LabelView.java index b0a1f96..b366128 100644 --- a/src/com/example/android/apis/view/LabelView.java +++ b/app/src/main/java/io/appium/android/apis/view/LabelView.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; // Need the following import to get access to the app resources, since this // class is in a sub-package. @@ -25,7 +25,7 @@ import android.util.AttributeSet; import android.view.View; -import com.example.android.apis.R; +import io.appium.android.apis.R; /** diff --git a/src/com/example/android/apis/view/LayoutAnimation1.java b/app/src/main/java/io/appium/android/apis/view/LayoutAnimation1.java similarity index 97% rename from src/com/example/android/apis/view/LayoutAnimation1.java rename to app/src/main/java/io/appium/android/apis/view/LayoutAnimation1.java index 89f932c..65a9cb2 100644 --- a/src/com/example/android/apis/view/LayoutAnimation1.java +++ b/app/src/main/java/io/appium/android/apis/view/LayoutAnimation1.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.content.Intent; diff --git a/src/com/example/android/apis/view/LayoutAnimation2.java b/app/src/main/java/io/appium/android/apis/view/LayoutAnimation2.java similarity index 98% rename from src/com/example/android/apis/view/LayoutAnimation2.java rename to app/src/main/java/io/appium/android/apis/view/LayoutAnimation2.java index 467dc8d..96c6150 100644 --- a/src/com/example/android/apis/view/LayoutAnimation2.java +++ b/app/src/main/java/io/appium/android/apis/view/LayoutAnimation2.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; import android.app.ListActivity; import android.os.Bundle; diff --git a/src/com/example/android/apis/view/LayoutAnimation3.java b/app/src/main/java/io/appium/android/apis/view/LayoutAnimation3.java similarity index 94% rename from src/com/example/android/apis/view/LayoutAnimation3.java rename to app/src/main/java/io/appium/android/apis/view/LayoutAnimation3.java index 5986936..f2964d9 100644 --- a/src/com/example/android/apis/view/LayoutAnimation3.java +++ b/app/src/main/java/io/appium/android/apis/view/LayoutAnimation3.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.ListActivity; import android.os.Bundle; diff --git a/src/com/example/android/apis/view/LayoutAnimation4.java b/app/src/main/java/io/appium/android/apis/view/LayoutAnimation4.java similarity index 97% rename from src/com/example/android/apis/view/LayoutAnimation4.java rename to app/src/main/java/io/appium/android/apis/view/LayoutAnimation4.java index 0ce57f1..7df0672 100644 --- a/src/com/example/android/apis/view/LayoutAnimation4.java +++ b/app/src/main/java/io/appium/android/apis/view/LayoutAnimation4.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.content.Intent; diff --git a/src/com/example/android/apis/view/LayoutAnimation5.java b/app/src/main/java/io/appium/android/apis/view/LayoutAnimation5.java similarity index 97% rename from src/com/example/android/apis/view/LayoutAnimation5.java rename to app/src/main/java/io/appium/android/apis/view/LayoutAnimation5.java index 27c2fa0..307ed1b 100644 --- a/src/com/example/android/apis/view/LayoutAnimation5.java +++ b/app/src/main/java/io/appium/android/apis/view/LayoutAnimation5.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.content.Intent; diff --git a/src/com/example/android/apis/view/LayoutAnimation6.java b/app/src/main/java/io/appium/android/apis/view/LayoutAnimation6.java similarity index 97% rename from src/com/example/android/apis/view/LayoutAnimation6.java rename to app/src/main/java/io/appium/android/apis/view/LayoutAnimation6.java index 5639d25..ff8d60b 100644 --- a/src/com/example/android/apis/view/LayoutAnimation6.java +++ b/app/src/main/java/io/appium/android/apis/view/LayoutAnimation6.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.content.Intent; diff --git a/src/com/example/android/apis/view/LayoutAnimation7.java b/app/src/main/java/io/appium/android/apis/view/LayoutAnimation7.java similarity index 92% rename from src/com/example/android/apis/view/LayoutAnimation7.java rename to app/src/main/java/io/appium/android/apis/view/LayoutAnimation7.java index bfda4a5..b2b84f7 100644 --- a/src/com/example/android/apis/view/LayoutAnimation7.java +++ b/app/src/main/java/io/appium/android/apis/view/LayoutAnimation7.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.os.Bundle; diff --git a/src/com/example/android/apis/view/LinearLayout1.java b/app/src/main/java/io/appium/android/apis/view/LinearLayout1.java similarity index 93% rename from src/com/example/android/apis/view/LinearLayout1.java rename to app/src/main/java/io/appium/android/apis/view/LinearLayout1.java index fcf4924..7f47400 100644 --- a/src/com/example/android/apis/view/LinearLayout1.java +++ b/app/src/main/java/io/appium/android/apis/view/LinearLayout1.java @@ -14,11 +14,11 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; // Need the following import to get access to the app resources, since this // class is in a sub-package. -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.os.Bundle; diff --git a/src/com/example/android/apis/view/LinearLayout10.java b/app/src/main/java/io/appium/android/apis/view/LinearLayout10.java similarity index 93% rename from src/com/example/android/apis/view/LinearLayout10.java rename to app/src/main/java/io/appium/android/apis/view/LinearLayout10.java index eb22d9a..76350db 100644 --- a/src/com/example/android/apis/view/LinearLayout10.java +++ b/app/src/main/java/io/appium/android/apis/view/LinearLayout10.java @@ -14,11 +14,11 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; // Need the following import to get access to the app resources, since this // class is in a sub-package. -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.os.Bundle; diff --git a/src/com/example/android/apis/view/LinearLayout2.java b/app/src/main/java/io/appium/android/apis/view/LinearLayout2.java similarity index 93% rename from src/com/example/android/apis/view/LinearLayout2.java rename to app/src/main/java/io/appium/android/apis/view/LinearLayout2.java index 044f2b6..b2a27f0 100644 --- a/src/com/example/android/apis/view/LinearLayout2.java +++ b/app/src/main/java/io/appium/android/apis/view/LinearLayout2.java @@ -14,11 +14,11 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; // Need the following import to get access to the app resources, since this // class is in a sub-package. -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.os.Bundle; diff --git a/src/com/example/android/apis/view/LinearLayout3.java b/app/src/main/java/io/appium/android/apis/view/LinearLayout3.java similarity index 93% rename from src/com/example/android/apis/view/LinearLayout3.java rename to app/src/main/java/io/appium/android/apis/view/LinearLayout3.java index 2468dcd..f23d161 100644 --- a/src/com/example/android/apis/view/LinearLayout3.java +++ b/app/src/main/java/io/appium/android/apis/view/LinearLayout3.java @@ -14,11 +14,11 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; // Need the following import to get access to the app resources, since this // class is in a sub-package. -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.os.Bundle; diff --git a/src/com/example/android/apis/view/LinearLayout4.java b/app/src/main/java/io/appium/android/apis/view/LinearLayout4.java similarity index 93% rename from src/com/example/android/apis/view/LinearLayout4.java rename to app/src/main/java/io/appium/android/apis/view/LinearLayout4.java index f3d1d1b..fd2321c 100644 --- a/src/com/example/android/apis/view/LinearLayout4.java +++ b/app/src/main/java/io/appium/android/apis/view/LinearLayout4.java @@ -14,11 +14,11 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; // Need the following import to get access to the app resources, since this // class is in a sub-package. -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.os.Bundle; diff --git a/src/com/example/android/apis/view/LinearLayout5.java b/app/src/main/java/io/appium/android/apis/view/LinearLayout5.java similarity index 93% rename from src/com/example/android/apis/view/LinearLayout5.java rename to app/src/main/java/io/appium/android/apis/view/LinearLayout5.java index d3b2a25..85897cc 100644 --- a/src/com/example/android/apis/view/LinearLayout5.java +++ b/app/src/main/java/io/appium/android/apis/view/LinearLayout5.java @@ -14,11 +14,11 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; // Need the following import to get access to the app resources, since this // class is in a sub-package. -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.os.Bundle; diff --git a/src/com/example/android/apis/view/LinearLayout6.java b/app/src/main/java/io/appium/android/apis/view/LinearLayout6.java similarity index 93% rename from src/com/example/android/apis/view/LinearLayout6.java rename to app/src/main/java/io/appium/android/apis/view/LinearLayout6.java index 88745fb..1d8d53e 100644 --- a/src/com/example/android/apis/view/LinearLayout6.java +++ b/app/src/main/java/io/appium/android/apis/view/LinearLayout6.java @@ -14,11 +14,11 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; // Need the following import to get access to the app resources, since this // class is in a sub-package. -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.os.Bundle; diff --git a/src/com/example/android/apis/view/LinearLayout7.java b/app/src/main/java/io/appium/android/apis/view/LinearLayout7.java similarity index 93% rename from src/com/example/android/apis/view/LinearLayout7.java rename to app/src/main/java/io/appium/android/apis/view/LinearLayout7.java index a7edf2e..dee9651 100644 --- a/src/com/example/android/apis/view/LinearLayout7.java +++ b/app/src/main/java/io/appium/android/apis/view/LinearLayout7.java @@ -14,11 +14,11 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; // Need the following import to get access to the app resources, since this // class is in a sub-package. -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.os.Bundle; diff --git a/src/com/example/android/apis/view/LinearLayout8.java b/app/src/main/java/io/appium/android/apis/view/LinearLayout8.java similarity index 97% rename from src/com/example/android/apis/view/LinearLayout8.java rename to app/src/main/java/io/appium/android/apis/view/LinearLayout8.java index 5896782..9459619 100644 --- a/src/com/example/android/apis/view/LinearLayout8.java +++ b/app/src/main/java/io/appium/android/apis/view/LinearLayout8.java @@ -14,11 +14,11 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; //Need the following import to get access to the app resources, since this //class is in a sub-package. -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.os.Bundle; diff --git a/src/com/example/android/apis/view/LinearLayout9.java b/app/src/main/java/io/appium/android/apis/view/LinearLayout9.java similarity index 94% rename from src/com/example/android/apis/view/LinearLayout9.java rename to app/src/main/java/io/appium/android/apis/view/LinearLayout9.java index d120b1e..a436b8e 100644 --- a/src/com/example/android/apis/view/LinearLayout9.java +++ b/app/src/main/java/io/appium/android/apis/view/LinearLayout9.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.os.Bundle; diff --git a/src/com/example/android/apis/view/List1.java b/app/src/main/java/io/appium/android/apis/view/List1.java similarity index 97% rename from src/com/example/android/apis/view/List1.java rename to app/src/main/java/io/appium/android/apis/view/List1.java index f103e51..046fda4 100644 --- a/src/com/example/android/apis/view/List1.java +++ b/app/src/main/java/io/appium/android/apis/view/List1.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; import android.app.ListActivity; import android.os.Bundle; diff --git a/src/com/example/android/apis/view/List10.java b/app/src/main/java/io/appium/android/apis/view/List10.java similarity index 97% rename from src/com/example/android/apis/view/List10.java rename to app/src/main/java/io/appium/android/apis/view/List10.java index 57e0bb1..dcc4b21 100644 --- a/src/com/example/android/apis/view/List10.java +++ b/app/src/main/java/io/appium/android/apis/view/List10.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; import android.app.ListActivity; import android.os.Bundle; diff --git a/src/com/example/android/apis/view/List11.java b/app/src/main/java/io/appium/android/apis/view/List11.java similarity index 97% rename from src/com/example/android/apis/view/List11.java rename to app/src/main/java/io/appium/android/apis/view/List11.java index 71d77e5..79873df 100644 --- a/src/com/example/android/apis/view/List11.java +++ b/app/src/main/java/io/appium/android/apis/view/List11.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; import android.app.ListActivity; import android.os.Bundle; diff --git a/src/com/example/android/apis/view/List12.java b/app/src/main/java/io/appium/android/apis/view/List12.java similarity index 96% rename from src/com/example/android/apis/view/List12.java rename to app/src/main/java/io/appium/android/apis/view/List12.java index 0867fc5..cf610bf 100644 --- a/src/com/example/android/apis/view/List12.java +++ b/app/src/main/java/io/appium/android/apis/view/List12.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; import android.app.ListActivity; import android.os.Bundle; @@ -25,7 +25,7 @@ import android.widget.ArrayAdapter; import android.widget.EditText; -import com.example.android.apis.R; +import io.appium.android.apis.R; import java.util.ArrayList; diff --git a/src/com/example/android/apis/view/List13.java b/app/src/main/java/io/appium/android/apis/view/List13.java similarity index 99% rename from src/com/example/android/apis/view/List13.java rename to app/src/main/java/io/appium/android/apis/view/List13.java index 68179ed..61e43d3 100644 --- a/src/com/example/android/apis/view/List13.java +++ b/app/src/main/java/io/appium/android/apis/view/List13.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; import android.app.ListActivity; import android.content.Context; @@ -28,7 +28,7 @@ import android.widget.TextView; import android.widget.AbsListView.OnScrollListener; -import com.example.android.apis.R; +import io.appium.android.apis.R; /** diff --git a/src/com/example/android/apis/view/List14.java b/app/src/main/java/io/appium/android/apis/view/List14.java similarity index 98% rename from src/com/example/android/apis/view/List14.java rename to app/src/main/java/io/appium/android/apis/view/List14.java index 55f3b22..492b83b 100644 --- a/src/com/example/android/apis/view/List14.java +++ b/app/src/main/java/io/appium/android/apis/view/List14.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; import android.app.ListActivity; import android.content.Context; @@ -27,7 +27,7 @@ import android.widget.ImageView; import android.graphics.BitmapFactory; import android.graphics.Bitmap; -import com.example.android.apis.R; +import io.appium.android.apis.R; /** * Demonstrates how to write an efficient list adapter. The adapter used in this example binds diff --git a/src/com/example/android/apis/view/List15.java b/app/src/main/java/io/appium/android/apis/view/List15.java similarity index 97% rename from src/com/example/android/apis/view/List15.java rename to app/src/main/java/io/appium/android/apis/view/List15.java index 9fa7c64..36df8d2 100644 --- a/src/com/example/android/apis/view/List15.java +++ b/app/src/main/java/io/appium/android/apis/view/List15.java @@ -13,9 +13,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.ListActivity; import android.os.Bundle; diff --git a/src/com/example/android/apis/view/List16.java b/app/src/main/java/io/appium/android/apis/view/List16.java similarity index 97% rename from src/com/example/android/apis/view/List16.java rename to app/src/main/java/io/appium/android/apis/view/List16.java index bfea6ed..92fdc6f 100644 --- a/src/com/example/android/apis/view/List16.java +++ b/app/src/main/java/io/appium/android/apis/view/List16.java @@ -13,9 +13,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.ListActivity; import android.os.Bundle; diff --git a/src/com/example/android/apis/view/List17.java b/app/src/main/java/io/appium/android/apis/view/List17.java similarity index 98% rename from src/com/example/android/apis/view/List17.java rename to app/src/main/java/io/appium/android/apis/view/List17.java index 67fa0bd..7290558 100644 --- a/src/com/example/android/apis/view/List17.java +++ b/app/src/main/java/io/appium/android/apis/view/List17.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; import android.app.ListActivity; import android.os.Bundle; diff --git a/src/com/example/android/apis/view/List2.java b/app/src/main/java/io/appium/android/apis/view/List2.java similarity index 98% rename from src/com/example/android/apis/view/List2.java rename to app/src/main/java/io/appium/android/apis/view/List2.java index 4dca2a7..0c2a894 100644 --- a/src/com/example/android/apis/view/List2.java +++ b/app/src/main/java/io/appium/android/apis/view/List2.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; import android.app.ListActivity; import android.database.Cursor; diff --git a/src/com/example/android/apis/view/List3.java b/app/src/main/java/io/appium/android/apis/view/List3.java similarity index 98% rename from src/com/example/android/apis/view/List3.java rename to app/src/main/java/io/appium/android/apis/view/List3.java index 9c3b4b4..87d52a4 100644 --- a/src/com/example/android/apis/view/List3.java +++ b/app/src/main/java/io/appium/android/apis/view/List3.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; import android.app.ListActivity; import android.database.Cursor; diff --git a/src/com/example/android/apis/view/List4.java b/app/src/main/java/io/appium/android/apis/view/List4.java similarity index 98% rename from src/com/example/android/apis/view/List4.java rename to app/src/main/java/io/appium/android/apis/view/List4.java index 9c18a5d..7dcb032 100644 --- a/src/com/example/android/apis/view/List4.java +++ b/app/src/main/java/io/appium/android/apis/view/List4.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; -import com.example.android.apis.Shakespeare; +import io.appium.android.apis.Shakespeare; import android.app.ListActivity; import android.content.Context; diff --git a/src/com/example/android/apis/view/List5.java b/app/src/main/java/io/appium/android/apis/view/List5.java similarity index 98% rename from src/com/example/android/apis/view/List5.java rename to app/src/main/java/io/appium/android/apis/view/List5.java index 76b4469..d9307b8 100644 --- a/src/com/example/android/apis/view/List5.java +++ b/app/src/main/java/io/appium/android/apis/view/List5.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; // Need the following import to get access to the app resources, since this // class is in a sub-package. diff --git a/src/com/example/android/apis/view/List6.java b/app/src/main/java/io/appium/android/apis/view/List6.java similarity index 99% rename from src/com/example/android/apis/view/List6.java rename to app/src/main/java/io/appium/android/apis/view/List6.java index 2d4536f..4b3cf62 100644 --- a/src/com/example/android/apis/view/List6.java +++ b/app/src/main/java/io/appium/android/apis/view/List6.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; import android.app.ListActivity; import android.content.Context; diff --git a/src/com/example/android/apis/view/List7.java b/app/src/main/java/io/appium/android/apis/view/List7.java similarity index 97% rename from src/com/example/android/apis/view/List7.java rename to app/src/main/java/io/appium/android/apis/view/List7.java index ff5406f..a78f2e1 100644 --- a/src/com/example/android/apis/view/List7.java +++ b/app/src/main/java/io/appium/android/apis/view/List7.java @@ -14,11 +14,11 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; // Need the following import to get access to the app resources, since this // class is in a sub-package. -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.ListActivity; diff --git a/src/com/example/android/apis/view/List8.java b/app/src/main/java/io/appium/android/apis/view/List8.java similarity index 98% rename from src/com/example/android/apis/view/List8.java rename to app/src/main/java/io/appium/android/apis/view/List8.java index 1a54aa7..7f9da8a 100644 --- a/src/com/example/android/apis/view/List8.java +++ b/app/src/main/java/io/appium/android/apis/view/List8.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.ListActivity; import android.content.Context; diff --git a/src/com/example/android/apis/view/List9.java b/app/src/main/java/io/appium/android/apis/view/List9.java similarity index 98% rename from src/com/example/android/apis/view/List9.java rename to app/src/main/java/io/appium/android/apis/view/List9.java index b50bd52..734a5c7 100644 --- a/src/com/example/android/apis/view/List9.java +++ b/app/src/main/java/io/appium/android/apis/view/List9.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.ListActivity; import android.content.Context; diff --git a/src/com/example/android/apis/view/OverscanActivity.java b/app/src/main/java/io/appium/android/apis/view/OverscanActivity.java similarity index 99% rename from src/com/example/android/apis/view/OverscanActivity.java rename to app/src/main/java/io/appium/android/apis/view/OverscanActivity.java index 3097992..8f81036 100644 --- a/src/com/example/android/apis/view/OverscanActivity.java +++ b/app/src/main/java/io/appium/android/apis/view/OverscanActivity.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; import android.app.ActionBar; import android.app.Activity; @@ -44,7 +44,7 @@ import android.widget.Toast; import android.widget.SearchView.OnQueryTextListener; -import com.example.android.apis.R; +import io.appium.android.apis.R; /** * This activity demonstrates some of the available ways to reduce the size or visual contrast of diff --git a/src/com/example/android/apis/view/PopupMenu1.java b/app/src/main/java/io/appium/android/apis/view/PopupMenu1.java similarity index 95% rename from src/com/example/android/apis/view/PopupMenu1.java rename to app/src/main/java/io/appium/android/apis/view/PopupMenu1.java index 161e8e6..390e1c5 100644 --- a/src/com/example/android/apis/view/PopupMenu1.java +++ b/app/src/main/java/io/appium/android/apis/view/PopupMenu1.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; import android.app.Activity; import android.os.Bundle; @@ -23,7 +23,7 @@ import android.widget.PopupMenu; import android.widget.Toast; -import com.example.android.apis.R; +import io.appium.android.apis.R; /** * This demonstrates the use of the PopupMenu class. Clicking the button will inflate and diff --git a/src/com/example/android/apis/view/ProgressBar1.java b/app/src/main/java/io/appium/android/apis/view/ProgressBar1.java similarity index 97% rename from src/com/example/android/apis/view/ProgressBar1.java rename to app/src/main/java/io/appium/android/apis/view/ProgressBar1.java index d9bf360..b755728 100644 --- a/src/com/example/android/apis/view/ProgressBar1.java +++ b/app/src/main/java/io/appium/android/apis/view/ProgressBar1.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.widget.Button; diff --git a/src/com/example/android/apis/view/ProgressBar2.java b/app/src/main/java/io/appium/android/apis/view/ProgressBar2.java similarity index 94% rename from src/com/example/android/apis/view/ProgressBar2.java rename to app/src/main/java/io/appium/android/apis/view/ProgressBar2.java index 1c41b78..cdad325 100644 --- a/src/com/example/android/apis/view/ProgressBar2.java +++ b/app/src/main/java/io/appium/android/apis/view/ProgressBar2.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.os.Bundle; diff --git a/src/com/example/android/apis/view/ProgressBar3.java b/app/src/main/java/io/appium/android/apis/view/ProgressBar3.java similarity index 97% rename from src/com/example/android/apis/view/ProgressBar3.java rename to app/src/main/java/io/appium/android/apis/view/ProgressBar3.java index 285f07b..c30f089 100644 --- a/src/com/example/android/apis/view/ProgressBar3.java +++ b/app/src/main/java/io/appium/android/apis/view/ProgressBar3.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.app.Dialog; diff --git a/src/com/example/android/apis/view/ProgressBar4.java b/app/src/main/java/io/appium/android/apis/view/ProgressBar4.java similarity index 95% rename from src/com/example/android/apis/view/ProgressBar4.java rename to app/src/main/java/io/appium/android/apis/view/ProgressBar4.java index 86188f2..c434994 100644 --- a/src/com/example/android/apis/view/ProgressBar4.java +++ b/app/src/main/java/io/appium/android/apis/view/ProgressBar4.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.os.Bundle; diff --git a/src/com/example/android/apis/view/RadioGroup1.java b/app/src/main/java/io/appium/android/apis/view/RadioGroup1.java similarity index 97% rename from src/com/example/android/apis/view/RadioGroup1.java rename to app/src/main/java/io/appium/android/apis/view/RadioGroup1.java index 4d91192..bc4e889 100644 --- a/src/com/example/android/apis/view/RadioGroup1.java +++ b/app/src/main/java/io/appium/android/apis/view/RadioGroup1.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.os.Bundle; diff --git a/src/com/example/android/apis/view/RatingBar1.java b/app/src/main/java/io/appium/android/apis/view/RatingBar1.java similarity index 97% rename from src/com/example/android/apis/view/RatingBar1.java rename to app/src/main/java/io/appium/android/apis/view/RatingBar1.java index 5fbf6dd..f422c66 100644 --- a/src/com/example/android/apis/view/RatingBar1.java +++ b/app/src/main/java/io/appium/android/apis/view/RatingBar1.java @@ -14,14 +14,14 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; import android.app.Activity; import android.os.Bundle; import android.widget.RatingBar; import android.widget.TextView; -import com.example.android.apis.R; +import io.appium.android.apis.R; /** * Demonstrates how to use a rating bar diff --git a/src/com/example/android/apis/view/RelativeLayout1.java b/app/src/main/java/io/appium/android/apis/view/RelativeLayout1.java similarity index 93% rename from src/com/example/android/apis/view/RelativeLayout1.java rename to app/src/main/java/io/appium/android/apis/view/RelativeLayout1.java index 1c9f824..3d6491a 100644 --- a/src/com/example/android/apis/view/RelativeLayout1.java +++ b/app/src/main/java/io/appium/android/apis/view/RelativeLayout1.java @@ -14,11 +14,11 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; // Need the following import to get access to the app resources, since this // class is in a sub-package. -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.os.Bundle; diff --git a/src/com/example/android/apis/view/RelativeLayout2.java b/app/src/main/java/io/appium/android/apis/view/RelativeLayout2.java similarity index 93% rename from src/com/example/android/apis/view/RelativeLayout2.java rename to app/src/main/java/io/appium/android/apis/view/RelativeLayout2.java index 635d9f3..a9d433a 100644 --- a/src/com/example/android/apis/view/RelativeLayout2.java +++ b/app/src/main/java/io/appium/android/apis/view/RelativeLayout2.java @@ -14,11 +14,11 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; // Need the following import to get access to the app resources, since this // class is in a sub-package. -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.os.Bundle; diff --git a/src/com/example/android/apis/view/RotatingButton.java b/app/src/main/java/io/appium/android/apis/view/RotatingButton.java similarity index 98% rename from src/com/example/android/apis/view/RotatingButton.java rename to app/src/main/java/io/appium/android/apis/view/RotatingButton.java index e92763c..4af20d5 100644 --- a/src/com/example/android/apis/view/RotatingButton.java +++ b/app/src/main/java/io/appium/android/apis/view/RotatingButton.java @@ -14,11 +14,11 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; // Need the following import to get access to the app resources, since this // class is in a sub-package. -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.os.Bundle; diff --git a/src/com/example/android/apis/view/ScrollBar1.java b/app/src/main/java/io/appium/android/apis/view/ScrollBar1.java similarity index 92% rename from src/com/example/android/apis/view/ScrollBar1.java rename to app/src/main/java/io/appium/android/apis/view/ScrollBar1.java index 0b3c19a..a4ad873 100644 --- a/src/com/example/android/apis/view/ScrollBar1.java +++ b/app/src/main/java/io/appium/android/apis/view/ScrollBar1.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.os.Bundle; diff --git a/src/com/example/android/apis/view/ScrollBar2.java b/app/src/main/java/io/appium/android/apis/view/ScrollBar2.java similarity index 92% rename from src/com/example/android/apis/view/ScrollBar2.java rename to app/src/main/java/io/appium/android/apis/view/ScrollBar2.java index 09a8bb0..e49d357 100644 --- a/src/com/example/android/apis/view/ScrollBar2.java +++ b/app/src/main/java/io/appium/android/apis/view/ScrollBar2.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.os.Bundle; diff --git a/src/com/example/android/apis/view/ScrollBar3.java b/app/src/main/java/io/appium/android/apis/view/ScrollBar3.java similarity index 93% rename from src/com/example/android/apis/view/ScrollBar3.java rename to app/src/main/java/io/appium/android/apis/view/ScrollBar3.java index 74c5876..e1cd88a 100644 --- a/src/com/example/android/apis/view/ScrollBar3.java +++ b/app/src/main/java/io/appium/android/apis/view/ScrollBar3.java @@ -14,13 +14,13 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; import android.app.Activity; import android.os.Bundle; import android.view.View; -import com.example.android.apis.R; +import io.appium.android.apis.R; public class ScrollBar3 extends Activity { diff --git a/src/com/example/android/apis/view/ScrollView1.java b/app/src/main/java/io/appium/android/apis/view/ScrollView1.java similarity index 93% rename from src/com/example/android/apis/view/ScrollView1.java rename to app/src/main/java/io/appium/android/apis/view/ScrollView1.java index b3a903a..c89b12f 100644 --- a/src/com/example/android/apis/view/ScrollView1.java +++ b/app/src/main/java/io/appium/android/apis/view/ScrollView1.java @@ -14,11 +14,11 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; // Need the following import to get access to the app resources, since this // class is in a sub-package. -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.os.Bundle; diff --git a/src/com/example/android/apis/view/ScrollView2.java b/app/src/main/java/io/appium/android/apis/view/ScrollView2.java similarity index 95% rename from src/com/example/android/apis/view/ScrollView2.java rename to app/src/main/java/io/appium/android/apis/view/ScrollView2.java index 02fcd0e..1cedde2 100644 --- a/src/com/example/android/apis/view/ScrollView2.java +++ b/app/src/main/java/io/appium/android/apis/view/ScrollView2.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.os.Bundle; diff --git a/src/com/example/android/apis/view/SearchViewActionBar.java b/app/src/main/java/io/appium/android/apis/view/SearchViewActionBar.java similarity index 98% rename from src/com/example/android/apis/view/SearchViewActionBar.java rename to app/src/main/java/io/appium/android/apis/view/SearchViewActionBar.java index bffeb96..14391cc 100644 --- a/src/com/example/android/apis/view/SearchViewActionBar.java +++ b/app/src/main/java/io/appium/android/apis/view/SearchViewActionBar.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.app.SearchManager; diff --git a/src/com/example/android/apis/view/SearchViewAlwaysVisible.java b/app/src/main/java/io/appium/android/apis/view/SearchViewAlwaysVisible.java similarity index 94% rename from src/com/example/android/apis/view/SearchViewAlwaysVisible.java rename to app/src/main/java/io/appium/android/apis/view/SearchViewAlwaysVisible.java index 8c67563..0586f6c 100644 --- a/src/com/example/android/apis/view/SearchViewAlwaysVisible.java +++ b/app/src/main/java/io/appium/android/apis/view/SearchViewAlwaysVisible.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.app.SearchManager; diff --git a/src/com/example/android/apis/view/SearchViewFilterMode.java b/app/src/main/java/io/appium/android/apis/view/SearchViewFilterMode.java similarity index 97% rename from src/com/example/android/apis/view/SearchViewFilterMode.java rename to app/src/main/java/io/appium/android/apis/view/SearchViewFilterMode.java index 1764b2e..dc98e44 100644 --- a/src/com/example/android/apis/view/SearchViewFilterMode.java +++ b/app/src/main/java/io/appium/android/apis/view/SearchViewFilterMode.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.os.Bundle; diff --git a/src/com/example/android/apis/view/SecureView.java b/app/src/main/java/io/appium/android/apis/view/SecureView.java similarity index 98% rename from src/com/example/android/apis/view/SecureView.java rename to app/src/main/java/io/appium/android/apis/view/SecureView.java index b9aaeab..265179c 100644 --- a/src/com/example/android/apis/view/SecureView.java +++ b/app/src/main/java/io/appium/android/apis/view/SecureView.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.app.AlertDialog; diff --git a/src/com/example/android/apis/view/SecureViewOverlay.java b/app/src/main/java/io/appium/android/apis/view/SecureViewOverlay.java similarity index 97% rename from src/com/example/android/apis/view/SecureViewOverlay.java rename to app/src/main/java/io/appium/android/apis/view/SecureViewOverlay.java index 2095fee..11170af 100644 --- a/src/com/example/android/apis/view/SecureViewOverlay.java +++ b/app/src/main/java/io/appium/android/apis/view/SecureViewOverlay.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.content.Context; import android.util.AttributeSet; diff --git a/src/com/example/android/apis/view/SeekBar1.java b/app/src/main/java/io/appium/android/apis/view/SeekBar1.java similarity index 96% rename from src/com/example/android/apis/view/SeekBar1.java rename to app/src/main/java/io/appium/android/apis/view/SeekBar1.java index 15bb013..787b9f2 100644 --- a/src/com/example/android/apis/view/SeekBar1.java +++ b/app/src/main/java/io/appium/android/apis/view/SeekBar1.java @@ -14,14 +14,14 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; import android.app.Activity; import android.os.Bundle; import android.widget.SeekBar; import android.widget.TextView; -import com.example.android.apis.R; +import io.appium.android.apis.R; /** diff --git a/src/com/example/android/apis/view/Spinner1.java b/app/src/main/java/io/appium/android/apis/view/Spinner1.java similarity index 97% rename from src/com/example/android/apis/view/Spinner1.java rename to app/src/main/java/io/appium/android/apis/view/Spinner1.java index c5b4bd9..4591414 100644 --- a/src/com/example/android/apis/view/Spinner1.java +++ b/app/src/main/java/io/appium/android/apis/view/Spinner1.java @@ -14,11 +14,11 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; // Need the following import to get access to the app resources, since this // class is in a sub-package. -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.os.Bundle; diff --git a/src/com/example/android/apis/view/SplitTouchView.java b/app/src/main/java/io/appium/android/apis/view/SplitTouchView.java similarity index 96% rename from src/com/example/android/apis/view/SplitTouchView.java rename to app/src/main/java/io/appium/android/apis/view/SplitTouchView.java index 4b7b5c9..50e421c 100644 --- a/src/com/example/android/apis/view/SplitTouchView.java +++ b/app/src/main/java/io/appium/android/apis/view/SplitTouchView.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.os.Bundle; diff --git a/src/com/example/android/apis/view/Switches.java b/app/src/main/java/io/appium/android/apis/view/Switches.java similarity index 95% rename from src/com/example/android/apis/view/Switches.java rename to app/src/main/java/io/appium/android/apis/view/Switches.java index 0f4f48c..8a2b774 100644 --- a/src/com/example/android/apis/view/Switches.java +++ b/app/src/main/java/io/appium/android/apis/view/Switches.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; import android.app.Activity; import android.os.Bundle; @@ -22,7 +22,7 @@ import android.widget.Switch; import android.widget.Toast; -import com.example.android.apis.R; +import io.appium.android.apis.R; /** * Demonstrates the use of the toggle switch widget. diff --git a/src/com/example/android/apis/view/TableLayout1.java b/app/src/main/java/io/appium/android/apis/view/TableLayout1.java similarity index 92% rename from src/com/example/android/apis/view/TableLayout1.java rename to app/src/main/java/io/appium/android/apis/view/TableLayout1.java index 98f6b31..46afe87 100644 --- a/src/com/example/android/apis/view/TableLayout1.java +++ b/app/src/main/java/io/appium/android/apis/view/TableLayout1.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.os.Bundle; diff --git a/src/com/example/android/apis/view/TableLayout10.java b/app/src/main/java/io/appium/android/apis/view/TableLayout10.java similarity index 92% rename from src/com/example/android/apis/view/TableLayout10.java rename to app/src/main/java/io/appium/android/apis/view/TableLayout10.java index f904f84..8e273af 100644 --- a/src/com/example/android/apis/view/TableLayout10.java +++ b/app/src/main/java/io/appium/android/apis/view/TableLayout10.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.os.Bundle; diff --git a/src/com/example/android/apis/view/TableLayout11.java b/app/src/main/java/io/appium/android/apis/view/TableLayout11.java similarity index 93% rename from src/com/example/android/apis/view/TableLayout11.java rename to app/src/main/java/io/appium/android/apis/view/TableLayout11.java index 09b19a2..6af6db6 100644 --- a/src/com/example/android/apis/view/TableLayout11.java +++ b/app/src/main/java/io/appium/android/apis/view/TableLayout11.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.os.Bundle; diff --git a/src/com/example/android/apis/view/TableLayout12.java b/app/src/main/java/io/appium/android/apis/view/TableLayout12.java similarity index 92% rename from src/com/example/android/apis/view/TableLayout12.java rename to app/src/main/java/io/appium/android/apis/view/TableLayout12.java index f3fe850..43655f3 100644 --- a/src/com/example/android/apis/view/TableLayout12.java +++ b/app/src/main/java/io/appium/android/apis/view/TableLayout12.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.os.Bundle; diff --git a/src/com/example/android/apis/view/TableLayout2.java b/app/src/main/java/io/appium/android/apis/view/TableLayout2.java similarity index 92% rename from src/com/example/android/apis/view/TableLayout2.java rename to app/src/main/java/io/appium/android/apis/view/TableLayout2.java index 3e60563..eb03c17 100644 --- a/src/com/example/android/apis/view/TableLayout2.java +++ b/app/src/main/java/io/appium/android/apis/view/TableLayout2.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.os.Bundle; diff --git a/src/com/example/android/apis/view/TableLayout3.java b/app/src/main/java/io/appium/android/apis/view/TableLayout3.java similarity index 92% rename from src/com/example/android/apis/view/TableLayout3.java rename to app/src/main/java/io/appium/android/apis/view/TableLayout3.java index 82a545c..827f050 100644 --- a/src/com/example/android/apis/view/TableLayout3.java +++ b/app/src/main/java/io/appium/android/apis/view/TableLayout3.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.os.Bundle; diff --git a/src/com/example/android/apis/view/TableLayout4.java b/app/src/main/java/io/appium/android/apis/view/TableLayout4.java similarity index 92% rename from src/com/example/android/apis/view/TableLayout4.java rename to app/src/main/java/io/appium/android/apis/view/TableLayout4.java index 53a1055..170e81c 100644 --- a/src/com/example/android/apis/view/TableLayout4.java +++ b/app/src/main/java/io/appium/android/apis/view/TableLayout4.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.os.Bundle; diff --git a/src/com/example/android/apis/view/TableLayout5.java b/app/src/main/java/io/appium/android/apis/view/TableLayout5.java similarity index 92% rename from src/com/example/android/apis/view/TableLayout5.java rename to app/src/main/java/io/appium/android/apis/view/TableLayout5.java index 9422218..d7592ef 100644 --- a/src/com/example/android/apis/view/TableLayout5.java +++ b/app/src/main/java/io/appium/android/apis/view/TableLayout5.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.os.Bundle; diff --git a/src/com/example/android/apis/view/TableLayout6.java b/app/src/main/java/io/appium/android/apis/view/TableLayout6.java similarity index 92% rename from src/com/example/android/apis/view/TableLayout6.java rename to app/src/main/java/io/appium/android/apis/view/TableLayout6.java index b6a9125..d0018bc 100644 --- a/src/com/example/android/apis/view/TableLayout6.java +++ b/app/src/main/java/io/appium/android/apis/view/TableLayout6.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.os.Bundle; diff --git a/src/com/example/android/apis/view/TableLayout7.java b/app/src/main/java/io/appium/android/apis/view/TableLayout7.java similarity index 97% rename from src/com/example/android/apis/view/TableLayout7.java rename to app/src/main/java/io/appium/android/apis/view/TableLayout7.java index 22fc4a5..d047f62 100644 --- a/src/com/example/android/apis/view/TableLayout7.java +++ b/app/src/main/java/io/appium/android/apis/view/TableLayout7.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.os.Bundle; diff --git a/src/com/example/android/apis/view/TableLayout8.java b/app/src/main/java/io/appium/android/apis/view/TableLayout8.java similarity index 96% rename from src/com/example/android/apis/view/TableLayout8.java rename to app/src/main/java/io/appium/android/apis/view/TableLayout8.java index 99ca4ac..3d7e2ec 100644 --- a/src/com/example/android/apis/view/TableLayout8.java +++ b/app/src/main/java/io/appium/android/apis/view/TableLayout8.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.widget.TableLayout; diff --git a/src/com/example/android/apis/view/TableLayout9.java b/app/src/main/java/io/appium/android/apis/view/TableLayout9.java similarity index 95% rename from src/com/example/android/apis/view/TableLayout9.java rename to app/src/main/java/io/appium/android/apis/view/TableLayout9.java index f99111d..a6cae08 100644 --- a/src/com/example/android/apis/view/TableLayout9.java +++ b/app/src/main/java/io/appium/android/apis/view/TableLayout9.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.widget.TableLayout; diff --git a/src/com/example/android/apis/view/Tabs1.java b/app/src/main/java/io/appium/android/apis/view/Tabs1.java similarity index 95% rename from src/com/example/android/apis/view/Tabs1.java rename to app/src/main/java/io/appium/android/apis/view/Tabs1.java index 39f7e9b..b5a4dd6 100644 --- a/src/com/example/android/apis/view/Tabs1.java +++ b/app/src/main/java/io/appium/android/apis/view/Tabs1.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; import android.app.TabActivity; import android.os.Bundle; @@ -22,7 +22,7 @@ import android.widget.TabHost.TabSpec; import android.view.LayoutInflater; -import com.example.android.apis.R; +import io.appium.android.apis.R; /** * An example of tabs that uses labels ({@link TabSpec#setIndicator(CharSequence)}) diff --git a/src/com/example/android/apis/view/Tabs2.java b/app/src/main/java/io/appium/android/apis/view/Tabs2.java similarity index 96% rename from src/com/example/android/apis/view/Tabs2.java rename to app/src/main/java/io/appium/android/apis/view/Tabs2.java index f52a8c5..0a2a31c 100644 --- a/src/com/example/android/apis/view/Tabs2.java +++ b/app/src/main/java/io/appium/android/apis/view/Tabs2.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.TabActivity; import android.os.Bundle; diff --git a/src/com/example/android/apis/view/Tabs3.java b/app/src/main/java/io/appium/android/apis/view/Tabs3.java similarity index 97% rename from src/com/example/android/apis/view/Tabs3.java rename to app/src/main/java/io/appium/android/apis/view/Tabs3.java index 587bfe8..2d8c310 100644 --- a/src/com/example/android/apis/view/Tabs3.java +++ b/app/src/main/java/io/appium/android/apis/view/Tabs3.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; import android.app.TabActivity; import android.os.Bundle; diff --git a/src/com/example/android/apis/view/Tabs4.java b/app/src/main/java/io/appium/android/apis/view/Tabs4.java similarity index 95% rename from src/com/example/android/apis/view/Tabs4.java rename to app/src/main/java/io/appium/android/apis/view/Tabs4.java index fed7275..d41a3d5 100644 --- a/src/com/example/android/apis/view/Tabs4.java +++ b/app/src/main/java/io/appium/android/apis/view/Tabs4.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; /** diff --git a/src/com/example/android/apis/view/Tabs5.java b/app/src/main/java/io/appium/android/apis/view/Tabs5.java similarity index 95% rename from src/com/example/android/apis/view/Tabs5.java rename to app/src/main/java/io/appium/android/apis/view/Tabs5.java index 8329df5..83c408c 100644 --- a/src/com/example/android/apis/view/Tabs5.java +++ b/app/src/main/java/io/appium/android/apis/view/Tabs5.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.TabActivity; import android.os.Bundle; diff --git a/src/com/example/android/apis/view/Tabs6.java b/app/src/main/java/io/appium/android/apis/view/Tabs6.java similarity index 95% rename from src/com/example/android/apis/view/Tabs6.java rename to app/src/main/java/io/appium/android/apis/view/Tabs6.java index 253aebd..7217352 100644 --- a/src/com/example/android/apis/view/Tabs6.java +++ b/app/src/main/java/io/appium/android/apis/view/Tabs6.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.TabActivity; import android.os.Bundle; diff --git a/src/com/example/android/apis/view/TextClockDemo.java b/app/src/main/java/io/appium/android/apis/view/TextClockDemo.java similarity index 93% rename from src/com/example/android/apis/view/TextClockDemo.java rename to app/src/main/java/io/appium/android/apis/view/TextClockDemo.java index f2b85ce..d3e7309 100644 --- a/src/com/example/android/apis/view/TextClockDemo.java +++ b/app/src/main/java/io/appium/android/apis/view/TextClockDemo.java @@ -14,13 +14,13 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; // Need the following import to get access to the app resources, since this // class is in a sub-package. import android.text.Html; import android.widget.TextClock; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.os.Bundle; diff --git a/app/src/main/java/io/appium/android/apis/view/TextFields.java b/app/src/main/java/io/appium/android/apis/view/TextFields.java new file mode 100644 index 0000000..0e308cf --- /dev/null +++ b/app/src/main/java/io/appium/android/apis/view/TextFields.java @@ -0,0 +1,60 @@ +/* + * Copyright (C) 2007 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package io.appium.android.apis.view; + +// Need the following import to get access to the app resources, since this +// class is in a sub-package. +import io.appium.android.apis.R; + +import java.lang.CharSequence; + +import android.app.Activity; +import android.os.Bundle; +import android.text.Editable; +import android.text.TextWatcher; +import android.widget.TextView; +import android.widget.EditText; + + +/** + * A gallery of basic controls: Button, EditText, RadioButton, Checkbox, + * Spinner. This example uses the light theme. + */ +public class TextFields extends Activity { + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.text_fields); + + EditText passwordInput = (EditText)findViewById(R.id.edit1); + final TextView passwordOutput = (TextView)findViewById(R.id.edit1Text); + passwordInput.addTextChangedListener(new TextWatcher () { + @Override + public void afterTextChanged (Editable s) {} + + @Override + public void beforeTextChanged (CharSequence s, int start, int count, int after) {} + + // We only care about the text as it is entered, so only watching + // for text change. The rest of the watcher functions can be ignored + @Override + public void onTextChanged (CharSequence s, int start, int before, int count) { + passwordOutput.setText(s); + } + }); + } +} diff --git a/src/com/example/android/apis/view/TextSwitcher1.java b/app/src/main/java/io/appium/android/apis/view/TextSwitcher1.java similarity index 96% rename from src/com/example/android/apis/view/TextSwitcher1.java rename to app/src/main/java/io/appium/android/apis/view/TextSwitcher1.java index b964512..5c031c9 100644 --- a/src/com/example/android/apis/view/TextSwitcher1.java +++ b/app/src/main/java/io/appium/android/apis/view/TextSwitcher1.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.os.Bundle; diff --git a/src/com/example/android/apis/view/VideoPlayerActivity.java b/app/src/main/java/io/appium/android/apis/view/VideoPlayerActivity.java similarity index 99% rename from src/com/example/android/apis/view/VideoPlayerActivity.java rename to app/src/main/java/io/appium/android/apis/view/VideoPlayerActivity.java index 819b9ec..9ce623c 100644 --- a/src/com/example/android/apis/view/VideoPlayerActivity.java +++ b/app/src/main/java/io/appium/android/apis/view/VideoPlayerActivity.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; import android.app.ActionBar; import android.app.ActionBar.Tab; @@ -41,7 +41,7 @@ import android.widget.Toast; import android.widget.SearchView.OnQueryTextListener; -import com.example.android.apis.R; +import io.appium.android.apis.R; /** * This activity demonstrates how to use system UI flags to implement diff --git a/src/com/example/android/apis/view/Visibility1.java b/app/src/main/java/io/appium/android/apis/view/Visibility1.java similarity index 96% rename from src/com/example/android/apis/view/Visibility1.java rename to app/src/main/java/io/appium/android/apis/view/Visibility1.java index 243eba7..9283cd8 100644 --- a/src/com/example/android/apis/view/Visibility1.java +++ b/app/src/main/java/io/appium/android/apis/view/Visibility1.java @@ -14,11 +14,11 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; // Need the following import to get access to the app resources, since this // class is in a sub-package. -import com.example.android.apis.R; +import io.appium.android.apis.R; import android.app.Activity; import android.os.Bundle; diff --git a/src/com/example/android/apis/view/WebView1.java b/app/src/main/java/io/appium/android/apis/view/WebView1.java similarity index 57% rename from src/com/example/android/apis/view/WebView1.java rename to app/src/main/java/io/appium/android/apis/view/WebView1.java index 56a0f05..ed3509a 100644 --- a/src/com/example/android/apis/view/WebView1.java +++ b/app/src/main/java/io/appium/android/apis/view/WebView1.java @@ -14,32 +14,36 @@ * limitations under the License. */ -package com.example.android.apis.view; +package io.appium.android.apis.view; import android.app.Activity; +import android.os.Build; import android.os.Bundle; import android.webkit.WebView; +import android.webkit.WebViewClient; -import com.example.android.apis.R; +import io.appium.android.apis.R; /** * Sample creating 1 webviews. */ public class WebView1 extends Activity { - @Override - public void onCreate(Bundle icicle) { - super.onCreate(icicle); - + public void onCreate(Bundle savedInstanceState) {; setContentView(R.layout.webview_1); - final String mimeType = "text/html"; + WebView wv = (WebView) findViewById(R.id.wv1); + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { + WebView.setWebContentsDebuggingEnabled(true); + } + wv.getSettings().setBuiltInZoomControls(true); + wv.getSettings().setJavaScriptEnabled(false); + + wv.setWebViewClient(new WebViewClient()); - WebView wv; + wv.loadUrl("file:///android_asset/html/index.html"); - wv = (WebView) findViewById(R.id.wv1); - wv.loadData("Hello World! - 1", mimeType, null); - wv.getSettings().setBuiltInZoomControls(true); + super.onCreate(savedInstanceState); } } diff --git a/app/src/main/java/io/appium/android/apis/view/WebView2.java b/app/src/main/java/io/appium/android/apis/view/WebView2.java new file mode 100644 index 0000000..034c018 --- /dev/null +++ b/app/src/main/java/io/appium/android/apis/view/WebView2.java @@ -0,0 +1,49 @@ +/* + * Copyright (C) 2007 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package io.appium.android.apis.view; + +import android.app.Activity; +import android.os.Build; +import android.os.Bundle; +import android.webkit.WebView; +import android.webkit.WebViewClient; + +import io.appium.android.apis.R; + + +/** + * Sample creating 1 webviews. + */ +public class WebView2 extends Activity { + @Override + public void onCreate(Bundle savedInstanceState) {; + setContentView(R.layout.webview_1); + + WebView wv = (WebView) findViewById(R.id.wv1); + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { + WebView.setWebContentsDebuggingEnabled(true); + } + wv.getSettings().setBuiltInZoomControls(true); + wv.getSettings().setJavaScriptEnabled(false); + + wv.setWebViewClient(new WebViewClient()); + + wv.loadUrl("file:///android_asset/html/index2.html"); + + super.onCreate(savedInstanceState); + } +} diff --git a/app/src/main/java/io/appium/android/apis/view/WebView3.java b/app/src/main/java/io/appium/android/apis/view/WebView3.java new file mode 100644 index 0000000..4b2b05c --- /dev/null +++ b/app/src/main/java/io/appium/android/apis/view/WebView3.java @@ -0,0 +1,58 @@ +/* + * Copyright (C) 2007 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package io.appium.android.apis.view; + +import android.app.Activity; +import android.os.Build; +import android.os.Bundle; +import android.webkit.WebView; +import android.webkit.WebViewClient; + +import io.appium.android.apis.R; + +import android.content.ActivityNotFoundException; +import android.content.Intent; +import android.content.ComponentName; +import android.net.Uri; +import android.view.View; + +/** + * Sample: opening Chrome from within an app + */ +public class WebView3 extends Activity { + @Override + public void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.webview_3); + } + + public void openUrl(View view) { + final String url = "chrome://version/"; + try { + Intent i = new Intent("android.intent.action.MAIN"); + i.setComponent(ComponentName.unflattenFromString("com.android.chrome/com.android.chrome.Main")); + i.addCategory("android.intent.category.LAUNCHER"); + i.setData(Uri.parse(url)); + startActivity(i); + } + catch(ActivityNotFoundException e) { + // Chrome is not installed + Intent i = new Intent(Intent.ACTION_VIEW, Uri.parse(url)); + startActivity(i); + } + } +} diff --git a/res/anim/animator.xml b/app/src/main/res/anim/animator.xml similarity index 100% rename from res/anim/animator.xml rename to app/src/main/res/anim/animator.xml diff --git a/res/anim/animator_set.xml b/app/src/main/res/anim/animator_set.xml similarity index 100% rename from res/anim/animator_set.xml rename to app/src/main/res/anim/animator_set.xml diff --git a/res/anim/color_animator.xml b/app/src/main/res/anim/color_animator.xml similarity index 100% rename from res/anim/color_animator.xml rename to app/src/main/res/anim/color_animator.xml diff --git a/res/anim/cycle_7.xml b/app/src/main/res/anim/cycle_7.xml similarity index 100% rename from res/anim/cycle_7.xml rename to app/src/main/res/anim/cycle_7.xml diff --git a/res/anim/fade.xml b/app/src/main/res/anim/fade.xml similarity index 100% rename from res/anim/fade.xml rename to app/src/main/res/anim/fade.xml diff --git a/res/anim/hold.xml b/app/src/main/res/anim/hold.xml similarity index 100% rename from res/anim/hold.xml rename to app/src/main/res/anim/hold.xml diff --git a/res/anim/hyperspace_in.xml b/app/src/main/res/anim/hyperspace_in.xml similarity index 100% rename from res/anim/hyperspace_in.xml rename to app/src/main/res/anim/hyperspace_in.xml diff --git a/res/anim/hyperspace_out.xml b/app/src/main/res/anim/hyperspace_out.xml similarity index 100% rename from res/anim/hyperspace_out.xml rename to app/src/main/res/anim/hyperspace_out.xml diff --git a/res/anim/layout_animation_row_left_slide.xml b/app/src/main/res/anim/layout_animation_row_left_slide.xml similarity index 100% rename from res/anim/layout_animation_row_left_slide.xml rename to app/src/main/res/anim/layout_animation_row_left_slide.xml diff --git a/res/anim/layout_animation_row_right_slide.xml b/app/src/main/res/anim/layout_animation_row_right_slide.xml similarity index 100% rename from res/anim/layout_animation_row_right_slide.xml rename to app/src/main/res/anim/layout_animation_row_right_slide.xml diff --git a/res/anim/layout_animation_table.xml b/app/src/main/res/anim/layout_animation_table.xml similarity index 100% rename from res/anim/layout_animation_table.xml rename to app/src/main/res/anim/layout_animation_table.xml diff --git a/res/anim/layout_bottom_to_top_slide.xml b/app/src/main/res/anim/layout_bottom_to_top_slide.xml similarity index 100% rename from res/anim/layout_bottom_to_top_slide.xml rename to app/src/main/res/anim/layout_bottom_to_top_slide.xml diff --git a/res/anim/layout_grid_fade.xml b/app/src/main/res/anim/layout_grid_fade.xml similarity index 100% rename from res/anim/layout_grid_fade.xml rename to app/src/main/res/anim/layout_grid_fade.xml diff --git a/res/anim/layout_grid_inverse_fade.xml b/app/src/main/res/anim/layout_grid_inverse_fade.xml similarity index 100% rename from res/anim/layout_grid_inverse_fade.xml rename to app/src/main/res/anim/layout_grid_inverse_fade.xml diff --git a/res/anim/layout_random_fade.xml b/app/src/main/res/anim/layout_random_fade.xml similarity index 100% rename from res/anim/layout_random_fade.xml rename to app/src/main/res/anim/layout_random_fade.xml diff --git a/res/anim/layout_wave_scale.xml b/app/src/main/res/anim/layout_wave_scale.xml similarity index 100% rename from res/anim/layout_wave_scale.xml rename to app/src/main/res/anim/layout_wave_scale.xml diff --git a/res/anim/object_animator.xml b/app/src/main/res/anim/object_animator.xml similarity index 100% rename from res/anim/object_animator.xml rename to app/src/main/res/anim/object_animator.xml diff --git a/res/anim/push_left_in.xml b/app/src/main/res/anim/push_left_in.xml similarity index 100% rename from res/anim/push_left_in.xml rename to app/src/main/res/anim/push_left_in.xml diff --git a/res/anim/push_left_out.xml b/app/src/main/res/anim/push_left_out.xml similarity index 100% rename from res/anim/push_left_out.xml rename to app/src/main/res/anim/push_left_out.xml diff --git a/res/anim/push_up_in.xml b/app/src/main/res/anim/push_up_in.xml similarity index 100% rename from res/anim/push_up_in.xml rename to app/src/main/res/anim/push_up_in.xml diff --git a/res/anim/push_up_out.xml b/app/src/main/res/anim/push_up_out.xml similarity index 100% rename from res/anim/push_up_out.xml rename to app/src/main/res/anim/push_up_out.xml diff --git a/res/anim/shake.xml b/app/src/main/res/anim/shake.xml similarity index 100% rename from res/anim/shake.xml rename to app/src/main/res/anim/shake.xml diff --git a/res/anim/slide_left.xml b/app/src/main/res/anim/slide_left.xml similarity index 100% rename from res/anim/slide_left.xml rename to app/src/main/res/anim/slide_left.xml diff --git a/res/anim/slide_right.xml b/app/src/main/res/anim/slide_right.xml similarity index 100% rename from res/anim/slide_right.xml rename to app/src/main/res/anim/slide_right.xml diff --git a/res/anim/slide_top_to_bottom.xml b/app/src/main/res/anim/slide_top_to_bottom.xml similarity index 100% rename from res/anim/slide_top_to_bottom.xml rename to app/src/main/res/anim/slide_top_to_bottom.xml diff --git a/res/anim/wave_scale.xml b/app/src/main/res/anim/wave_scale.xml similarity index 100% rename from res/anim/wave_scale.xml rename to app/src/main/res/anim/wave_scale.xml diff --git a/res/anim/zoom_enter.xml b/app/src/main/res/anim/zoom_enter.xml similarity index 100% rename from res/anim/zoom_enter.xml rename to app/src/main/res/anim/zoom_enter.xml diff --git a/res/anim/zoom_exit.xml b/app/src/main/res/anim/zoom_exit.xml similarity index 100% rename from res/anim/zoom_exit.xml rename to app/src/main/res/anim/zoom_exit.xml diff --git a/res/animator/fragment_slide_left_enter.xml b/app/src/main/res/animator/fragment_slide_left_enter.xml similarity index 100% rename from res/animator/fragment_slide_left_enter.xml rename to app/src/main/res/animator/fragment_slide_left_enter.xml diff --git a/res/animator/fragment_slide_left_exit.xml b/app/src/main/res/animator/fragment_slide_left_exit.xml similarity index 100% rename from res/animator/fragment_slide_left_exit.xml rename to app/src/main/res/animator/fragment_slide_left_exit.xml diff --git a/res/animator/fragment_slide_right_enter.xml b/app/src/main/res/animator/fragment_slide_right_enter.xml similarity index 100% rename from res/animator/fragment_slide_right_enter.xml rename to app/src/main/res/animator/fragment_slide_right_enter.xml diff --git a/res/animator/fragment_slide_right_exit.xml b/app/src/main/res/animator/fragment_slide_right_exit.xml similarity index 100% rename from res/animator/fragment_slide_right_exit.xml rename to app/src/main/res/animator/fragment_slide_right_exit.xml diff --git a/res/drawable-hdpi/alert_dialog_icon.png b/app/src/main/res/drawable-hdpi/alert_dialog_icon.png old mode 100755 new mode 100644 similarity index 100% rename from res/drawable-hdpi/alert_dialog_icon.png rename to app/src/main/res/drawable-hdpi/alert_dialog_icon.png diff --git a/res/drawable-hdpi/apidemo_androidlogo.png b/app/src/main/res/drawable-hdpi/apidemo_androidlogo.png similarity index 100% rename from res/drawable-hdpi/apidemo_androidlogo.png rename to app/src/main/res/drawable-hdpi/apidemo_androidlogo.png diff --git a/res/drawable-hdpi/app_sample_code.png b/app/src/main/res/drawable-hdpi/app_sample_code.png old mode 100755 new mode 100644 similarity index 100% rename from res/drawable-hdpi/app_sample_code.png rename to app/src/main/res/drawable-hdpi/app_sample_code.png diff --git a/res/drawable-hdpi/arrow_down_float.png b/app/src/main/res/drawable-hdpi/arrow_down_float.png old mode 100755 new mode 100644 similarity index 100% rename from res/drawable-hdpi/arrow_down_float.png rename to app/src/main/res/drawable-hdpi/arrow_down_float.png diff --git a/res/drawable-hdpi/arrow_up_float.png b/app/src/main/res/drawable-hdpi/arrow_up_float.png old mode 100755 new mode 100644 similarity index 100% rename from res/drawable-hdpi/arrow_up_float.png rename to app/src/main/res/drawable-hdpi/arrow_up_float.png diff --git a/res/drawable-hdpi/btn_check_off.png b/app/src/main/res/drawable-hdpi/btn_check_off.png old mode 100755 new mode 100644 similarity index 100% rename from res/drawable-hdpi/btn_check_off.png rename to app/src/main/res/drawable-hdpi/btn_check_off.png diff --git a/res/drawable-hdpi/btn_check_on.png b/app/src/main/res/drawable-hdpi/btn_check_on.png old mode 100755 new mode 100644 similarity index 100% rename from res/drawable-hdpi/btn_check_on.png rename to app/src/main/res/drawable-hdpi/btn_check_on.png diff --git a/res/drawable-hdpi/btn_circle_normal.png b/app/src/main/res/drawable-hdpi/btn_circle_normal.png old mode 100755 new mode 100644 similarity index 100% rename from res/drawable-hdpi/btn_circle_normal.png rename to app/src/main/res/drawable-hdpi/btn_circle_normal.png diff --git a/res/drawable-hdpi/btn_default_normal.9.png b/app/src/main/res/drawable-hdpi/btn_default_normal.9.png old mode 100755 new mode 100644 similarity index 100% rename from res/drawable-hdpi/btn_default_normal.9.png rename to app/src/main/res/drawable-hdpi/btn_default_normal.9.png diff --git a/res/drawable-hdpi/button.9.png b/app/src/main/res/drawable-hdpi/button.9.png old mode 100755 new mode 100644 similarity index 100% rename from res/drawable-hdpi/button.9.png rename to app/src/main/res/drawable-hdpi/button.9.png diff --git a/res/drawable-hdpi/ic_contact_picture.png b/app/src/main/res/drawable-hdpi/ic_contact_picture.png old mode 100755 new mode 100644 similarity index 100% rename from res/drawable-hdpi/ic_contact_picture.png rename to app/src/main/res/drawable-hdpi/ic_contact_picture.png diff --git a/res/drawable-hdpi/ic_launcher_settings.png b/app/src/main/res/drawable-hdpi/ic_launcher_settings.png similarity index 100% rename from res/drawable-hdpi/ic_launcher_settings.png rename to app/src/main/res/drawable-hdpi/ic_launcher_settings.png diff --git a/res/drawable-hdpi/ic_popup_reminder.png b/app/src/main/res/drawable-hdpi/ic_popup_reminder.png old mode 100755 new mode 100644 similarity index 100% rename from res/drawable-hdpi/ic_popup_reminder.png rename to app/src/main/res/drawable-hdpi/ic_popup_reminder.png diff --git a/res/drawable-hdpi/icon48x48_2.png b/app/src/main/res/drawable-hdpi/icon48x48_2.png old mode 100755 new mode 100644 similarity index 100% rename from res/drawable-hdpi/icon48x48_2.png rename to app/src/main/res/drawable-hdpi/icon48x48_2.png diff --git a/res/drawable-hdpi/logo240dpi.png b/app/src/main/res/drawable-hdpi/logo240dpi.png similarity index 100% rename from res/drawable-hdpi/logo240dpi.png rename to app/src/main/res/drawable-hdpi/logo240dpi.png diff --git a/res/drawable-hdpi/npatch240dpi.9.png b/app/src/main/res/drawable-hdpi/npatch240dpi.9.png similarity index 100% rename from res/drawable-hdpi/npatch240dpi.9.png rename to app/src/main/res/drawable-hdpi/npatch240dpi.9.png diff --git a/res/drawable-hdpi/progress_circular_background.png b/app/src/main/res/drawable-hdpi/progress_circular_background.png old mode 100755 new mode 100644 similarity index 100% rename from res/drawable-hdpi/progress_circular_background.png rename to app/src/main/res/drawable-hdpi/progress_circular_background.png diff --git a/res/drawable-hdpi/progress_particle.png b/app/src/main/res/drawable-hdpi/progress_particle.png old mode 100755 new mode 100644 similarity index 100% rename from res/drawable-hdpi/progress_particle.png rename to app/src/main/res/drawable-hdpi/progress_particle.png diff --git a/res/drawable-hdpi/reslogo240dpi.png b/app/src/main/res/drawable-hdpi/reslogo240dpi.png similarity index 100% rename from res/drawable-hdpi/reslogo240dpi.png rename to app/src/main/res/drawable-hdpi/reslogo240dpi.png diff --git a/res/drawable-hdpi/scrollbar_state2.png b/app/src/main/res/drawable-hdpi/scrollbar_state2.png old mode 100755 new mode 100644 similarity index 100% rename from res/drawable-hdpi/scrollbar_state2.png rename to app/src/main/res/drawable-hdpi/scrollbar_state2.png diff --git a/res/drawable-hdpi/smlnpatch240dpi.9.png b/app/src/main/res/drawable-hdpi/smlnpatch240dpi.9.png similarity index 100% rename from res/drawable-hdpi/smlnpatch240dpi.9.png rename to app/src/main/res/drawable-hdpi/smlnpatch240dpi.9.png diff --git a/res/drawable-hdpi/star_big_on.png b/app/src/main/res/drawable-hdpi/star_big_on.png old mode 100755 new mode 100644 similarity index 100% rename from res/drawable-hdpi/star_big_on.png rename to app/src/main/res/drawable-hdpi/star_big_on.png diff --git a/res/drawable-hdpi/stat_happy.png b/app/src/main/res/drawable-hdpi/stat_happy.png old mode 100755 new mode 100644 similarity index 100% rename from res/drawable-hdpi/stat_happy.png rename to app/src/main/res/drawable-hdpi/stat_happy.png diff --git a/res/drawable-hdpi/stat_neutral.png b/app/src/main/res/drawable-hdpi/stat_neutral.png old mode 100755 new mode 100644 similarity index 100% rename from res/drawable-hdpi/stat_neutral.png rename to app/src/main/res/drawable-hdpi/stat_neutral.png diff --git a/res/drawable-hdpi/stat_sad.png b/app/src/main/res/drawable-hdpi/stat_sad.png old mode 100755 new mode 100644 similarity index 100% rename from res/drawable-hdpi/stat_sad.png rename to app/src/main/res/drawable-hdpi/stat_sad.png diff --git a/res/drawable-hdpi/stat_sample.png b/app/src/main/res/drawable-hdpi/stat_sample.png old mode 100755 new mode 100644 similarity index 100% rename from res/drawable-hdpi/stat_sample.png rename to app/src/main/res/drawable-hdpi/stat_sample.png diff --git a/res/drawable-hdpi/stylogo240dpi.png b/app/src/main/res/drawable-hdpi/stylogo240dpi.png similarity index 100% rename from res/drawable-hdpi/stylogo240dpi.png rename to app/src/main/res/drawable-hdpi/stylogo240dpi.png diff --git a/res/drawable-ldpi/logo120dpi.png b/app/src/main/res/drawable-ldpi/logo120dpi.png similarity index 100% rename from res/drawable-ldpi/logo120dpi.png rename to app/src/main/res/drawable-ldpi/logo120dpi.png diff --git a/res/drawable-ldpi/npatch120dpi.9.png b/app/src/main/res/drawable-ldpi/npatch120dpi.9.png similarity index 100% rename from res/drawable-ldpi/npatch120dpi.9.png rename to app/src/main/res/drawable-ldpi/npatch120dpi.9.png diff --git a/res/drawable-ldpi/reslogo120dpi.png b/app/src/main/res/drawable-ldpi/reslogo120dpi.png similarity index 100% rename from res/drawable-ldpi/reslogo120dpi.png rename to app/src/main/res/drawable-ldpi/reslogo120dpi.png diff --git a/res/drawable-ldpi/smlnpatch120dpi.9.png b/app/src/main/res/drawable-ldpi/smlnpatch120dpi.9.png similarity index 100% rename from res/drawable-ldpi/smlnpatch120dpi.9.png rename to app/src/main/res/drawable-ldpi/smlnpatch120dpi.9.png diff --git a/res/drawable-ldpi/stylogo120dpi.png b/app/src/main/res/drawable-ldpi/stylogo120dpi.png similarity index 100% rename from res/drawable-ldpi/stylogo120dpi.png rename to app/src/main/res/drawable-ldpi/stylogo120dpi.png diff --git a/res/drawable-mdpi/alert_dialog_icon.png b/app/src/main/res/drawable-mdpi/alert_dialog_icon.png similarity index 100% rename from res/drawable-mdpi/alert_dialog_icon.png rename to app/src/main/res/drawable-mdpi/alert_dialog_icon.png diff --git a/res/drawable-mdpi/apidemo_androidlogo.png b/app/src/main/res/drawable-mdpi/apidemo_androidlogo.png similarity index 100% rename from res/drawable-mdpi/apidemo_androidlogo.png rename to app/src/main/res/drawable-mdpi/apidemo_androidlogo.png diff --git a/res/drawable-mdpi/app_sample_code.png b/app/src/main/res/drawable-mdpi/app_sample_code.png similarity index 100% rename from res/drawable-mdpi/app_sample_code.png rename to app/src/main/res/drawable-mdpi/app_sample_code.png diff --git a/res/drawable-mdpi/arrow_down_float.png b/app/src/main/res/drawable-mdpi/arrow_down_float.png similarity index 100% rename from res/drawable-mdpi/arrow_down_float.png rename to app/src/main/res/drawable-mdpi/arrow_down_float.png diff --git a/res/drawable-mdpi/arrow_up_float.png b/app/src/main/res/drawable-mdpi/arrow_up_float.png similarity index 100% rename from res/drawable-mdpi/arrow_up_float.png rename to app/src/main/res/drawable-mdpi/arrow_up_float.png diff --git a/res/drawable-mdpi/btn_check_off.png b/app/src/main/res/drawable-mdpi/btn_check_off.png similarity index 100% rename from res/drawable-mdpi/btn_check_off.png rename to app/src/main/res/drawable-mdpi/btn_check_off.png diff --git a/res/drawable-mdpi/btn_check_on.png b/app/src/main/res/drawable-mdpi/btn_check_on.png similarity index 100% rename from res/drawable-mdpi/btn_check_on.png rename to app/src/main/res/drawable-mdpi/btn_check_on.png diff --git a/res/drawable-mdpi/btn_circle_normal.png b/app/src/main/res/drawable-mdpi/btn_circle_normal.png similarity index 100% rename from res/drawable-mdpi/btn_circle_normal.png rename to app/src/main/res/drawable-mdpi/btn_circle_normal.png diff --git a/res/drawable-mdpi/btn_default_normal.9.png b/app/src/main/res/drawable-mdpi/btn_default_normal.9.png similarity index 100% rename from res/drawable-mdpi/btn_default_normal.9.png rename to app/src/main/res/drawable-mdpi/btn_default_normal.9.png diff --git a/res/drawable-mdpi/button.9.png b/app/src/main/res/drawable-mdpi/button.9.png similarity index 100% rename from res/drawable-mdpi/button.9.png rename to app/src/main/res/drawable-mdpi/button.9.png diff --git a/res/drawable-mdpi/ic_contact_picture.png b/app/src/main/res/drawable-mdpi/ic_contact_picture.png similarity index 100% rename from res/drawable-mdpi/ic_contact_picture.png rename to app/src/main/res/drawable-mdpi/ic_contact_picture.png diff --git a/res/drawable-mdpi/ic_launcher_settings.png b/app/src/main/res/drawable-mdpi/ic_launcher_settings.png similarity index 100% rename from res/drawable-mdpi/ic_launcher_settings.png rename to app/src/main/res/drawable-mdpi/ic_launcher_settings.png diff --git a/res/drawable-mdpi/ic_popup_reminder.png b/app/src/main/res/drawable-mdpi/ic_popup_reminder.png old mode 100755 new mode 100644 similarity index 100% rename from res/drawable-mdpi/ic_popup_reminder.png rename to app/src/main/res/drawable-mdpi/ic_popup_reminder.png diff --git a/res/drawable-mdpi/ic_settings_applications.png b/app/src/main/res/drawable-mdpi/ic_settings_applications.png old mode 100755 new mode 100644 similarity index 100% rename from res/drawable-mdpi/ic_settings_applications.png rename to app/src/main/res/drawable-mdpi/ic_settings_applications.png diff --git a/res/drawable-mdpi/ic_settings_display.png b/app/src/main/res/drawable-mdpi/ic_settings_display.png similarity index 100% rename from res/drawable-mdpi/ic_settings_display.png rename to app/src/main/res/drawable-mdpi/ic_settings_display.png diff --git a/res/drawable-mdpi/icon48x48_2.png b/app/src/main/res/drawable-mdpi/icon48x48_2.png old mode 100755 new mode 100644 similarity index 100% rename from res/drawable-mdpi/icon48x48_2.png rename to app/src/main/res/drawable-mdpi/icon48x48_2.png diff --git a/res/drawable-mdpi/progress_circular_background.png b/app/src/main/res/drawable-mdpi/progress_circular_background.png similarity index 100% rename from res/drawable-mdpi/progress_circular_background.png rename to app/src/main/res/drawable-mdpi/progress_circular_background.png diff --git a/res/drawable-mdpi/progress_particle.png b/app/src/main/res/drawable-mdpi/progress_particle.png similarity index 100% rename from res/drawable-mdpi/progress_particle.png rename to app/src/main/res/drawable-mdpi/progress_particle.png diff --git a/res/drawable-mdpi/scrollbar_state2.png b/app/src/main/res/drawable-mdpi/scrollbar_state2.png old mode 100755 new mode 100644 similarity index 100% rename from res/drawable-mdpi/scrollbar_state2.png rename to app/src/main/res/drawable-mdpi/scrollbar_state2.png diff --git a/res/drawable-mdpi/star_big_on.png b/app/src/main/res/drawable-mdpi/star_big_on.png similarity index 100% rename from res/drawable-mdpi/star_big_on.png rename to app/src/main/res/drawable-mdpi/star_big_on.png diff --git a/res/drawable-mdpi/stat_happy.png b/app/src/main/res/drawable-mdpi/stat_happy.png similarity index 100% rename from res/drawable-mdpi/stat_happy.png rename to app/src/main/res/drawable-mdpi/stat_happy.png diff --git a/res/drawable-mdpi/stat_neutral.png b/app/src/main/res/drawable-mdpi/stat_neutral.png similarity index 100% rename from res/drawable-mdpi/stat_neutral.png rename to app/src/main/res/drawable-mdpi/stat_neutral.png diff --git a/res/drawable-mdpi/stat_sad.png b/app/src/main/res/drawable-mdpi/stat_sad.png similarity index 100% rename from res/drawable-mdpi/stat_sad.png rename to app/src/main/res/drawable-mdpi/stat_sad.png diff --git a/res/drawable-mdpi/stat_sample.png b/app/src/main/res/drawable-mdpi/stat_sample.png similarity index 100% rename from res/drawable-mdpi/stat_sample.png rename to app/src/main/res/drawable-mdpi/stat_sample.png diff --git a/res/drawable-nodpi/frantic.jpg b/app/src/main/res/drawable-nodpi/frantic.jpg similarity index 100% rename from res/drawable-nodpi/frantic.jpg rename to app/src/main/res/drawable-nodpi/frantic.jpg diff --git a/res/drawable-nodpi/logonodpi120.png b/app/src/main/res/drawable-nodpi/logonodpi120.png similarity index 100% rename from res/drawable-nodpi/logonodpi120.png rename to app/src/main/res/drawable-nodpi/logonodpi120.png diff --git a/res/drawable-nodpi/logonodpi160.png b/app/src/main/res/drawable-nodpi/logonodpi160.png similarity index 100% rename from res/drawable-nodpi/logonodpi160.png rename to app/src/main/res/drawable-nodpi/logonodpi160.png diff --git a/res/drawable-nodpi/logonodpi240.png b/app/src/main/res/drawable-nodpi/logonodpi240.png similarity index 100% rename from res/drawable-nodpi/logonodpi240.png rename to app/src/main/res/drawable-nodpi/logonodpi240.png diff --git a/res/drawable-xhdpi/ic_launcher_settings.png b/app/src/main/res/drawable-xhdpi/ic_launcher_settings.png similarity index 100% rename from res/drawable-xhdpi/ic_launcher_settings.png rename to app/src/main/res/drawable-xhdpi/ic_launcher_settings.png diff --git a/res/drawable/animated_gif.gif b/app/src/main/res/drawable/animated_gif.gif similarity index 100% rename from res/drawable/animated_gif.gif rename to app/src/main/res/drawable/animated_gif.gif diff --git a/res/drawable/balloons.jpg b/app/src/main/res/drawable/balloons.jpg similarity index 100% rename from res/drawable/balloons.jpg rename to app/src/main/res/drawable/balloons.jpg diff --git a/res/drawable/beach.jpg b/app/src/main/res/drawable/beach.jpg similarity index 100% rename from res/drawable/beach.jpg rename to app/src/main/res/drawable/beach.jpg diff --git a/res/drawable/black_box.xml b/app/src/main/res/drawable/black_box.xml similarity index 100% rename from res/drawable/black_box.xml rename to app/src/main/res/drawable/black_box.xml diff --git a/res/drawable/black_opaque_box.xml b/app/src/main/res/drawable/black_opaque_box.xml similarity index 100% rename from res/drawable/black_opaque_box.xml rename to app/src/main/res/drawable/black_opaque_box.xml diff --git a/res/drawable/box.xml b/app/src/main/res/drawable/box.xml similarity index 100% rename from res/drawable/box.xml rename to app/src/main/res/drawable/box.xml diff --git a/res/drawable/circular_progress.xml b/app/src/main/res/drawable/circular_progress.xml similarity index 100% rename from res/drawable/circular_progress.xml rename to app/src/main/res/drawable/circular_progress.xml diff --git a/res/drawable/filled_box.xml b/app/src/main/res/drawable/filled_box.xml similarity index 100% rename from res/drawable/filled_box.xml rename to app/src/main/res/drawable/filled_box.xml diff --git a/res/drawable/frog.gif b/app/src/main/res/drawable/frog.gif similarity index 100% rename from res/drawable/frog.gif rename to app/src/main/res/drawable/frog.gif diff --git a/res/drawable/gallery_background_1.xml b/app/src/main/res/drawable/gallery_background_1.xml similarity index 100% rename from res/drawable/gallery_background_1.xml rename to app/src/main/res/drawable/gallery_background_1.xml diff --git a/res/drawable/gallery_photo_1.jpg b/app/src/main/res/drawable/gallery_photo_1.jpg similarity index 100% rename from res/drawable/gallery_photo_1.jpg rename to app/src/main/res/drawable/gallery_photo_1.jpg diff --git a/res/drawable/gallery_photo_2.jpg b/app/src/main/res/drawable/gallery_photo_2.jpg similarity index 100% rename from res/drawable/gallery_photo_2.jpg rename to app/src/main/res/drawable/gallery_photo_2.jpg diff --git a/res/drawable/gallery_photo_3.jpg b/app/src/main/res/drawable/gallery_photo_3.jpg similarity index 100% rename from res/drawable/gallery_photo_3.jpg rename to app/src/main/res/drawable/gallery_photo_3.jpg diff --git a/res/drawable/gallery_photo_4.jpg b/app/src/main/res/drawable/gallery_photo_4.jpg similarity index 100% rename from res/drawable/gallery_photo_4.jpg rename to app/src/main/res/drawable/gallery_photo_4.jpg diff --git a/res/drawable/gallery_photo_5.jpg b/app/src/main/res/drawable/gallery_photo_5.jpg similarity index 100% rename from res/drawable/gallery_photo_5.jpg rename to app/src/main/res/drawable/gallery_photo_5.jpg diff --git a/res/drawable/gallery_photo_6.jpg b/app/src/main/res/drawable/gallery_photo_6.jpg similarity index 100% rename from res/drawable/gallery_photo_6.jpg rename to app/src/main/res/drawable/gallery_photo_6.jpg diff --git a/res/drawable/gallery_photo_7.jpg b/app/src/main/res/drawable/gallery_photo_7.jpg similarity index 100% rename from res/drawable/gallery_photo_7.jpg rename to app/src/main/res/drawable/gallery_photo_7.jpg diff --git a/res/drawable/gallery_photo_8.jpg b/app/src/main/res/drawable/gallery_photo_8.jpg similarity index 100% rename from res/drawable/gallery_photo_8.jpg rename to app/src/main/res/drawable/gallery_photo_8.jpg diff --git a/res/drawable/hover_background.xml b/app/src/main/res/drawable/hover_background.xml similarity index 100% rename from res/drawable/hover_background.xml rename to app/src/main/res/drawable/hover_background.xml diff --git a/res/drawable/hover_background_active.xml b/app/src/main/res/drawable/hover_background_active.xml similarity index 100% rename from res/drawable/hover_background_active.xml rename to app/src/main/res/drawable/hover_background_active.xml diff --git a/res/drawable/hover_background_inactive.xml b/app/src/main/res/drawable/hover_background_inactive.xml similarity index 100% rename from res/drawable/hover_background_inactive.xml rename to app/src/main/res/drawable/hover_background_inactive.xml diff --git a/res/drawable/icon48x48_1.png b/app/src/main/res/drawable/icon48x48_1.png similarity index 100% rename from res/drawable/icon48x48_1.png rename to app/src/main/res/drawable/icon48x48_1.png diff --git a/res/drawable/line.xml b/app/src/main/res/drawable/line.xml similarity index 100% rename from res/drawable/line.xml rename to app/src/main/res/drawable/line.xml diff --git a/res/drawable/logo160dpi.png b/app/src/main/res/drawable/logo160dpi.png similarity index 100% rename from res/drawable/logo160dpi.png rename to app/src/main/res/drawable/logo160dpi.png diff --git a/res/drawable/magnifying_glass.png b/app/src/main/res/drawable/magnifying_glass.png old mode 100755 new mode 100644 similarity index 100% rename from res/drawable/magnifying_glass.png rename to app/src/main/res/drawable/magnifying_glass.png diff --git a/res/drawable/npatch160dpi.9.png b/app/src/main/res/drawable/npatch160dpi.9.png similarity index 100% rename from res/drawable/npatch160dpi.9.png rename to app/src/main/res/drawable/npatch160dpi.9.png diff --git a/res/drawable/photo1.jpg b/app/src/main/res/drawable/photo1.jpg similarity index 100% rename from res/drawable/photo1.jpg rename to app/src/main/res/drawable/photo1.jpg diff --git a/res/drawable/photo2.jpg b/app/src/main/res/drawable/photo2.jpg similarity index 100% rename from res/drawable/photo2.jpg rename to app/src/main/res/drawable/photo2.jpg diff --git a/res/drawable/photo3.jpg b/app/src/main/res/drawable/photo3.jpg similarity index 100% rename from res/drawable/photo3.jpg rename to app/src/main/res/drawable/photo3.jpg diff --git a/res/drawable/photo4.jpg b/app/src/main/res/drawable/photo4.jpg similarity index 100% rename from res/drawable/photo4.jpg rename to app/src/main/res/drawable/photo4.jpg diff --git a/res/drawable/photo5.jpg b/app/src/main/res/drawable/photo5.jpg similarity index 100% rename from res/drawable/photo5.jpg rename to app/src/main/res/drawable/photo5.jpg diff --git a/res/drawable/photo6.jpg b/app/src/main/res/drawable/photo6.jpg similarity index 100% rename from res/drawable/photo6.jpg rename to app/src/main/res/drawable/photo6.jpg diff --git a/res/drawable/picture_frame.png b/app/src/main/res/drawable/picture_frame.png similarity index 100% rename from res/drawable/picture_frame.png rename to app/src/main/res/drawable/picture_frame.png diff --git a/res/drawable/reslogo160dpi.png b/app/src/main/res/drawable/reslogo160dpi.png similarity index 100% rename from res/drawable/reslogo160dpi.png rename to app/src/main/res/drawable/reslogo160dpi.png diff --git a/res/drawable/sample_0.jpg b/app/src/main/res/drawable/sample_0.jpg similarity index 100% rename from res/drawable/sample_0.jpg rename to app/src/main/res/drawable/sample_0.jpg diff --git a/res/drawable/sample_1.jpg b/app/src/main/res/drawable/sample_1.jpg similarity index 100% rename from res/drawable/sample_1.jpg rename to app/src/main/res/drawable/sample_1.jpg diff --git a/res/drawable/sample_2.jpg b/app/src/main/res/drawable/sample_2.jpg similarity index 100% rename from res/drawable/sample_2.jpg rename to app/src/main/res/drawable/sample_2.jpg diff --git a/res/drawable/sample_3.jpg b/app/src/main/res/drawable/sample_3.jpg similarity index 100% rename from res/drawable/sample_3.jpg rename to app/src/main/res/drawable/sample_3.jpg diff --git a/res/drawable/sample_4.jpg b/app/src/main/res/drawable/sample_4.jpg similarity index 100% rename from res/drawable/sample_4.jpg rename to app/src/main/res/drawable/sample_4.jpg diff --git a/res/drawable/sample_5.jpg b/app/src/main/res/drawable/sample_5.jpg similarity index 100% rename from res/drawable/sample_5.jpg rename to app/src/main/res/drawable/sample_5.jpg diff --git a/res/drawable/sample_6.jpg b/app/src/main/res/drawable/sample_6.jpg similarity index 100% rename from res/drawable/sample_6.jpg rename to app/src/main/res/drawable/sample_6.jpg diff --git a/res/drawable/sample_7.jpg b/app/src/main/res/drawable/sample_7.jpg similarity index 100% rename from res/drawable/sample_7.jpg rename to app/src/main/res/drawable/sample_7.jpg diff --git a/res/drawable/sample_thumb_0.jpg b/app/src/main/res/drawable/sample_thumb_0.jpg similarity index 100% rename from res/drawable/sample_thumb_0.jpg rename to app/src/main/res/drawable/sample_thumb_0.jpg diff --git a/res/drawable/sample_thumb_1.jpg b/app/src/main/res/drawable/sample_thumb_1.jpg similarity index 100% rename from res/drawable/sample_thumb_1.jpg rename to app/src/main/res/drawable/sample_thumb_1.jpg diff --git a/res/drawable/sample_thumb_2.jpg b/app/src/main/res/drawable/sample_thumb_2.jpg similarity index 100% rename from res/drawable/sample_thumb_2.jpg rename to app/src/main/res/drawable/sample_thumb_2.jpg diff --git a/res/drawable/sample_thumb_3.jpg b/app/src/main/res/drawable/sample_thumb_3.jpg similarity index 100% rename from res/drawable/sample_thumb_3.jpg rename to app/src/main/res/drawable/sample_thumb_3.jpg diff --git a/res/drawable/sample_thumb_4.jpg b/app/src/main/res/drawable/sample_thumb_4.jpg similarity index 100% rename from res/drawable/sample_thumb_4.jpg rename to app/src/main/res/drawable/sample_thumb_4.jpg diff --git a/res/drawable/sample_thumb_5.jpg b/app/src/main/res/drawable/sample_thumb_5.jpg similarity index 100% rename from res/drawable/sample_thumb_5.jpg rename to app/src/main/res/drawable/sample_thumb_5.jpg diff --git a/res/drawable/sample_thumb_6.jpg b/app/src/main/res/drawable/sample_thumb_6.jpg similarity index 100% rename from res/drawable/sample_thumb_6.jpg rename to app/src/main/res/drawable/sample_thumb_6.jpg diff --git a/res/drawable/sample_thumb_7.jpg b/app/src/main/res/drawable/sample_thumb_7.jpg similarity index 100% rename from res/drawable/sample_thumb_7.jpg rename to app/src/main/res/drawable/sample_thumb_7.jpg diff --git a/res/drawable/scrollbar_vertical_thumb.xml b/app/src/main/res/drawable/scrollbar_vertical_thumb.xml similarity index 100% rename from res/drawable/scrollbar_vertical_thumb.xml rename to app/src/main/res/drawable/scrollbar_vertical_thumb.xml diff --git a/res/drawable/scrollbar_vertical_track.xml b/app/src/main/res/drawable/scrollbar_vertical_track.xml similarity index 100% rename from res/drawable/scrollbar_vertical_track.xml rename to app/src/main/res/drawable/scrollbar_vertical_track.xml diff --git a/res/drawable/shape_1.xml b/app/src/main/res/drawable/shape_1.xml similarity index 100% rename from res/drawable/shape_1.xml rename to app/src/main/res/drawable/shape_1.xml diff --git a/res/drawable/shape_2.xml b/app/src/main/res/drawable/shape_2.xml similarity index 100% rename from res/drawable/shape_2.xml rename to app/src/main/res/drawable/shape_2.xml diff --git a/res/drawable/shape_3.xml b/app/src/main/res/drawable/shape_3.xml similarity index 100% rename from res/drawable/shape_3.xml rename to app/src/main/res/drawable/shape_3.xml diff --git a/res/drawable/shape_4.xml b/app/src/main/res/drawable/shape_4.xml similarity index 100% rename from res/drawable/shape_4.xml rename to app/src/main/res/drawable/shape_4.xml diff --git a/res/drawable/shape_5.xml b/app/src/main/res/drawable/shape_5.xml similarity index 100% rename from res/drawable/shape_5.xml rename to app/src/main/res/drawable/shape_5.xml diff --git a/res/drawable/smlnpatch160dpi.9.png b/app/src/main/res/drawable/smlnpatch160dpi.9.png similarity index 100% rename from res/drawable/smlnpatch160dpi.9.png rename to app/src/main/res/drawable/smlnpatch160dpi.9.png diff --git a/res/drawable/stylogo160dpi.png b/app/src/main/res/drawable/stylogo160dpi.png similarity index 100% rename from res/drawable/stylogo160dpi.png rename to app/src/main/res/drawable/stylogo160dpi.png diff --git a/res/layout-h550dp/resources_height.xml b/app/src/main/res/layout-h550dp/resources_height.xml similarity index 100% rename from res/layout-h550dp/resources_height.xml rename to app/src/main/res/layout-h550dp/resources_height.xml diff --git a/res/layout-h670dp/resources_height.xml b/app/src/main/res/layout-h670dp/resources_height.xml similarity index 100% rename from res/layout-h670dp/resources_height.xml rename to app/src/main/res/layout-h670dp/resources_height.xml diff --git a/res/layout-h974dp/resources_height.xml b/app/src/main/res/layout-h974dp/resources_height.xml similarity index 100% rename from res/layout-h974dp/resources_height.xml rename to app/src/main/res/layout-h974dp/resources_height.xml diff --git a/res/layout-land/fragment_arguments.xml b/app/src/main/res/layout-land/fragment_arguments.xml similarity index 93% rename from res/layout-land/fragment_arguments.xml rename to app/src/main/res/layout-land/fragment_arguments.xml index e27df99..fca9a06 100644 --- a/res/layout-land/fragment_arguments.xml +++ b/app/src/main/res/layout-land/fragment_arguments.xml @@ -35,7 +35,7 @@ - - diff --git a/res/layout-land/fragment_layout.xml b/app/src/main/res/layout-land/fragment_layout.xml similarity index 94% rename from res/layout-land/fragment_layout.xml rename to app/src/main/res/layout-land/fragment_layout.xml index be6c07e..6571c25 100644 --- a/res/layout-land/fragment_layout.xml +++ b/app/src/main/res/layout-land/fragment_layout.xml @@ -22,7 +22,7 @@ android:orientation="horizontal" android:layout_width="match_parent" android:layout_height="match_parent"> - diff --git a/res/layout-land/grid_layout_2.xml b/app/src/main/res/layout-land/grid_layout_2.xml similarity index 100% rename from res/layout-land/grid_layout_2.xml rename to app/src/main/res/layout-land/grid_layout_2.xml diff --git a/res/layout-sw480dp/resources_smallest_width_inner.xml b/app/src/main/res/layout-sw480dp/resources_smallest_width_inner.xml similarity index 100% rename from res/layout-sw480dp/resources_smallest_width_inner.xml rename to app/src/main/res/layout-sw480dp/resources_smallest_width_inner.xml diff --git a/res/layout-sw480dp/resources_smallest_width_row.xml b/app/src/main/res/layout-sw480dp/resources_smallest_width_row.xml similarity index 100% rename from res/layout-sw480dp/resources_smallest_width_row.xml rename to app/src/main/res/layout-sw480dp/resources_smallest_width_row.xml diff --git a/res/layout-sw600dp/resources_smallest_width_inner.xml b/app/src/main/res/layout-sw600dp/resources_smallest_width_inner.xml similarity index 100% rename from res/layout-sw600dp/resources_smallest_width_inner.xml rename to app/src/main/res/layout-sw600dp/resources_smallest_width_inner.xml diff --git a/res/layout-sw600dp/resources_smallest_width_row.xml b/app/src/main/res/layout-sw600dp/resources_smallest_width_row.xml similarity index 100% rename from res/layout-sw600dp/resources_smallest_width_row.xml rename to app/src/main/res/layout-sw600dp/resources_smallest_width_row.xml diff --git a/res/layout-sw720dp/resources_smallest_width_inner.xml b/app/src/main/res/layout-sw720dp/resources_smallest_width_inner.xml similarity index 100% rename from res/layout-sw720dp/resources_smallest_width_inner.xml rename to app/src/main/res/layout-sw720dp/resources_smallest_width_inner.xml diff --git a/res/layout-sw720dp/resources_smallest_width_row.xml b/app/src/main/res/layout-sw720dp/resources_smallest_width_row.xml similarity index 100% rename from res/layout-sw720dp/resources_smallest_width_row.xml rename to app/src/main/res/layout-sw720dp/resources_smallest_width_row.xml diff --git a/res/layout-w1024dp/resources_width.xml b/app/src/main/res/layout-w1024dp/resources_width.xml similarity index 100% rename from res/layout-w1024dp/resources_width.xml rename to app/src/main/res/layout-w1024dp/resources_width.xml diff --git a/res/layout-w600dp/resources_width.xml b/app/src/main/res/layout-w600dp/resources_width.xml similarity index 100% rename from res/layout-w600dp/resources_width.xml rename to app/src/main/res/layout-w600dp/resources_width.xml diff --git a/res/layout-w720dp/resources_width.xml b/app/src/main/res/layout-w720dp/resources_width.xml similarity index 100% rename from res/layout-w720dp/resources_width.xml rename to app/src/main/res/layout-w720dp/resources_width.xml diff --git a/res/layout/accessibility_node_provider.xml b/app/src/main/res/layout/accessibility_node_provider.xml similarity index 92% rename from res/layout/accessibility_node_provider.xml rename to app/src/main/res/layout/accessibility_node_provider.xml index e35a2c9..283b459 100644 --- a/res/layout/accessibility_node_provider.xml +++ b/app/src/main/res/layout/accessibility_node_provider.xml @@ -30,7 +30,7 @@ + class="io.appium.android.apis.accessibility.AccessibilityNodeProviderActivity$VirtualSubtreeRootView" > \ No newline at end of file diff --git a/res/layout/accessibility_service.xml b/app/src/main/res/layout/accessibility_service.xml similarity index 100% rename from res/layout/accessibility_service.xml rename to app/src/main/res/layout/accessibility_service.xml diff --git a/res/layout/action_bar_display_options.xml b/app/src/main/res/layout/action_bar_display_options.xml similarity index 100% rename from res/layout/action_bar_display_options.xml rename to app/src/main/res/layout/action_bar_display_options.xml diff --git a/res/layout/action_bar_display_options_custom.xml b/app/src/main/res/layout/action_bar_display_options_custom.xml similarity index 100% rename from res/layout/action_bar_display_options_custom.xml rename to app/src/main/res/layout/action_bar_display_options_custom.xml diff --git a/res/layout/action_bar_settings_action_provider.xml b/app/src/main/res/layout/action_bar_settings_action_provider.xml similarity index 100% rename from res/layout/action_bar_settings_action_provider.xml rename to app/src/main/res/layout/action_bar_settings_action_provider.xml diff --git a/res/layout/action_bar_tab_content.xml b/app/src/main/res/layout/action_bar_tab_content.xml similarity index 100% rename from res/layout/action_bar_tab_content.xml rename to app/src/main/res/layout/action_bar_tab_content.xml diff --git a/res/layout/action_bar_tabs.xml b/app/src/main/res/layout/action_bar_tabs.xml similarity index 100% rename from res/layout/action_bar_tabs.xml rename to app/src/main/res/layout/action_bar_tabs.xml diff --git a/res/layout/activity_animation.xml b/app/src/main/res/layout/activity_animation.xml similarity index 100% rename from res/layout/activity_animation.xml rename to app/src/main/res/layout/activity_animation.xml diff --git a/res/layout/activity_finish_affinity.xml b/app/src/main/res/layout/activity_finish_affinity.xml similarity index 100% rename from res/layout/activity_finish_affinity.xml rename to app/src/main/res/layout/activity_finish_affinity.xml diff --git a/res/layout/activity_recreate.xml b/app/src/main/res/layout/activity_recreate.xml similarity index 100% rename from res/layout/activity_recreate.xml rename to app/src/main/res/layout/activity_recreate.xml diff --git a/res/layout/alarm_controller.xml b/app/src/main/res/layout/alarm_controller.xml similarity index 100% rename from res/layout/alarm_controller.xml rename to app/src/main/res/layout/alarm_controller.xml diff --git a/res/layout/alarm_service.xml b/app/src/main/res/layout/alarm_service.xml similarity index 100% rename from res/layout/alarm_service.xml rename to app/src/main/res/layout/alarm_service.xml diff --git a/res/layout/alert_dialog.xml b/app/src/main/res/layout/alert_dialog.xml similarity index 97% rename from res/layout/alert_dialog.xml rename to app/src/main/res/layout/alert_dialog.xml index e30aba8..7c21209 100644 --- a/res/layout/alert_dialog.xml +++ b/app/src/main/res/layout/alert_dialog.xml @@ -14,7 +14,7 @@ limitations under the License. --> + See corresponding Java code io.appium.android.apis.app.AlertDialogSamples.java. -->