use of com.polito.mad17.madmax.activities.BarDetailFragment in project MadMax by deviz92.
the class GroupDetailActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.app_bar_main);
databaseReference = FirebaseDatabase.getInstance().getReference();
Intent intent = getIntent();
groupID = intent.getStringExtra("groupID");
userID = intent.getStringExtra("userID");
Log.d(TAG, "onCreate di GroupDetailActivity. Group: " + groupID);
Bundle bundle = new Bundle();
bundle.putString("groupID", groupID);
bundle.putString("userID", userID);
if (findViewById(R.id.collapsed_content) != null) {
Log.d(TAG, groupID);
barDetailFragment.setArguments(bundle);
getSupportFragmentManager().beginTransaction().replace(R.id.collapsed_content, barDetailFragment).commit();
}
if (findViewById(R.id.main) != null) {
Log.d(TAG, groupID);
DetailFragment detailFragment = new DetailFragment();
detailFragment.setArguments(bundle);
getSupportFragmentManager().beginTransaction().replace(R.id.main, detailFragment).commit();
}
}
use of com.polito.mad17.madmax.activities.BarDetailFragment in project MadMax by deviz92.
the class FriendDetailActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.app_bar_main);
fab = (FloatingActionButton) findViewById(R.id.fab);
updateFab(0);
Log.d(TAG, "onCreate di FriendDetailActivity");
// ID dell'amico di cui sto guardando il dettaglio
Intent intent = getIntent();
friendID = intent.getStringExtra("friendID");
userID = intent.getStringExtra("userID");
if (findViewById(R.id.collapsed_content) != null) {
Bundle bundle = new Bundle();
bundle.putString("friendID", friendID);
Log.d(TAG, friendID);
BarDetailFragment barDetailFragment = new BarDetailFragment();
barDetailFragment.setArguments(bundle);
getSupportFragmentManager().beginTransaction().replace(R.id.collapsed_content, barDetailFragment).commit();
DetailFragment detailFragment = new DetailFragment();
detailFragment.setArguments(bundle);
getSupportFragmentManager().beginTransaction().replace(R.id.main, detailFragment).commit();
}
}
Aggregations