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 @@ -14,7 +14,8 @@
class EmployeeListAdapter extends RecyclerView.Adapter{

private List<EmployeeDescription> mData = Arrays.asList(
new EmployeeDescription("Ashique", R.drawable.ashique)
new EmployeeDescription("Ashique", R.drawable.ashique),
new EmployeeDescription("Max", R.drawable.maxrosadoprofilepic)
);

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

import nyc.c4q.grocerystore.R;
import nyc.c4q.grocerystore.employeeHandbook.employees.Ashique;
import nyc.c4q.grocerystore.employeeHandbook.employees.Max;

public class EmployeeView extends AppCompatActivity {
public static final String EMPLOYEE_NAME = "extra.employee.name";
Expand All @@ -18,7 +19,16 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
setContentView(R.layout.employee_view);
String employee = getIntent().getStringExtra(EMPLOYEE_NAME);
if(employee != null){
// call a function
switch (employee) {
case "Ashique":
showAshique();
break;
case "Max":
showMax();
break;
default:
break;
}
}
}

Expand All @@ -28,4 +38,11 @@ private void showAshique(){
fragmentTransaction.add(R.id.employee_profile,new Ashique());
fragmentTransaction.commit();
}

private void showMax(){
FragmentManager fragmentManager = getFragmentManager();
FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();
fragmentTransaction.add(R.id.employee_profile, new Max());
fragmentTransaction.commit();
}
}
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 ashiquechowdhury on 10/11/16.
*/
public class Max extends Fragment {

@Nullable
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
return inflater.inflate(R.layout.maxrosado,container,false);
}
}
11 changes: 6 additions & 5 deletions app/src/main/res/layout/maxrosado.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:background="@drawable/duesexbackground">
android:background="@drawable/deusexbackground">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
Expand All @@ -30,7 +30,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAlignment="center"
android:text=" Description: Doing things. For science!"
android:text=" Description: Doing things. For science! And stuff! Much stuff!"
android:id="@+id/textView2"
android:textColor="#ffffff"
android:textSize="9pt"
Expand All @@ -49,13 +49,14 @@
android:layout_height="180dp"
android:scaleType="centerCrop"
android:src="@drawable/adamjensen"
android:layout_marginTop="270dp"
android:layout_marginLeft="60dp"/>
android:layout_marginLeft="60dp"
android:layout_above="@+id/textView2" />
<ImageView
android:layout_width="180dp"
android:layout_height="197dp"
android:scaleType="centerCrop"
android:src="@drawable/sariflogo"
android:layout_marginTop="255dp"
android:layout_marginLeft="168dp"/>
android:layout_marginLeft="168dp"
android:layout_above="@+id/textView2" />
</RelativeLayout>
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.1'
classpath 'com.android.tools.build:gradle:2.2.2'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Maximus027 this file shouldn't be modified


// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand Down