├── libs └── android-support-v4.jar ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── res ├── drawable-xhdpi │ ├── ic_launcher.png │ ├── item_focused.9.png │ └── item_pressed.9.png ├── values │ ├── attrs.xml │ ├── dimens.xml │ ├── colors.xml │ ├── strings.xml │ └── styles.xml ├── drawable │ ├── finish_background.xml │ └── selectable_item_background.xml └── layout │ ├── fragment_page.xml │ ├── list_item_review.xml │ ├── fragment_page_customer_info.xml │ └── activity_main.xml ├── .idea └── gradle.xml ├── src └── com │ └── example │ └── android │ └── wizardpager │ ├── wizard │ ├── ui │ │ ├── PageFragmentCallbacks.java │ │ ├── SingleChoiceFragment.java │ │ ├── MultipleChoiceFragment.java │ │ ├── CustomerInfoFragment.java │ │ ├── ReviewFragment.java │ │ └── StepPagerStrip.java │ └── model │ │ ├── PageTreeNode.java │ │ ├── ModelCallbacks.java │ │ ├── PageList.java │ │ ├── CustomerInfoPage.java │ │ ├── MultipleFixedChoicePage.java │ │ ├── ReviewItem.java │ │ ├── SingleFixedChoicePage.java │ │ ├── Page.java │ │ ├── AbstractWizardModel.java │ │ └── BranchPage.java │ ├── SandwichWizardModel.java │ └── MainActivity.java ├── .gitignore ├── README.md ├── AndroidManifest.xml ├── gradlew.bat ├── gradlew └── LICENSE /libs/android-support-v4.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/romannurik/Android-WizardPager/HEAD/libs/android-support-v4.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/romannurik/Android-WizardPager/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /res/drawable-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/romannurik/Android-WizardPager/HEAD/res/drawable-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /res/drawable-xhdpi/item_focused.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/romannurik/Android-WizardPager/HEAD/res/drawable-xhdpi/item_focused.9.png -------------------------------------------------------------------------------- /res/drawable-xhdpi/item_pressed.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/romannurik/Android-WizardPager/HEAD/res/drawable-xhdpi/item_pressed.9.png -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Wed Apr 10 15:27:10 PDT 2013 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.2.1-all.zip 7 | -------------------------------------------------------------------------------- /.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /res/values/attrs.xml: -------------------------------------------------------------------------------- 1 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 16 | 17 | 18 | 32dp 19 | 3dp 20 | 4dp 21 | 22 | -------------------------------------------------------------------------------- /res/drawable/finish_background.xml: -------------------------------------------------------------------------------- 1 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/com/example/android/wizardpager/wizard/ui/PageFragmentCallbacks.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013 Google Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.example.android.wizardpager.wizard.ui; 18 | 19 | import com.example.android.wizardpager.wizard.model.Page; 20 | 21 | public interface PageFragmentCallbacks { 22 | Page onGetPage(String key); 23 | } 24 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | 3 | # Local sandbox 4 | _sandbox 5 | 6 | # built application files 7 | *.apk 8 | *.ap_ 9 | 10 | # files for the dex VM 11 | *.dex 12 | 13 | # Java class files 14 | *.class 15 | 16 | # generated files 17 | out/ 18 | bin/ 19 | gen/ 20 | 21 | # Local configuration file (sdk path, etc) 22 | local.properties 23 | 24 | # Eclipse project files 25 | .classpath 26 | .project 27 | 28 | # IDEA files 29 | *.iml 30 | *.ipr 31 | *.iws 32 | 33 | # Other build files 34 | project.properties 35 | ant.properties 36 | build.xml 37 | proguard-project.txt 38 | 39 | # Built application files 40 | /*/build/ 41 | /build 42 | 43 | # Gradle generated files 44 | .gradle/ 45 | 46 | # User-specific configurations 47 | .idea/libraries/ 48 | .idea/workspace.xml 49 | .idea/tasks.xml 50 | .idea/.name 51 | .idea/compiler.xml 52 | .idea/copyright/profiles_settings.xml 53 | .idea/encodings.xml 54 | .idea/misc.xml 55 | .idea/modules.xml 56 | .idea/scopes/scope_settings.xml 57 | .idea/vcs.xml -------------------------------------------------------------------------------- /src/com/example/android/wizardpager/wizard/model/PageTreeNode.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013 Google Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.example.android.wizardpager.wizard.model; 18 | 19 | import java.util.ArrayList; 20 | 21 | /** 22 | * Represents a node in the page tree. Can either be a single page, or a page container. 23 | */ 24 | public interface PageTreeNode { 25 | public Page findByKey(String key); 26 | public void flattenCurrentPageSequence(ArrayList dest); 27 | } 28 | -------------------------------------------------------------------------------- /res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 16 | 17 | 18 | #4433b5e5 19 | #ff0099cc 20 | #ff669900 21 | #10000000 22 | 23 | #ff669900 24 | 25 | #66000000 26 | 27 | -------------------------------------------------------------------------------- /res/drawable/selectable_item_background.xml: -------------------------------------------------------------------------------- 1 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /src/com/example/android/wizardpager/wizard/model/ModelCallbacks.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013 Google Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.example.android.wizardpager.wizard.model; 18 | 19 | /** 20 | * Callback interface connecting {@link Page}, {@link AbstractWizardModel}, and model container 21 | * objects (e.g. {@link com.example.android.wizardpager.MainActivity}. 22 | */ 23 | public interface ModelCallbacks { 24 | void onPageDataChanged(Page page); 25 | void onPageTreeChanged(); 26 | } 27 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [![No Maintenance Intended](http://unmaintained.tech/badge.svg)](http://unmaintained.tech/) 2 | 3 | Android WizardPager Sample Code 4 | =============================== 5 | 6 | Example `ViewPager`-based wizard UI sample code. See [my Google+ post](https://plus.google.com/+RomanNurik/posts/6cVymZvn3f4) for more details. 7 | 8 | 9 | 10 | 11 | 12 | Additional page type examples (boolean and single text field) can be found in str4d's fork (`model`, `ui`). 13 | -------------------------------------------------------------------------------- /res/layout/fragment_page.xml: -------------------------------------------------------------------------------- 1 | 16 | 17 | 19 | 20 | 21 | 22 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 16 | 17 | 18 | Place Order 19 | 20 | Next 21 | Previous 22 | Submit order 23 | Review 24 | 25 | Name 26 | Email 27 | e.g. Larry 28 | Optional 29 | 30 | Place the order with the deli? You will receive an email 31 | confirmation. 32 | Place order 33 | 34 | -------------------------------------------------------------------------------- /AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 16 | 17 | 21 | 22 | 23 | 24 | 28 | 29 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /src/com/example/android/wizardpager/wizard/model/PageList.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013 Google Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.example.android.wizardpager.wizard.model; 18 | 19 | import java.util.ArrayList; 20 | 21 | /** 22 | * Represents a list of wizard pages. 23 | */ 24 | public class PageList extends ArrayList implements PageTreeNode { 25 | 26 | public PageList() { 27 | 28 | } 29 | 30 | public PageList(Page... pages) { 31 | for (Page page : pages) { 32 | add(page); 33 | } 34 | } 35 | 36 | @Override 37 | public Page findByKey(String key) { 38 | for (Page childPage : this) { 39 | Page found = childPage.findByKey(key); 40 | if (found != null) { 41 | return found; 42 | } 43 | } 44 | 45 | return null; 46 | } 47 | 48 | @Override 49 | public void flattenCurrentPageSequence(ArrayList dest) { 50 | for (Page childPage : this) { 51 | childPage.flattenCurrentPageSequence(dest); 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /res/layout/list_item_review.xml: -------------------------------------------------------------------------------- 1 | 16 | 17 | 27 | 28 | 37 | 38 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /src/com/example/android/wizardpager/wizard/model/CustomerInfoPage.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013 Google Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.example.android.wizardpager.wizard.model; 18 | 19 | import com.example.android.wizardpager.wizard.ui.CustomerInfoFragment; 20 | 21 | import android.support.v4.app.Fragment; 22 | import android.text.TextUtils; 23 | 24 | import java.util.ArrayList; 25 | 26 | /** 27 | * A page asking for a name and an email. 28 | */ 29 | public class CustomerInfoPage extends Page { 30 | public static final String NAME_DATA_KEY = "name"; 31 | public static final String EMAIL_DATA_KEY = "email"; 32 | 33 | public CustomerInfoPage(ModelCallbacks callbacks, String title) { 34 | super(callbacks, title); 35 | } 36 | 37 | @Override 38 | public Fragment createFragment() { 39 | return CustomerInfoFragment.create(getKey()); 40 | } 41 | 42 | @Override 43 | public void getReviewItems(ArrayList dest) { 44 | dest.add(new ReviewItem("Your name", mData.getString(NAME_DATA_KEY), getKey(), -1)); 45 | dest.add(new ReviewItem("Your email", mData.getString(EMAIL_DATA_KEY), getKey(), -1)); 46 | } 47 | 48 | @Override 49 | public boolean isCompleted() { 50 | return !TextUtils.isEmpty(mData.getString(NAME_DATA_KEY)); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/com/example/android/wizardpager/wizard/model/MultipleFixedChoicePage.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013 Google Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.example.android.wizardpager.wizard.model; 18 | 19 | import com.example.android.wizardpager.wizard.ui.MultipleChoiceFragment; 20 | 21 | import android.support.v4.app.Fragment; 22 | 23 | import java.util.ArrayList; 24 | 25 | /** 26 | * A page offering the user a number of non-mutually exclusive choices. 27 | */ 28 | public class MultipleFixedChoicePage extends SingleFixedChoicePage { 29 | public MultipleFixedChoicePage(ModelCallbacks callbacks, String title) { 30 | super(callbacks, title); 31 | } 32 | 33 | @Override 34 | public Fragment createFragment() { 35 | return MultipleChoiceFragment.create(getKey()); 36 | } 37 | 38 | @Override 39 | public void getReviewItems(ArrayList dest) { 40 | StringBuilder sb = new StringBuilder(); 41 | 42 | ArrayList selections = mData.getStringArrayList(Page.SIMPLE_DATA_KEY); 43 | if (selections != null && selections.size() > 0) { 44 | for (String selection : selections) { 45 | if (sb.length() > 0) { 46 | sb.append(", "); 47 | } 48 | sb.append(selection); 49 | } 50 | } 51 | 52 | dest.add(new ReviewItem(getTitle(), sb.toString(), getKey())); 53 | } 54 | 55 | @Override 56 | public boolean isCompleted() { 57 | ArrayList selections = mData.getStringArrayList(Page.SIMPLE_DATA_KEY); 58 | return selections != null && selections.size() > 0; 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /src/com/example/android/wizardpager/wizard/model/ReviewItem.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013 Google Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.example.android.wizardpager.wizard.model; 18 | 19 | /** 20 | * Represents a single line item on the final review page. 21 | * 22 | * @see com.example.android.wizardpager.wizard.ui.ReviewFragment 23 | */ 24 | public class ReviewItem { 25 | public static final int DEFAULT_WEIGHT = 0; 26 | 27 | private int mWeight; 28 | private String mTitle; 29 | private String mDisplayValue; 30 | private String mPageKey; 31 | 32 | public ReviewItem(String title, String displayValue, String pageKey) { 33 | this(title, displayValue, pageKey, DEFAULT_WEIGHT); 34 | } 35 | 36 | public ReviewItem(String title, String displayValue, String pageKey, int weight) { 37 | mTitle = title; 38 | mDisplayValue = displayValue; 39 | mPageKey = pageKey; 40 | mWeight = weight; 41 | } 42 | 43 | public String getDisplayValue() { 44 | return mDisplayValue; 45 | } 46 | 47 | public void setDisplayValue(String displayValue) { 48 | mDisplayValue = displayValue; 49 | } 50 | 51 | public String getPageKey() { 52 | return mPageKey; 53 | } 54 | 55 | public void setPageKey(String pageKey) { 56 | mPageKey = pageKey; 57 | } 58 | 59 | public String getTitle() { 60 | return mTitle; 61 | } 62 | 63 | public void setTitle(String title) { 64 | mTitle = title; 65 | } 66 | 67 | public int getWeight() { 68 | return mWeight; 69 | } 70 | 71 | public void setWeight(int weight) { 72 | mWeight = weight; 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /res/layout/fragment_page_customer_info.xml: -------------------------------------------------------------------------------- 1 | 16 | 17 | 19 | 20 | 21 | 22 | 28 | 29 | 32 | 33 | 35 | 36 | 43 | 44 | 46 | 47 | 53 | 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /src/com/example/android/wizardpager/wizard/model/SingleFixedChoicePage.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013 Google Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.example.android.wizardpager.wizard.model; 18 | 19 | import com.example.android.wizardpager.wizard.ui.SingleChoiceFragment; 20 | 21 | import android.support.v4.app.Fragment; 22 | import android.text.TextUtils; 23 | 24 | import java.util.ArrayList; 25 | import java.util.Arrays; 26 | 27 | /** 28 | * A page offering the user a number of mutually exclusive choices. 29 | */ 30 | public class SingleFixedChoicePage extends Page { 31 | protected ArrayList mChoices = new ArrayList(); 32 | 33 | public SingleFixedChoicePage(ModelCallbacks callbacks, String title) { 34 | super(callbacks, title); 35 | } 36 | 37 | @Override 38 | public Fragment createFragment() { 39 | return SingleChoiceFragment.create(getKey()); 40 | } 41 | 42 | public String getOptionAt(int position) { 43 | return mChoices.get(position); 44 | } 45 | 46 | public int getOptionCount() { 47 | return mChoices.size(); 48 | } 49 | 50 | @Override 51 | public void getReviewItems(ArrayList dest) { 52 | dest.add(new ReviewItem(getTitle(), mData.getString(SIMPLE_DATA_KEY), getKey())); 53 | } 54 | 55 | @Override 56 | public boolean isCompleted() { 57 | return !TextUtils.isEmpty(mData.getString(SIMPLE_DATA_KEY)); 58 | } 59 | 60 | public SingleFixedChoicePage setChoices(String... choices) { 61 | mChoices.addAll(Arrays.asList(choices)); 62 | return this; 63 | } 64 | 65 | public SingleFixedChoicePage setValue(String value) { 66 | mData.putString(SIMPLE_DATA_KEY, value); 67 | return this; 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 16 | 17 | 18 | 21 | 22 | 25 | 26 | 31 | 32 | 44 | 45 | 56 | 57 | -------------------------------------------------------------------------------- /gradlew.bat: -------------------------------------------------------------------------------- 1 | @if "%DEBUG%" == "" @echo off 2 | @rem ########################################################################## 3 | @rem 4 | @rem Gradle startup script for Windows 5 | @rem 6 | @rem ########################################################################## 7 | 8 | @rem Set local scope for the variables with windows NT shell 9 | if "%OS%"=="Windows_NT" setlocal 10 | 11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 12 | set DEFAULT_JVM_OPTS= 13 | 14 | set DIRNAME=%~dp0 15 | if "%DIRNAME%" == "" set DIRNAME=. 16 | set APP_BASE_NAME=%~n0 17 | set APP_HOME=%DIRNAME% 18 | 19 | @rem Find java.exe 20 | if defined JAVA_HOME goto findJavaFromJavaHome 21 | 22 | set JAVA_EXE=java.exe 23 | %JAVA_EXE% -version >NUL 2>&1 24 | if "%ERRORLEVEL%" == "0" goto init 25 | 26 | echo. 27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 28 | echo. 29 | echo Please set the JAVA_HOME variable in your environment to match the 30 | echo location of your Java installation. 31 | 32 | goto fail 33 | 34 | :findJavaFromJavaHome 35 | set JAVA_HOME=%JAVA_HOME:"=% 36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 37 | 38 | if exist "%JAVA_EXE%" goto init 39 | 40 | echo. 41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 42 | echo. 43 | echo Please set the JAVA_HOME variable in your environment to match the 44 | echo location of your Java installation. 45 | 46 | goto fail 47 | 48 | :init 49 | @rem Get command-line arguments, handling Windowz variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | if "%@eval[2+2]" == "4" goto 4NT_args 53 | 54 | :win9xME_args 55 | @rem Slurp the command line arguments. 56 | set CMD_LINE_ARGS= 57 | set _SKIP=2 58 | 59 | :win9xME_args_slurp 60 | if "x%~1" == "x" goto execute 61 | 62 | set CMD_LINE_ARGS=%* 63 | goto execute 64 | 65 | :4NT_args 66 | @rem Get arguments from the 4NT Shell from JP Software 67 | set CMD_LINE_ARGS=%$ 68 | 69 | :execute 70 | @rem Setup the command line 71 | 72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 73 | 74 | @rem Execute Gradle 75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 76 | 77 | :end 78 | @rem End local scope for the variables with windows NT shell 79 | if "%ERRORLEVEL%"=="0" goto mainEnd 80 | 81 | :fail 82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 83 | rem the _cmd.exe /c_ return code! 84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 85 | exit /b 1 86 | 87 | :mainEnd 88 | if "%OS%"=="Windows_NT" endlocal 89 | 90 | :omega 91 | -------------------------------------------------------------------------------- /res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 16 | 17 | 21 | 22 | 33 | 34 | 39 | 40 | 44 | 45 | 50 | 51 |