Java 类android.app.FragmentBreadCrumbs 实例源码
项目:saarang-iosched
文件:MapMultiPaneActivity.java
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(com.saarang.samples.apps.iosched.R.layout.activity_map);
FragmentManager fm = getFragmentManager();
fm.addOnBackStackChangedListener(this);
mFragmentBreadCrumbs = (FragmentBreadCrumbs) findViewById(com.saarang.samples.apps.iosched.R.id.breadcrumbs);
mFragmentBreadCrumbs.setActivity(this);
findViewById(com.saarang.samples.apps.iosched.R.id.close_button).setOnClickListener(new View.OnClickListener() {
public void onClick(View view) {
clearBackStack(false);
}
});
updateBreadCrumbs();
onConfigurationChanged(getResources().getConfiguration());
/* [ANALYTICS:SCREEN]
* TRIGGER: View the map screen on a tablet.
* LABEL: 'MapMultipane'
* [/ANALYTICS]
*/
AnalyticsManager.sendScreenView(SCREEN_LABEL);
LOGD("Tracker", SCREEN_LABEL);
overridePendingTransition(0, 0);
}
项目:AppDevFestSudeste2015
文件:MapMultiPaneActivity.java
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_map);
FragmentManager fm = getFragmentManager();
fm.addOnBackStackChangedListener(this);
mFragmentBreadCrumbs = (FragmentBreadCrumbs) findViewById(R.id.breadcrumbs);
mFragmentBreadCrumbs.setActivity(this);
findViewById(R.id.close_button).setOnClickListener(new View.OnClickListener() {
public void onClick(View view) {
clearBackStack(false);
}
});
updateBreadCrumbs();
onConfigurationChanged(getResources().getConfiguration());
/* [ANALYTICS:SCREEN]
* TRIGGER: View the map screen on a tablet.
* LABEL: 'MapMultipane'
* [/ANALYTICS]
*/
AnalyticsManager.sendScreenView(SCREEN_LABEL);
LOGD("Tracker", SCREEN_LABEL);
overridePendingTransition(0, 0);
}
项目:saarang-iosched
文件:MapMultiPaneActivity.java
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(com.saarang.samples.apps.iosched.R.layout.activity_map);
FragmentManager fm = getFragmentManager();
fm.addOnBackStackChangedListener(this);
mFragmentBreadCrumbs = (FragmentBreadCrumbs) findViewById(com.saarang.samples.apps.iosched.R.id.breadcrumbs);
mFragmentBreadCrumbs.setActivity(this);
findViewById(com.saarang.samples.apps.iosched.R.id.close_button).setOnClickListener(new View.OnClickListener() {
public void onClick(View view) {
clearBackStack(false);
}
});
updateBreadCrumbs();
onConfigurationChanged(getResources().getConfiguration());
/* [ANALYTICS:SCREEN]
* TRIGGER: View the map screen on a tablet.
* LABEL: 'MapMultipane'
* [/ANALYTICS]
*/
AnalyticsManager.sendScreenView(SCREEN_LABEL);
LOGD("Tracker", SCREEN_LABEL);
overridePendingTransition(0, 0);
}
项目:mobile-client
文件:ScheduleMultiPaneActivity.java
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_schedule);
mFragmentManager = getSupportFragmentManager();
mFragmentBreadCrumbs = (FragmentBreadCrumbs) findViewById(R.id.breadcrumbs);
mFragmentBreadCrumbs.setActivity(this);
mFragmentManager.addOnBackStackChangedListener(this);
updateBreadCrumb();
}
项目:mobile-client
文件:MapActivity.java
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_map);
mFragmentManager = getSupportFragmentManager();
if (UIUtils.isHoneycombTablet(this)) {
mFragmentBreadCrumbs = (FragmentBreadCrumbs) findViewById(R.id.breadcrumbs);
mFragmentBreadCrumbs.setActivity(this);
}
mFragmentManager.addOnBackStackChangedListener(this);
final FragmentManager fm = getSupportFragmentManager();
mMapFragment = (MapFragment) fm.findFragmentByTag("map");
if (mMapFragment == null) {
mMapFragment = new MapFragment();
mMapFragment.setArguments(intentToFragmentArguments(getIntent()));
fm.beginTransaction().add(R.id.root_container, mMapFragment, "map")
.commit();
}
final View closeButton = findViewById(R.id.close_button);
if (closeButton != null) {
closeButton.setOnClickListener(new View.OnClickListener() {
public void onClick(View view) {
clearBackStack(getSupportFragmentManager());
showHideDetailAndPan(false);
}
});
}
updateBreadCrumb();
}
项目:mobile-client
文件:ScheduleMultiPaneActivity.java
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_schedule);
mFragmentManager = getSupportFragmentManager();
mFragmentBreadCrumbs = (FragmentBreadCrumbs) findViewById(R.id.breadcrumbs);
mFragmentBreadCrumbs.setActivity(this);
mFragmentManager.addOnBackStackChangedListener(this);
updateBreadCrumb();
}
项目:iosched2013
文件:MapMultiPaneActivity.java
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_map);
FragmentManager fm = getSupportFragmentManager();
fm.addOnBackStackChangedListener(this);
mFragmentBreadCrumbs = (FragmentBreadCrumbs) findViewById(R.id.breadcrumbs);
mFragmentBreadCrumbs.setActivity(this);
mMapFragment = (MapFragment) fm.findFragmentByTag("map");
if (mMapFragment == null) {
mMapFragment = new MapFragment();
mMapFragment.setArguments(intentToFragmentArguments(getIntent()));
fm.beginTransaction()
.add(R.id.fragment_container_map, mMapFragment, "map")
.commit();
}
findViewById(R.id.close_button).setOnClickListener(new View.OnClickListener() {
public void onClick(View view) {
clearBackStack(false);
}
});
updateBreadCrumbs();
onConfigurationChanged(getResources().getConfiguration());
}
项目:devfestnorte-app
文件:MapMultiPaneActivity.java
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_map);
getLPreviewUtils().trySetActionBar();
FragmentManager fm = getFragmentManager();
fm.addOnBackStackChangedListener(this);
mFragmentBreadCrumbs = (FragmentBreadCrumbs) findViewById(R.id.breadcrumbs);
mFragmentBreadCrumbs.setActivity(this);
mMapFragment = (MapFragment) fm.findFragmentByTag("map");
if (mMapFragment == null) {
mMapFragment = MapFragment.newInstance();
mMapFragment.setArguments(intentToFragmentArguments(getIntent()));
fm.beginTransaction()
.add(R.id.fragment_container_map, mMapFragment, "map")
.commit();
}
findViewById(R.id.close_button).setOnClickListener(new View.OnClickListener() {
public void onClick(View view) {
clearBackStack(false);
}
});
updateBreadCrumbs();
onConfigurationChanged(getResources().getConfiguration());
/* [ANALYTICS:SCREEN]
* TRIGGER: View the map screen on a tablet.
* LABEL: 'MapMultipane'
* [/ANALYTICS]
*/
AnalyticsManager.sendScreenView(SCREEN_LABEL);
LOGD("Tracker", SCREEN_LABEL);
overridePendingTransition(0, 0);
final Resources res = getResources();
mActionBarOffColor = res.getColor(R.color.translucent_actionbar_background);
mActionBarOnColor = res.getColor(R.color.theme_primary);
// Initialise and set background drawable here explicitly to ensure the background
// is drawn when the background color is changed on JellyBean
mActionBarBgDrawable = new ColorDrawable(mActionBarOffColor);
getActionBar().setBackgroundDrawable(mActionBarBgDrawable);
}
项目:mobile-client
文件:SpeakersActivity.java
@SuppressLint("NewApi") @Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_speakers);
mFragmentManager = getSupportFragmentManager();
mFragmentManager.addOnBackStackChangedListener(this);
Intent intent = new Intent();
intent.setData(CfpContract.Speakers.CONTENT_URI);
final FragmentManager fm = getSupportFragmentManager();
if (UIUtils.isHoneycombTablet(this)) {
mSpeakersGridFragment = (SpeakersGridFragment) fm
.findFragmentByTag("speakers");
if (mSpeakersGridFragment == null) {
mSpeakersGridFragment = new SpeakersGridFragment();
mSpeakersGridFragment
.setArguments(intentToFragmentArguments(intent));
fm.beginTransaction()
.add(R.id.root_container, mSpeakersGridFragment,
"speakers").commit();
}
} else {
mSpeakersListFragment = (SpeakersListFragment) fm
.findFragmentByTag("speakers");
if (mSpeakersListFragment == null) {
mSpeakersListFragment = new SpeakersListFragment();
mSpeakersListFragment
.setArguments(intentToFragmentArguments(intent));
fm.beginTransaction()
.add(R.id.root_container, mSpeakersListFragment,
"speakers").commit();
}
}
if (UIUtils.isHoneycombTablet(this)) {
mFragmentBreadCrumbs = (FragmentBreadCrumbs) findViewById(R.id.breadcrumbs);
mFragmentBreadCrumbs.setActivity(this);
}
mFragmentManager.addOnBackStackChangedListener(this);
updateBreadCrumb();
}
项目:mobile-client
文件:SpeakersActivity.java
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_speakers);
mFragmentManager = getSupportFragmentManager();
mFragmentManager.addOnBackStackChangedListener(this);
Intent intent = new Intent();
intent.setData(CfpContract.Speakers.CONTENT_URI);
final FragmentManager fm = getSupportFragmentManager();
if (UIUtils.isHoneycombTablet(this)) {
mSpeakersGridFragment = (SpeakersGridFragment) fm
.findFragmentByTag("speakers");
if (mSpeakersGridFragment == null) {
mSpeakersGridFragment = new SpeakersGridFragment();
mSpeakersGridFragment
.setArguments(intentToFragmentArguments(intent));
fm.beginTransaction()
.add(R.id.root_container, mSpeakersGridFragment,
"speakers").commit();
}
} else {
mSpeakersListFragment = (SpeakersListFragment) fm
.findFragmentByTag("speakers");
if (mSpeakersListFragment == null) {
mSpeakersListFragment = new SpeakersListFragment();
mSpeakersListFragment
.setArguments(intentToFragmentArguments(intent));
fm.beginTransaction()
.add(R.id.root_container, mSpeakersListFragment,
"speakers").commit();
}
}
if (UIUtils.isHoneycombTablet(this)) {
mFragmentBreadCrumbs = (FragmentBreadCrumbs) findViewById(R.id.breadcrumbs);
mFragmentBreadCrumbs.setActivity(this);
}
mFragmentManager.addOnBackStackChangedListener(this);
updateBreadCrumb();
}