├── .gitignore ├── .travis.yml ├── CODE_OF_CONDUCT.md ├── LICENSE ├── ParseLoginSampleBasic ├── build.gradle └── src │ └── main │ ├── AndroidManifest.xml │ ├── java │ └── com │ │ └── parse │ │ └── loginsample │ │ └── basic │ │ ├── SampleApplication.java │ │ └── SampleProfileActivity.java │ └── res │ ├── drawable-xxhdpi │ └── ic_launcher.png │ ├── layout-land │ └── activity_profile.xml │ ├── layout │ └── activity_profile.xml │ ├── values-v11 │ └── themes.xml │ └── values │ ├── strings.xml │ └── themes.xml ├── ParseLoginSampleCodeCustomization ├── build.gradle └── src │ └── main │ ├── AndroidManifest.xml │ ├── java │ └── com │ │ └── parse │ │ └── loginsample │ │ └── codecustomization │ │ ├── SampleApplication.java │ │ └── SampleProfileActivity.java │ └── res │ ├── drawable-xxhdpi │ └── ic_launcher.png │ ├── layout-land │ └── activity_profile.xml │ ├── layout │ └── activity_profile.xml │ ├── values-v11 │ └── themes.xml │ └── values │ ├── strings.xml │ └── themes.xml ├── ParseLoginSampleLayoutOverride ├── build.gradle └── src │ └── main │ ├── AndroidManifest.xml │ ├── java │ └── com │ │ └── parse │ │ └── loginsample │ │ └── layoutoverride │ │ ├── SampleApplication.java │ │ └── SampleProfileActivity.java │ └── res │ ├── drawable-xxhdpi │ ├── background.png │ └── ic_launcher.png │ ├── layout-land │ ├── activity_profile.xml │ └── com_parse_ui_parse_login_fragment.xml │ ├── layout │ ├── activity_profile.xml │ └── com_parse_ui_parse_login_fragment.xml │ ├── values-v11 │ └── themes.xml │ └── values │ ├── strings.xml │ ├── styles.xml │ └── themes.xml ├── ParseLoginSampleWithDispatchActivity ├── build.gradle └── src │ └── main │ ├── AndroidManifest.xml │ ├── java │ └── com │ │ └── parse │ │ └── loginsample │ │ └── withdispatchactivity │ │ ├── SampleApplication.java │ │ ├── SampleDispatchActivity.java │ │ └── SampleProfileActivity.java │ └── res │ ├── drawable-xxhdpi │ └── ic_launcher.png │ ├── layout-land │ └── activity_profile.xml │ ├── layout │ └── activity_profile.xml │ ├── values-v11 │ └── themes.xml │ └── values │ ├── strings.xml │ └── themes.xml ├── ParseUI-Widget-Sample ├── build.gradle ├── proguard-rules.pro └── src │ └── main │ ├── AndroidManifest.xml │ ├── java │ └── com │ │ └── parse │ │ └── ui │ │ └── widget │ │ └── sample │ │ ├── MainActivity.java │ │ └── MyApplication.java │ └── res │ ├── layout │ ├── activity_list.xml │ └── activity_main.xml │ ├── mipmap-hdpi │ └── ic_launcher.png │ ├── mipmap-mdpi │ └── ic_launcher.png │ ├── mipmap-xhdpi │ └── ic_launcher.png │ ├── mipmap-xxhdpi │ └── ic_launcher.png │ ├── mipmap-xxxhdpi │ └── ic_launcher.png │ ├── values-w820dp │ └── dimens.xml │ └── values │ ├── colors.xml │ ├── dimens.xml │ ├── keys.xml │ ├── strings.xml │ └── styles.xml ├── README.md ├── build.gradle ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── login ├── build.gradle └── src │ └── main │ ├── AndroidManifest.xml │ ├── java │ └── com │ │ └── parse │ │ └── ui │ │ └── login │ │ ├── ParseLoginActivity.java │ │ ├── ParseLoginBuilder.java │ │ ├── ParseLoginConfig.java │ │ ├── ParseLoginDispatchActivity.java │ │ ├── ParseLoginFragment.java │ │ ├── ParseLoginFragmentBase.java │ │ ├── ParseLoginHelpFragment.java │ │ ├── ParseOnLoadingListener.java │ │ ├── ParseOnLoginSuccessListener.java │ │ └── ParseSignupFragment.java │ └── res │ ├── color │ └── com_parse_ui_parse_login_help_button_label_selector.xml │ ├── drawable-xxhdpi │ ├── com_parse_ui_app_logo.png │ ├── com_parse_ui_facebook_login_logo.png │ └── com_parse_ui_twitter_login_logo.png │ ├── drawable │ ├── com_parse_ui_facebook_login_button_background_selector.xml │ ├── com_parse_ui_parse_login_button_background_selector.xml │ └── com_parse_ui_twitter_login_button_background_selector.xml │ ├── layout-land │ ├── com_parse_ui_parse_login_fragment.xml │ ├── com_parse_ui_parse_login_help_fragment.xml │ └── com_parse_ui_parse_signup_fragment.xml │ ├── layout │ ├── com_parse_ui_parse_login_app_logo.xml │ ├── com_parse_ui_parse_login_form.xml │ ├── com_parse_ui_parse_login_fragment.xml │ ├── com_parse_ui_parse_login_help_form.xml │ ├── com_parse_ui_parse_login_help_fragment.xml │ ├── com_parse_ui_parse_login_third_party_section.xml │ ├── com_parse_ui_parse_signup_form.xml │ └── com_parse_ui_parse_signup_fragment.xml │ ├── values-es │ └── strings.xml │ ├── values-ko │ └── strings.xml │ ├── values-pt │ └── strings.xml │ ├── values-zh-rHK │ └── strings.xml │ ├── values-zh-rTW │ └── strings.xml │ ├── values-zh │ └── strings.xml │ └── values │ ├── colors.xml │ ├── dimens.xml │ ├── strings.xml │ └── styles.xml ├── settings.gradle └── widget ├── build.gradle └── src ├── androidTest ├── AndroidManifest.xml ├── java │ └── com │ │ └── parse │ │ ├── ParseImageViewTest.java │ │ ├── ParseQueryAdapterOfflineEnabledTest.java │ │ ├── ParseQueryAdapterTest.java │ │ └── TestActivity.java └── res │ ├── drawable │ └── icon.png │ └── layout │ └── view_item.xml └── main ├── AndroidManifest.xml └── java └── com └── parse ├── ParseUiUtil.java └── ui └── widget ├── ParseImageView.java ├── ParseQueryAdapter.java └── ParseQueryPager.java /.gitignore: -------------------------------------------------------------------------------- 1 | # Eclipse 2 | .project 3 | .metadata 4 | tmp/** 5 | tmp/**/* 6 | *.tmp 7 | *.bak 8 | *~.nib 9 | .classpath 10 | .settings/ 11 | .loadpath 12 | **/bin/* 13 | **/gen/* 14 | testData 15 | testCache 16 | server.config 17 | 18 | # Locally stored "Eclipse launch configurations" 19 | *.launch 20 | 21 | # Android 22 | # built application files 23 | *.apk 24 | *.ap_ 25 | 26 | # Java class files 27 | *.class 28 | 29 | # Local configuration file (sdk path, etc) 30 | local.properties 31 | 32 | # Other 33 | .DS_Store 34 | 35 | # Android Studio 36 | .idea 37 | *.iml 38 | *.ipr 39 | *.iws 40 | classes 41 | gen-external-apklibs 42 | 43 | # Gradle 44 | .gradle 45 | build 46 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | branches: 2 | only: 3 | - master 4 | - /^v4-\d+\.\d+\.\d+$/ # regex 5 | 6 | language: android 7 | 8 | jdk: 9 | - openjdk8 10 | 11 | before_install: 12 | - mkdir "$ANDROID_HOME/licenses" || true 13 | - echo "24333f8a63b6825ea9c5514f83c2829b004d1fee" > "$ANDROID_HOME/licenses/android-sdk-license" 14 | 15 | script: 16 | - ./gradlew clean build 17 | 18 | cache: 19 | directories: 20 | - $HOME/.gradle 21 | - $HOME/.m2/repository 22 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | In the interest of fostering an open and welcoming environment, we as 6 | contributors and maintainers pledge to making participation in our project and 7 | our community a harassment-free experience for everyone, regardless of age, body 8 | size, disability, ethnicity, sex characteristics, gender identity and expression, 9 | level of experience, education, socio-economic status, nationality, personal 10 | appearance, race, religion, or sexual identity and orientation. 11 | 12 | ## Our Standards 13 | 14 | Examples of behavior that contributes to creating a positive environment 15 | include: 16 | 17 | * Using welcoming and inclusive language 18 | * Being respectful of differing viewpoints and experiences 19 | * Gracefully accepting constructive criticism 20 | * Focusing on what is best for the community 21 | * Showing empathy towards other community members 22 | 23 | Examples of unacceptable behavior by participants include: 24 | 25 | * The use of sexualized language or imagery and unwelcome sexual attention or 26 | advances 27 | * Trolling, insulting/derogatory comments, and personal or political attacks 28 | * Public or private harassment 29 | * Publishing others' private information, such as a physical or electronic 30 | address, without explicit permission 31 | * Other conduct which could reasonably be considered inappropriate in a 32 | professional setting 33 | 34 | ## Our Responsibilities 35 | 36 | Project maintainers are responsible for clarifying the standards of acceptable 37 | behavior and are expected to take appropriate and fair corrective action in 38 | response to any instances of unacceptable behavior. 39 | 40 | Project maintainers have the right and responsibility to remove, edit, or 41 | reject comments, commits, code, wiki edits, issues, and other contributions 42 | that are not aligned to this Code of Conduct, or to ban temporarily or 43 | permanently any contributor for other behaviors that they deem inappropriate, 44 | threatening, offensive, or harmful. 45 | 46 | ## Scope 47 | 48 | This Code of Conduct applies both within project spaces and in public spaces 49 | when an individual is representing the project or its community. Examples of 50 | representing a project or community include using an official project e-mail 51 | address, posting via an official social media account, or acting as an appointed 52 | representative at an online or offline event. Representation of a project may be 53 | further defined and clarified by project maintainers. 54 | 55 | ## Enforcement 56 | 57 | Instances of abusive, harassing, or otherwise unacceptable behavior may be 58 | reported by contacting the project team at codeofconduct@parseplatform.org. All 59 | complaints will be reviewed and investigated and will result in a response that 60 | is deemed necessary and appropriate to the circumstances. The project team is 61 | obligated to maintain confidentiality with regard to the reporter of an incident. 62 | Further details of specific enforcement policies may be posted separately. 63 | 64 | Project maintainers who do not follow or enforce the Code of Conduct in good 65 | faith may face temporary or permanent repercussions as determined by other 66 | members of the project's leadership. 67 | 68 | ## Attribution 69 | 70 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, 71 | available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html 72 | 73 | [homepage]: https://www.contributor-covenant.org 74 | 75 | For answers to common questions about this code of conduct, see 76 | https://www.contributor-covenant.org/faq 77 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2014, Parse, LLC. All rights reserved. 2 | 3 | You are hereby granted a non-exclusive, worldwide, royalty-free license to use, 4 | copy, modify, and distribute this software in source code or binary form for use 5 | in connection with the web services and APIs provided by Parse. 6 | 7 | As with any software that integrates with the Parse platform, your use of 8 | this software is subject to the Parse Terms of Service 9 | [https://www.parse.com/about/terms]. This copyright notice shall be 10 | included in all copies or substantial portions of the software. 11 | 12 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 13 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 14 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 15 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 16 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 17 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 18 | 19 | ----- 20 | 21 | As of April 5, 2017, Parse, LLC has transferred this code to the parse-community organization, and will no longer be contributing to or distributing this code. 22 | -------------------------------------------------------------------------------- /ParseLoginSampleBasic/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: "com.android.application" 2 | 3 | android { 4 | compileSdkVersion rootProject.ext.compileSdkVersion 5 | 6 | defaultConfig { 7 | minSdkVersion rootProject.ext.minSdkVersion 8 | targetSdkVersion rootProject.ext.targetSdkVersion 9 | } 10 | lintOptions { 11 | abortOnError false 12 | } 13 | } 14 | 15 | dependencies { 16 | // rootProject.ext.* variables are defined in project gradle file, you can also use path here. 17 | implementation project(":login") 18 | implementation rootProject.ext.appcompat 19 | implementation rootProject.ext.parse 20 | implementation rootProject.ext.parseFacebookUtils 21 | implementation rootProject.ext.parseTwitterUtils 22 | } 23 | -------------------------------------------------------------------------------- /ParseLoginSampleBasic/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 20 | 22 | 23 | 24 | 25 | 26 | 32 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 46 | 49 | 52 | 55 | 58 | 59 | 60 | 63 | 66 | 69 | 70 | 71 | 72 | -------------------------------------------------------------------------------- /ParseLoginSampleBasic/src/main/java/com/parse/loginsample/basic/SampleApplication.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014, Parse, LLC. All rights reserved. 3 | * 4 | * You are hereby granted a non-exclusive, worldwide, royalty-free license to use, 5 | * copy, modify, and distribute this software in source code or binary form for use 6 | * in connection with the web services and APIs provided by Parse. 7 | * 8 | * As with any software that integrates with the Parse platform, your use of 9 | * this software is subject to the Parse Terms of Service 10 | * [https://www.parse.com/about/terms]. This copyright notice shall be 11 | * included in all copies or substantial portions of the software. 12 | * 13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | * 20 | */ 21 | 22 | package com.parse.loginsample.basic; 23 | 24 | import android.app.Application; 25 | 26 | import com.parse.Parse; 27 | import com.parse.facebook.ParseFacebookUtils; 28 | import com.parse.twitter.ParseTwitterUtils; 29 | 30 | public class SampleApplication extends Application { 31 | @Override 32 | public void onCreate() { 33 | super.onCreate(); 34 | // Required - Initialize the Parse SDK 35 | Parse.Configuration configuration = new Parse.Configuration.Builder(this) 36 | .build(); 37 | Parse.initialize(configuration); 38 | 39 | Parse.setLogLevel(Parse.LOG_LEVEL_DEBUG); 40 | 41 | ParseFacebookUtils.initialize(this); 42 | 43 | // Optional - If you don't want to allow Twitter login, you can 44 | // remove this line (and other related ParseTwitterUtils calls) 45 | ParseTwitterUtils.initialize(getString(R.string.twitter_consumer_key), 46 | getString(R.string.twitter_consumer_secret)); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /ParseLoginSampleBasic/src/main/java/com/parse/loginsample/basic/SampleProfileActivity.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014, Parse, LLC. All rights reserved. 3 | * 4 | * You are hereby granted a non-exclusive, worldwide, royalty-free license to use, 5 | * copy, modify, and distribute this software in source code or binary form for use 6 | * in connection with the web services and APIs provided by Parse. 7 | * 8 | * As with any software that integrates with the Parse platform, your use of 9 | * this software is subject to the Parse Terms of Service 10 | * [https://www.parse.com/about/terms]. This copyright notice shall be 11 | * included in all copies or substantial portions of the software. 12 | * 13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | * 20 | */ 21 | 22 | package com.parse.loginsample.basic; 23 | 24 | import android.app.Activity; 25 | import android.os.Bundle; 26 | import android.view.View; 27 | import android.view.View.OnClickListener; 28 | import android.widget.Button; 29 | import android.widget.TextView; 30 | 31 | import com.parse.ParseUser; 32 | import com.parse.ui.login.ParseLoginBuilder; 33 | 34 | /** 35 | * Shows the user profile. This simple activity can function regardless of whether the user 36 | * is currently logged in. 37 | */ 38 | public class SampleProfileActivity extends Activity { 39 | private static final int LOGIN_REQUEST = 0; 40 | 41 | private TextView titleTextView; 42 | private TextView emailTextView; 43 | private TextView nameTextView; 44 | private Button loginOrLogoutButton; 45 | 46 | private ParseUser currentUser; 47 | 48 | @Override 49 | protected void onCreate(Bundle savedInstanceState) { 50 | super.onCreate(savedInstanceState); 51 | 52 | setContentView(R.layout.activity_profile); 53 | titleTextView = (TextView) findViewById(R.id.profile_title); 54 | emailTextView = (TextView) findViewById(R.id.profile_email); 55 | nameTextView = (TextView) findViewById(R.id.profile_name); 56 | loginOrLogoutButton = (Button) findViewById(R.id.login_or_logout_button); 57 | titleTextView.setText(R.string.profile_title_logged_in); 58 | 59 | loginOrLogoutButton.setOnClickListener(new OnClickListener() { 60 | @Override 61 | public void onClick(View v) { 62 | if (currentUser != null) { 63 | // User clicked to log out. 64 | ParseUser.logOut(); 65 | currentUser = null; 66 | showProfileLoggedOut(); 67 | } else { 68 | // User clicked to log in. 69 | ParseLoginBuilder loginBuilder = new ParseLoginBuilder( 70 | SampleProfileActivity.this); 71 | startActivityForResult(loginBuilder.build(), LOGIN_REQUEST); 72 | } 73 | } 74 | }); 75 | } 76 | 77 | @Override 78 | protected void onStart() { 79 | super.onStart(); 80 | 81 | currentUser = ParseUser.getCurrentUser(); 82 | if (currentUser != null) { 83 | showProfileLoggedIn(); 84 | } else { 85 | showProfileLoggedOut(); 86 | } 87 | } 88 | 89 | /** 90 | * Shows the profile of the given user. 91 | */ 92 | private void showProfileLoggedIn() { 93 | titleTextView.setText(R.string.profile_title_logged_in); 94 | emailTextView.setText(currentUser.getEmail()); 95 | String fullName = currentUser.getString("name"); 96 | if (fullName != null) { 97 | nameTextView.setText(fullName); 98 | } 99 | loginOrLogoutButton.setText(R.string.profile_logout_button_label); 100 | } 101 | 102 | /** 103 | * Show a message asking the user to log in, toggle login/logout button text. 104 | */ 105 | private void showProfileLoggedOut() { 106 | titleTextView.setText(R.string.profile_title_logged_out); 107 | emailTextView.setText(""); 108 | nameTextView.setText(""); 109 | loginOrLogoutButton.setText(R.string.profile_login_button_label); 110 | } 111 | } 112 | -------------------------------------------------------------------------------- /ParseLoginSampleBasic/src/main/res/drawable-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/parse-community/ParseUI-Android/e904896af739bb0cc3331a2801e7335a3ffcb5a7/ParseLoginSampleBasic/src/main/res/drawable-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /ParseLoginSampleBasic/src/main/res/layout-land/activity_profile.xml: -------------------------------------------------------------------------------- 1 | 10 | 11 | 16 | 17 | 23 | 24 | 29 | 30 | 35 | 36 |