Skip to content

Commit 73ffa86

Browse files
committed
ParseLoginUI library project
1 parent 6963290 commit 73ffa86

File tree

97 files changed

+4619
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

97 files changed

+4619
-0
lines changed

.gitignore

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
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

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "facebook-sdk"]
2+
path = facebook-sdk
3+
url = git@github.com:facebook/facebook-android-sdk.git

CONTRIBUTING.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Contributing to ParseUI
2+
We want to make contributing to this project as easy and transparent as possible.
3+
4+
## Pull Requests
5+
We actively welcome your pull requests.
6+
7+
1. Fork the repo and create your branch from `master`.
8+
2. If you've added code that should be tested, add tests
9+
3. If you've changed APIs, update the documentation.
10+
4. Ensure the test suite passes.
11+
5. Make sure your code lints.
12+
6. If you haven't already, complete the Contributor License Agreement ("CLA").
13+
14+
## Contributor License Agreement ("CLA")
15+
In order to accept your pull request, we need you to submit a CLA. You only need to do this once to work on any of Facebook's open source projects.
16+
17+
Complete your CLA here: <https://developers.facebook.com/opensource/cla>
18+
19+
## Issues
20+
We use GitHub issues to track public bugs. Please ensure your description is clear and has sufficient instructions to be able to reproduce the issue.
21+
22+
Facebook has a [bounty program](https://www.facebook.com/whitehat/) for the safe disclosure of security bugs. In those cases, please go through the process outlined on that page and do not file a public issue.
23+
24+
## Coding Style
25+
* Most importantly, match the existing code style as much as possible.
26+
* Try to keep lines under 100 characters, if possible.
27+
28+
## License
29+
By contributing to ParseUI, you agree that your contributions will be licensed under its license.

LICENSE

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
Copyright (c) 2014, Facebook, Inc. 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 Facebook.
6+
7+
As with any software that integrates with the Facebook platform, your use of
8+
this software is subject to the Facebook Developer Principles and Policies
9+
[http://developers.facebook.com/policy/]. 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.
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2+
package="com.parse.loginsample.basic"
3+
android:versionCode="1"
4+
android:versionName="1.0">
5+
6+
<uses-sdk
7+
android:minSdkVersion="8"
8+
android:targetSdkVersion="19"/>
9+
10+
<uses-permission android:name="android.permission.INTERNET"/>
11+
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
12+
13+
<application
14+
android:name=".SampleApplication"
15+
android:allowBackup="true"
16+
android:icon="@drawable/ic_launcher"
17+
android:label="@string/app_name"
18+
android:theme="@style/AppTheme">
19+
<activity
20+
android:name=".SampleProfileActivity"
21+
android:label="@string/app_name"
22+
android:launchMode="singleTop">
23+
<intent-filter>
24+
<action android:name="android.intent.action.MAIN"/>
25+
26+
<category android:name="android.intent.category.LAUNCHER"/>
27+
</intent-filter>
28+
</activity>
29+
<activity
30+
android:name="com.parse.ui.ParseLoginActivity"
31+
android:label="@string/app_name"
32+
android:launchMode="singleTop">
33+
<meta-data
34+
android:name="com.parse.ui.ParseLoginActivity.PARSE_LOGIN_ENABLED"
35+
android:value="true"/>
36+
<meta-data
37+
android:name="com.parse.ui.ParseLoginActivity.PARSE_LOGIN_EMAIL_AS_USERNAME"
38+
android:value="true"/>
39+
<meta-data
40+
android:name="com.parse.ui.ParseLoginActivity.FACEBOOK_LOGIN_ENABLED"
41+
android:value="true"/>
42+
<meta-data
43+
android:name="com.parse.ui.ParseLoginActivity.TWITTER_LOGIN_ENABLED"
44+
android:value="true"/>
45+
</activity>
46+
<activity
47+
android:name="com.facebook.LoginActivity"
48+
android:label="@string/app_name"
49+
android:launchMode="singleTop"/>
50+
51+
<meta-data
52+
android:name="com.facebook.sdk.ApplicationId"
53+
android:value="@string/facebook_app_id"/>
54+
</application>
55+
56+
</manifest>

ParseLoginSampleBasic/build.gradle

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
apply plugin: 'android'
2+
3+
dependencies {
4+
compile project(':ParseLoginUI')
5+
compile project(':facebook-sdk:facebook')
6+
compile 'com.android.support:support-v4:13.0.+'
7+
compile fileTree(dir: 'libs', include: '*.jar')
8+
}
9+
10+
android {
11+
compileSdkVersion rootProject.ext.compileSdkVersion
12+
buildToolsVersion rootProject.ext.buildToolsVersion
13+
14+
defaultConfig {
15+
minSdkVersion rootProject.ext.minSdkVersion
16+
targetSdkVersion rootProject.ext.targetSdkVersion
17+
}
18+
19+
sourceSets {
20+
main {
21+
manifest.srcFile 'AndroidManifest.xml'
22+
java.srcDirs = ['src']
23+
res.srcDirs = ['res']
24+
}
25+
}
26+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# This file is automatically generated by Android Tools.
2+
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
3+
#
4+
# This file must be checked in Version Control Systems.
5+
#
6+
# To customize properties used by the Ant build system edit
7+
# "ant.properties", and override values to adapt the script to your
8+
# project structure.
9+
#
10+
# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
11+
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
12+
13+
# Project target.
14+
target=android-19
15+
android.library.reference.1=../ParseLoginUI
74.2 KB
Loading
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
2+
android:layout_width="match_parent"
3+
android:layout_height="match_parent"
4+
android:paddingTop="@dimen/com_parse_ui_vertical_margin"
5+
android:paddingLeft="@dimen/com_parse_ui_horizontal_margin"
6+
android:paddingRight="@dimen/com_parse_ui_horizontal_margin"
7+
android:paddingBottom="@dimen/com_parse_ui_vertical_margin"
8+
android:gravity="center"
9+
android:orientation="vertical">
10+
11+
<LinearLayout
12+
android:layout_width="match_parent"
13+
android:layout_height="wrap_content"
14+
android:gravity="center"
15+
android:orientation="vertical">
16+
17+
<TextView
18+
android:id="@+id/profile_title"
19+
android:layout_width="wrap_content"
20+
android:layout_height="wrap_content"
21+
style="@style/ParseLoginUI.TextView"
22+
android:text="@string/profile_title_logged_in" />
23+
24+
<TextView
25+
android:id="@+id/profile_name"
26+
android:layout_width="wrap_content"
27+
android:layout_height="wrap_content"
28+
style="@style/ParseLoginUI.TextView" />
29+
30+
<TextView
31+
android:id="@+id/profile_email"
32+
android:layout_width="wrap_content"
33+
android:layout_height="wrap_content"
34+
style="@style/ParseLoginUI.TextView" />
35+
36+
<Button
37+
android:id="@+id/login_or_logout_button"
38+
style="@style/ParseLoginUI.Button"
39+
android:layout_marginTop="@dimen/com_parse_ui_large_vertical_spacing"
40+
android:text="@string/profile_logout_button_label"/>
41+
</LinearLayout>
42+
</LinearLayout>
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
2+
android:layout_width="match_parent"
3+
android:layout_height="match_parent"
4+
android:paddingTop="@dimen/com_parse_ui_vertical_margin"
5+
android:paddingLeft="@dimen/com_parse_ui_horizontal_margin"
6+
android:paddingRight="@dimen/com_parse_ui_horizontal_margin"
7+
android:paddingBottom="@dimen/com_parse_ui_vertical_margin"
8+
android:gravity="center"
9+
android:orientation="vertical">
10+
11+
<include
12+
layout="@layout/com_parse_ui_parse_login_app_logo"
13+
android:layout_width="wrap_content"
14+
android:layout_height="wrap_content"
15+
android:layout_weight="0.5"/>
16+
17+
<LinearLayout
18+
android:layout_width="match_parent"
19+
android:layout_height="0dp"
20+
android:layout_weight="0.5"
21+
android:gravity="center"
22+
android:orientation="vertical">
23+
24+
<TextView
25+
android:id="@+id/profile_title"
26+
android:layout_width="wrap_content"
27+
android:layout_height="wrap_content"
28+
style="@style/ParseLoginUI.TextView"
29+
android:text="@string/profile_title_logged_in" />
30+
31+
<TextView
32+
android:id="@+id/profile_name"
33+
android:layout_width="wrap_content"
34+
android:layout_height="wrap_content"
35+
style="@style/ParseLoginUI.TextView" />
36+
37+
<TextView
38+
android:id="@+id/profile_email"
39+
android:layout_width="wrap_content"
40+
android:layout_height="wrap_content"
41+
style="@style/ParseLoginUI.TextView" />
42+
43+
<Button
44+
android:id="@+id/login_or_logout_button"
45+
style="@style/ParseLoginUI.Button"
46+
android:layout_marginTop="@dimen/com_parse_ui_large_vertical_spacing"
47+
android:text="@string/profile_logout_button_label"/>
48+
</LinearLayout>
49+
</LinearLayout>

0 commit comments

Comments
 (0)