This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
var CoffeeScript, crypto, csonCache, fs, getCachePath, multiplyString, parseContents, parseContentsSync, parseObject, path, stringifyArray, stringifyBoolean, stringifyIndent, stringifyNull, stringifyNumber, stringifyObject, stringifyString, writeCacheFile, writeCacheFileSync, _; | |
crypto = require('crypto'); | |
path = require('path'); | |
_ = require('underscore-plus'); | |
fs = require('fs-plus'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
android.support.v7.app.ActionBar actionBar = ((AppCompatActivity) getActivity()).getSupportActionBar(); | |
Toolbar toolBar = (Toolbar) getActivity().findViewById(R.id.toolbar); | |
Log.d("DEBUG VERSIONFRAGMENT", "Actionbar: " + actionBar); | |
if (toolBar != null) { | |
toolBar.setBackgroundColor(getResources().getColor(R.color.red_background)); | |
toolBar.setTitle("TEMPORARY TITLE"); | |
toolBar.setTitleTextColor(R.color.white); | |
Log.d("DEBUGG VERSIONFRAGMENT", (String) toolBar.getTitle()); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Take care of popping the fragment back stack or finishing the activity | |
* as appropriate. | |
*/ | |
public void onBackPressed() { | |
if (!mFragments.popBackStackImmediate()) { | |
supportFinishAfterTransition(); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protected void switchToFragment(Fragment fragment) { | |
switchToFragment(fragment, false, null); | |
} | |
protected void switchToFragment(Fragment fragment, boolean addToBackStack, String tag) { | |
if (fragment != null) { | |
FragmentTransaction transaction = getFragmentManager().beginTransaction().replace(R.id.container, fragment); | |
if (addToBackStack) { transaction.addToBackStack(tag); } |