Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,27 @@
import nyc.c4q.grocerystore.R;


class EmployeeListAdapter extends RecyclerView.Adapter{
class EmployeeListAdapter extends RecyclerView.Adapter {

private List<EmployeeDescription> mData = Arrays.asList(
new EmployeeDescription("Ashique", R.drawable.ashique),
new EmployeeDescription("Nesada", R.drawable.nk),
new EmployeeDescription("Lily", R.drawable.hui),
new EmployeeDescription("Hyunjoo", R.drawable.hyunjoo),
new EmployeeDescription("Helen", R.drawable.helen),
new EmployeeDescription("Derek", R.drawable.derek),
new EmployeeDescription("Andres",R.drawable.andreas),
new EmployeeDescription("Danny", R.drawable.danny),
new EmployeeDescription("Rook", R.drawable.rooks),
new EmployeeDescription("Wesnie", R.drawable.wesnie),
new EmployeeDescription("Jordan", R.drawable.jordan),
new EmployeeDescription("JoseV", R.drawable.josev),
new EmployeeDescription("Mila", R.drawable.mila),
new EmployeeDescription("Jose G.", R.drawable.joseg),
new EmployeeDescription("Akasha", R.drawable.aa_profile_pic),
new EmployeeDescription("Yojana", R.drawable.yojana1),
new EmployeeDescription("Taryn", R.drawable.taryn_selfie)
new EmployeeDescription("Shannon", R.drawable.shannon)
// new EmployeeDescription("Ashique", R.drawable.ashique),
// new EmployeeDescription("Nesada", R.drawable.nk),
// new EmployeeDescription("Lily", R.drawable.hui),
// new EmployeeDescription("Hyunjoo", R.drawable.hyunjoo),
// new EmployeeDescription("Helen", R.drawable.helen),
// new EmployeeDescription("Derek", R.drawable.derek),
// new EmployeeDescription("Andres", R.drawable.andreas),
// new EmployeeDescription("Danny", R.drawable.danny),
// new EmployeeDescription("Rook", R.drawable.rooks),
// new EmployeeDescription("Wesnie", R.drawable.wesnie),
// new EmployeeDescription("Jordan", R.drawable.jordan),
// new EmployeeDescription("JoseV", R.drawable.josev),
// new EmployeeDescription("Mila", R.drawable.mila),
// new EmployeeDescription("Jose G.", R.drawable.joseg),
// new EmployeeDescription("Akasha", R.drawable.aa_profile_pic),
// new EmployeeDescription("Yojana", R.drawable.yojana1),
// new EmployeeDescription("Taryn", R.drawable.taryn_selfie)


);
Expand All @@ -49,14 +50,15 @@ public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) {
}

private View.OnClickListener buildEmployeeClickListener(EmployeeDescription employee) {
if (employee != null){
if (employee != null) {
return navigateToEmployeeViewListener(employee.getName());
}
return defaultClickListener();
}

/**
* This click listener launches an intent with the employee name as an extra
*
* @param name
* @return
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import nyc.c4q.grocerystore.employeeHandbook.employees.Derek;
import nyc.c4q.grocerystore.employeeHandbook.employees.Nesada;
import nyc.c4q.grocerystore.employeeHandbook.employees.Rafael;
import nyc.c4q.grocerystore.employeeHandbook.employees.Shannon;
import nyc.c4q.grocerystore.employeeHandbook.employees.Wesnie;
import nyc.c4q.grocerystore.employeeHandbook.employees.Jordan;
import nyc.c4q.grocerystore.employeeHandbook.employees.JoseV;
Expand Down Expand Up @@ -45,6 +46,9 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
}

switch (employee) {
case "Shannon":
showShannon();
break;
case "Lily":
showHuiLily();
break;
Expand Down Expand Up @@ -94,6 +98,13 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {

}
}

private void showShannon(){
FragmentManager fragmentManager = getFragmentManager();
FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();
fragmentTransaction.add(R.id.employee_profile,new Shannon());
fragmentTransaction.commit();
}
private void showNesada(){
FragmentManager fragmentManager = getFragmentManager();
FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package nyc.c4q.grocerystore.employeeHandbook.employees;

import android.app.Fragment;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import nyc.c4q.grocerystore.R;

/**
* Created by shannonalexander-navarro on 10/24/16.
*/

public class Shannon extends Fragment {
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
return inflater.inflate(R.layout.shannon_alexander, container, false);
}
}
Binary file removed app/src/main/res/drawable/profile1.jpg
Binary file not shown.
Binary file added app/src/main/res/drawable/shannon.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 12 additions & 15 deletions app/src/main/res/layout/shannon_alexander.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,9 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="centerCrop"
android:src="@drawable/ramen1" />
android:src="@drawable/ramen1"
android:layout_below="@+id/photo_image_view2" />

<ImageView
android:id="@+id/photo_image_view2"
android:layout_width="200dp"
android:layout_height="200dp"
android:layout_centerHorizontal="true"
android:src="@drawable/profile1" />
<ImageView
android:id="@+id/photo_image_view3"
android:layout_width="200dp"
android:layout_height="200dp"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:src="@drawable/dumplings1" />
<TextView
android:id="@+id/text_name"
android:layout_width="wrap_content"
Expand All @@ -37,7 +25,7 @@
android:textStyle="bold"
android:textSize="40sp"
android:layout_centerHorizontal="true"
android:layout_below="@id/photo_image_view2"/>
android:layout_below="@+id/photo_image_view2" />
<TextView
android:id="@+id/text_nickname"
android:layout_width="wrap_content"
Expand All @@ -58,4 +46,13 @@
android:textSize="20sp"
android:layout_centerHorizontal="true"
android:layout_below="@id/text_nickname"/>

<ImageView
android:id="@+id/photo_image_view2"
android:layout_width="200dp"
android:layout_height="200dp"
android:src="@drawable/shannon"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true" />

</RelativeLayout>