Paul profile #6

Merged
11306084 merged 29 commits from paul-profile into master 2017-06-22 11:39:39 +02:00
Showing only changes of commit bd2b69a330 - Show all commits

View File

@@ -17,7 +17,7 @@ import android.view.ViewGroup;
* Use the {@link ProfileFragment#newInstance} factory method to
* create an instance of this fragment.
*/
public class ProfileFragment extends Fragment {
public class ProfileFragment extends Fragment implements View.OnClickListener{
// TODO: Rename parameter arguments, choose names that match
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
private static final String ARG_PARAM1 = "param1";
@@ -51,6 +51,11 @@ public class ProfileFragment extends Fragment {
return fragment;
}
protected void bindOnClick() {
profilePicButton.setOnClickListener(this);
logOutButton.setOnClickListener(this);
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
@@ -74,6 +79,18 @@ public class ProfileFragment extends Fragment {
}
}
@Override
public void onClick(View v) {
switch (v.getId()) {
case R.id.profile_pic_button:
profilePicOnClick();
break;
case R.id.logout_button:
logOutOnClick();
break;
}
}
@Override
public void onAttach(Context context) {
super.onAttach(context);