mirror of
https://github.com/ClaytonWWilson/Listify.git
synced 2025-12-16 10:48:46 +00:00
Merge pull request #129 from ClaytonWWilson/aaron-branch-2
Aaron branch 2
This commit is contained in:
commit
f3a54336b9
@ -67,6 +67,17 @@ public class ProfileFragment extends Fragment {
|
|||||||
Log.i("Authentication", e.toString());
|
Log.i("Authentication", e.toString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
View errorView = getLayoutInflater().inflate(R.layout.activity_erroralert, null);
|
||||||
|
AlertDialog.Builder builder2 = new AlertDialog.Builder(getActivity());
|
||||||
|
builder2.setView(errorView);
|
||||||
|
builder2.setPositiveButton("OK", new DialogInterface.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(DialogInterface dialog, int which) {}
|
||||||
|
});
|
||||||
|
AlertDialog dialog2 = builder2.create();
|
||||||
|
dialog2.show();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
builder.setNegativeButton("No", new DialogInterface.OnClickListener() {
|
builder.setNegativeButton("No", new DialogInterface.OnClickListener() {
|
||||||
|
|||||||
@ -0,0 +1,51 @@
|
|||||||
|
package com.example.listify.ui.store;
|
||||||
|
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.net.Uri;
|
||||||
|
import android.widget.TextView;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.fragment.app.Fragment;
|
||||||
|
|
||||||
|
import com.example.listify.R;
|
||||||
|
|
||||||
|
public class StoreFragment extends Fragment {
|
||||||
|
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||||
|
View root = inflater.inflate(R.layout.fragment_stores, container, false);
|
||||||
|
|
||||||
|
TextView krogerText = (TextView) root.findViewById(R.id.textView11);
|
||||||
|
krogerText.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
gotoUrl("https://www.kroger.com/");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
TextView kohlsText = (TextView) root.findViewById(R.id.textView12);
|
||||||
|
krogerText.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
gotoUrl("https://www.kohls.com/");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
TextView ebayText = (TextView) root.findViewById(R.id.textView13);
|
||||||
|
krogerText.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
gotoUrl("https://www.ebay.com/");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
return root;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void gotoUrl(String url) {
|
||||||
|
Uri u = Uri.parse(url);
|
||||||
|
startActivity(new Intent(Intent.ACTION_VIEW, u));
|
||||||
|
}
|
||||||
|
}
|
||||||
10
Listify/app/src/main/res/drawable/ic_baseline_store_24.xml
Normal file
10
Listify/app/src/main/res/drawable/ic_baseline_store_24.xml
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24"
|
||||||
|
android:tint="?attr/colorControlNormal">
|
||||||
|
<path
|
||||||
|
android:fillColor="@android:color/white"
|
||||||
|
android:pathData="M20,4L4,4v2h16L20,4zM21,14v-2l-1,-5L4,7l-1,5v2h1v6h10v-6h4v6h2v-6h1zM12,18L6,18v-4h6v4z"/>
|
||||||
|
</vector>
|
||||||
18
Listify/app/src/main/res/layout/activity_erroralert.xml
Normal file
18
Listify/app/src/main/res/layout/activity_erroralert.xml
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/textView9"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="16dp"
|
||||||
|
android:text="Incorrect password. Try again."
|
||||||
|
android:textSize="15sp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
@ -11,8 +11,8 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="51dp"
|
android:layout_marginTop="51dp"
|
||||||
android:text="Submit"
|
android:text="Submit"
|
||||||
app:layout_constraintEnd_toStartOf="@+id/textView6"
|
app:layout_constraintEnd_toStartOf="@+id/textView7"
|
||||||
app:layout_constraintStart_toStartOf="@+id/textView6"
|
app:layout_constraintStart_toStartOf="@+id/textView7"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/editTextTextPassword2" />
|
app:layout_constraintTop_toBottomOf="@+id/editTextTextPassword2" />
|
||||||
|
|
||||||
<EditText
|
<EditText
|
||||||
@ -46,8 +46,8 @@
|
|||||||
android:ems="10"
|
android:ems="10"
|
||||||
android:hint="Confirm New Password"
|
android:hint="Confirm New Password"
|
||||||
android:inputType="textPassword"
|
android:inputType="textPassword"
|
||||||
app:layout_constraintEnd_toStartOf="@+id/textView6"
|
app:layout_constraintEnd_toStartOf="@+id/textView7"
|
||||||
app:layout_constraintStart_toStartOf="@+id/textView6"
|
app:layout_constraintStart_toStartOf="@+id/textView7"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/editTextTextPassword" />
|
app:layout_constraintTop_toBottomOf="@+id/editTextTextPassword" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@ -56,7 +56,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginBottom="2dp"
|
android:layout_marginBottom="2dp"
|
||||||
android:text=""
|
android:text=""
|
||||||
app:layout_constraintBottom_toTopOf="@+id/button1"
|
app:layout_constraintBottom_toTopOf="@+id/textView7"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent" />
|
app:layout_constraintStart_toStartOf="parent" />
|
||||||
|
|
||||||
@ -69,4 +69,13 @@
|
|||||||
android:text="Please enter your email address."
|
android:text="Please enter your email address."
|
||||||
app:layout_constraintBottom_toTopOf="@+id/editTextTextEmailAddress"
|
app:layout_constraintBottom_toTopOf="@+id/editTextTextEmailAddress"
|
||||||
app:layout_constraintEnd_toEndOf="@+id/editTextTextEmailAddress" />
|
app:layout_constraintEnd_toEndOf="@+id/editTextTextEmailAddress" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/textView7"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text=""
|
||||||
|
app:layout_constraintBottom_toTopOf="@+id/button1"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent" />
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
@ -48,6 +48,7 @@
|
|||||||
android:layout_height="600dp"
|
android:layout_height="600dp"
|
||||||
android:layout_marginTop="50dp"
|
android:layout_marginTop="50dp"
|
||||||
android:paddingBottom="20dp"/>
|
android:paddingBottom="20dp"/>
|
||||||
|
|
||||||
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
|
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -12,8 +12,8 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="53dp"
|
android:layout_marginTop="53dp"
|
||||||
android:text="Log in"
|
android:text="Log in"
|
||||||
app:layout_constraintEnd_toStartOf="@+id/textView5"
|
app:layout_constraintEnd_toStartOf="@+id/textView8"
|
||||||
app:layout_constraintStart_toStartOf="@+id/textView5"
|
app:layout_constraintStart_toStartOf="@+id/textView8"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/button2" />
|
app:layout_constraintTop_toBottomOf="@+id/button2" />
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
@ -32,8 +32,8 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="72dp"
|
android:layout_marginTop="72dp"
|
||||||
android:text="Forgot password? Click here."
|
android:text="Forgot password? Click here."
|
||||||
app:layout_constraintEnd_toStartOf="@+id/textView5"
|
app:layout_constraintEnd_toStartOf="@+id/textView8"
|
||||||
app:layout_constraintStart_toStartOf="@+id/textView5"
|
app:layout_constraintStart_toStartOf="@+id/textView8"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/editTextTextPersonName" />
|
app:layout_constraintTop_toBottomOf="@+id/editTextTextPersonName" />
|
||||||
|
|
||||||
<EditText
|
<EditText
|
||||||
@ -73,6 +73,15 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text=""
|
android:text=""
|
||||||
|
app:layout_constraintBottom_toTopOf="@+id/textView8"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/textView8"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text=""
|
||||||
app:layout_constraintBottom_toTopOf="@+id/button3"
|
app:layout_constraintBottom_toTopOf="@+id/button3"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent" />
|
app:layout_constraintStart_toStartOf="parent" />
|
||||||
|
|||||||
@ -12,8 +12,8 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="65dp"
|
android:layout_marginTop="65dp"
|
||||||
android:text="Sign up"
|
android:text="Sign up"
|
||||||
app:layout_constraintEnd_toStartOf="@+id/textView3"
|
app:layout_constraintEnd_toStartOf="@+id/textView4"
|
||||||
app:layout_constraintStart_toStartOf="@+id/textView3"
|
app:layout_constraintStart_toStartOf="@+id/textView4"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/editTextTextPassword2" />
|
app:layout_constraintTop_toBottomOf="@+id/editTextTextPassword2" />
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
@ -77,6 +77,15 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginBottom="2dp"
|
android:layout_marginBottom="2dp"
|
||||||
android:text=""
|
android:text=""
|
||||||
|
app:layout_constraintBottom_toTopOf="@+id/textView4"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/textView4"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text=""
|
||||||
app:layout_constraintBottom_toTopOf="@+id/button2"
|
app:layout_constraintBottom_toTopOf="@+id/button2"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent" />
|
app:layout_constraintStart_toStartOf="parent" />
|
||||||
|
|||||||
51
Listify/app/src/main/res/layout/fragment_stores.xml
Normal file
51
Listify/app/src/main/res/layout/fragment_stores.xml
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/textView10"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="22dp"
|
||||||
|
android:layout_marginTop="30dp"
|
||||||
|
android:text="Stores available:"
|
||||||
|
android:textSize="20sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/textView11"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:text="Kroger"
|
||||||
|
android:textSize="20sp"
|
||||||
|
app:layout_constraintStart_toStartOf="@+id/textView10"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/textView10" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/textView12"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:text="Kohl's"
|
||||||
|
android:textSize="20sp"
|
||||||
|
app:layout_constraintStart_toStartOf="@+id/textView11"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/textView11" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/textView13"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:text="eBay"
|
||||||
|
android:textSize="20sp"
|
||||||
|
app:layout_constraintStart_toStartOf="@+id/textView12"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/textView12" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
@ -14,6 +14,11 @@
|
|||||||
android:icon="@drawable/ic_baseline_person_24"
|
android:icon="@drawable/ic_baseline_person_24"
|
||||||
android:title="@string/menu_profile" />
|
android:title="@string/menu_profile" />
|
||||||
|
|
||||||
|
<item
|
||||||
|
android:id="@+id/nav_stores"
|
||||||
|
android:icon="@drawable/ic_baseline_store_24"
|
||||||
|
android:title="@string/menu_stores" />
|
||||||
|
|
||||||
<item
|
<item
|
||||||
android:id="@+id/nav_logout"
|
android:id="@+id/nav_logout"
|
||||||
android:title="Sign out"
|
android:title="Sign out"
|
||||||
|
|||||||
@ -17,6 +17,12 @@
|
|||||||
android:label="@string/menu_profile"
|
android:label="@string/menu_profile"
|
||||||
tools:layout="@layout/fragment_profile" />
|
tools:layout="@layout/fragment_profile" />
|
||||||
|
|
||||||
|
<fragment
|
||||||
|
android:id="@+id/nav_stores"
|
||||||
|
android:name="com.example.listify.ui.store.StoreFragment"
|
||||||
|
android:label="@string/menu_stores"
|
||||||
|
tools:layout="@layout/fragment_stores" />
|
||||||
|
|
||||||
<fragment
|
<fragment
|
||||||
android:id="@+id/nav_gallery"
|
android:id="@+id/nav_gallery"
|
||||||
android:name="com.example.listify.ui.gallery.GalleryFragment"
|
android:name="com.example.listify.ui.gallery.GalleryFragment"
|
||||||
|
|||||||
@ -9,6 +9,7 @@
|
|||||||
|
|
||||||
<string name="menu_home">My Lists</string>
|
<string name="menu_home">My Lists</string>
|
||||||
<string name="menu_profile">Profile</string>
|
<string name="menu_profile">Profile</string>
|
||||||
|
<string name="menu_stores">Stores</string>
|
||||||
<string name="menu_gallery">Gallery</string>
|
<string name="menu_gallery">Gallery</string>
|
||||||
<string name="menu_slideshow">Slideshow</string>
|
<string name="menu_slideshow">Slideshow</string>
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user