use of com.example.c4q.capstone.userinterface.user.userprofilefragments.fragmentanimation.ScreenSlidePagerAdapter in project Grupp by tmoronta1208.
the class UserProfileActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_user_profile);
toolbar = findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
mAuth = FirebaseAuth.getInstance();
mPager = findViewById(R.id.pager);
mPagerAdapter = new ScreenSlidePagerAdapter(getSupportFragmentManager());
mPager.setAdapter(mPagerAdapter);
context = this;
activity = this;
floatingActionMenu = findViewById(R.id.floatingaction_menu);
creatEvent = findViewById(R.id.create_event_mini);
creatEvent.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
startActivity(new Intent(UserProfileActivity.this, CreateEventActivity.class));
}
});
addPerson = findViewById(R.id.add_group_mini);
addPerson.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// startActivity(new Intent(UserProfileActivity.this, AddPersonActivity.class));
UPCreateGroupFragment upCreateGroupFragment = new UPCreateGroupFragment();
FragmentManager fragmentManager = getSupportFragmentManager();
FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();
fragmentTransaction.addToBackStack("Grupp Details Fragment").replace(R.id.drawer_layout, upCreateGroupFragment);
fragmentTransaction.commit();
}
});
mAuthListner = new FirebaseAuth.AuthStateListener() {
@Override
public void onAuthStateChanged(@NonNull FirebaseAuth firebaseAuth) {
if (mAuth.getCurrentUser() == null) {
startActivity(new Intent(UserProfileActivity.this, LoginActivity.class));
}
}
};
pushEventInviteNotifications();
// new InviteNotifications("test", "notification", getApplicationContext());
}
Aggregations