Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class ProfileFragment extends Fragment {
- //Toolbar toolbar;
- @Nullable
- @Override
- public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
- return inflater.inflate(R.layout.fragment_profile, container, false);
- getView().findViewById(R.id.toolbar);
- ((AppCompatActivity)getActivity()).setSupportActionBar(toolbar);
- }
- @Override
- public boolean onCreateOptionsMenu(android.view.Menu menu) {
- getMenuInflater().inflate(R.menu.profile_menu, menu);
- getMenuInflater().inflate(R.menu.home, menu);
- return super.onCreateOptionsMenu(menu);
- }
- @Override
- public boolean onOptionsItemSelected(MenuItem item) {
- int id = item.getItemId();
- switch (id) {
- case R.id.edit_profile:
- break;
- case R.id.change_password:
- break;
- case R.id.log_out:
- break;
- }
- return super.onOptionsItemSelected(item);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement