@@ -12,13 +12,28 @@
/**
* Created by andrey on 6/21/17.
*/

public class ItemArrayAdapter extends BaseAdapter {

Context context;
ArrayList<Item> list;
/**
* The Context.
*/
private Context context;
/**
* The List.
*/
private ArrayList<Item> list;

/**
* The LayoutInflater
*/
private static LayoutInflater inflater = null;

/**
* Instantiates a new Item array adapter.
*
* @param context the context
* @param list the list
*/
public ItemArrayAdapter(Context context, ArrayList<Item> list) {
this.context = context;
this.list = list;
@@ -50,4 +65,4 @@ public View getView(int position, View convertView, ViewGroup parent) {
text.setText(list.get(position).getName());
return vi;
}
}
}
@@ -20,7 +20,6 @@
/**
* Created by andrey on 6/21/17.
*/

public class ItemView extends AppCompatActivity {

private ListView activityItemView;
@@ -45,7 +45,10 @@ public class LoginActivity extends AppCompatActivity implements LoaderCallbacks<
* Id to identity READ_CONTACTS permission request.
*/
private static final int REQUEST_READ_CONTACTS = 0;
// Email regex
/**
* The constant VALID_EMAIL_ADDRESS_REGEX.
*/
// Email regex
public static final Pattern VALID_EMAIL_ADDRESS_REGEX = Pattern.compile("^[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,6}$", Pattern.CASE_INSENSITIVE);

// UI references.
@@ -103,7 +106,7 @@ public void onClick(View view) {
Button bannedButton = (Button) findViewById(R.id.goToBanPage);
bannedButton.setOnClickListener(new View.OnClickListener() {
public void onClick(View view) {
startActivity(new Intent(LoginActivity.this, Banned_Unbanned.class));
startActivity(new Intent(LoginActivity.this, BannedUnbanned.class));
}
});

@@ -310,7 +313,7 @@ private void cancelLogin() {

private void sendToBan() {
if (numberOfTries == 3) {
startActivity(new Intent(LoginActivity.this, Banned_Unbanned.class));
startActivity(new Intent(LoginActivity.this, BannedUnbanned.class));
}
}

@@ -359,12 +362,21 @@ private void addEmailsToAutoComplete(List<String> emailAddressCollection) {


private interface ProfileQuery {
/**
* The Projection.
*/
String[] PROJECTION = {
ContactsContract.CommonDataKinds.Email.ADDRESS,
ContactsContract.CommonDataKinds.Email.IS_PRIMARY,
};

/**
* The constant ADDRESS.
*/
int ADDRESS = 0;
/**
* The constant IS_PRIMARY.
*/
int IS_PRIMARY = 1;
}
}
@@ -6,6 +6,9 @@
import android.view.View;
import android.widget.Button;

/**
* The type Logout screen.
*/
public class Logout_Screen extends AppCompatActivity {

@Override
@@ -15,7 +15,6 @@
/**
* Created by will on 6/23/17.
*/

public class NewItemActivity extends AppCompatActivity {

// UI references
@@ -41,6 +41,9 @@
import static android.Manifest.permission.READ_CONTACTS;
import static com.example.RB.rebasejumpers.LoginActivity.VALID_EMAIL_ADDRESS_REGEX;

/**
* The type Registration activity 1.
*/
public class RegistrationActivity1 extends AppCompatActivity implements LoaderManager.LoaderCallbacks<Cursor> {
// Id to identify READ_CONTACTS permission request
private static final int REQUEST_READ_CONTACTS = 0;
@@ -207,13 +210,35 @@ private void addEmailsToAutoComplete(List<String> emailAddressCollection) {
mEmailView.setAdapter(adapter);
}

/**
* The type User.
*/
public static class User {
/**
* The Email.
*/
public String email;
/**
* The Username.
*/
public String username;
/**
* The Password.
*/
public String password;

/**
* Instantiates a new User.
*/
public User() {}

/**
* Instantiates a new User.
*
* @param email the email
* @param username the username
* @param password the password
*/
public User(String email, String username, String password) {
this.email = email;
this.username = username;
@@ -252,12 +277,21 @@ public void onClick(View v) {
}

private interface ProfileQuery {
/**
* The Projection.
*/
String[] PROJECTION = {
ContactsContract.CommonDataKinds.Email.ADDRESS,
ContactsContract.CommonDataKinds.Email.IS_PRIMARY,
};

/**
* The constant ADDRESS.
*/
int ADDRESS = 0;
/**
* The constant IS_PRIMARY.
*/
int IS_PRIMARY = 1;
}
}
@@ -0,0 +1,8 @@
/**
* Pretty much the whole project
*
* @since 1.0
* @author will
* @version 1.0
*/
package com.example.RB.rebasejumpers;
@@ -4,7 +4,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.example.RB.rebasejumpers.Banned_Unbanned">
tools:context="com.example.RB.rebasejumpers.BannedUnbanned">

<pl.droidsonroids.gif.GifImageView
android:id="@+id/gifImageView"
@@ -34,7 +34,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
android:elevation="6dp"
android:text="Cancel Login" />
</LinearLayout>
@@ -63,8 +63,7 @@
android:layout_height="wrap_content"
android:hint="@string/prompt_email"
android:inputType="textEmailAddress"
android:maxLines="1"
android:singleLine="true" />
android:maxLines="1" />

</android.support.design.widget.TextInputLayout>

@@ -81,8 +80,7 @@
android:imeActionLabel="@string/action_sign_in_short"
android:imeOptions="actionUnspecified"
android:inputType="textPassword"
android:maxLines="1"
android:singleLine="true" />
android:maxLines="1" />

</android.support.design.widget.TextInputLayout>

@@ -28,6 +28,7 @@
android:layout_alignStart="@+id/textView2"
android:layout_below="@+id/textView2"
android:layout_marginTop="18dp"
android:labelFor="@+id/user_email_string"
android:text="Create New Email:" />

<AutoCompleteTextView
@@ -47,6 +48,7 @@
android:layout_alignStart="@+id/user_email_string"
android:layout_below="@+id/user_email_string"
android:layout_marginTop="26dp"
android:labelFor="@+id/password_string"
android:text="Create New Password
(these are stored plain text, do not use a real one):" />

@@ -5,7 +5,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
tools:context="com.example.RB.rebasejumpers.Banned_Unbanned"
tools:context="com.example.RB.rebasejumpers.BannedUnbanned"
tools:showIn="@layout/activity_banned__unbanned">

<Button
@@ -25,6 +25,7 @@
android:layout_alignStart="@+id/textView2"
android:layout_below="@+id/textView2"
android:layout_marginTop="26dp"
android:labelFor="@+id/item_name"
android:text="What item is missing?" />

<EditText
@@ -33,6 +34,7 @@
android:layout_height="wrap_content"
android:layout_marginTop="24dp"
android:ems="10"
android:inputType="text"
android:layout_below="@+id/textView4"
android:layout_alignStart="@+id/textView4" />

@@ -7,5 +7,5 @@
# Location of the SDK. This is only used by Gradle.
# For customization when using a Version Control System, please read the
# header note.
#Sat Jun 24 11:46:38 EDT 2017
sdk.dir=/Users/maddy/Library/Android/sdk
#Mon Jun 26 00:09:54 EDT 2017
sdk.dir=/home/will/Android/Sdk