use of android.support.annotation.CallSuper in project acra by ACRA.
the class CrashReportDialog method init.
@CallSuper
@Override
protected void init(@Nullable Bundle savedInstanceState) {
scrollable = new LinearLayout(this);
scrollable.setOrientation(LinearLayout.VERTICAL);
sharedPreferencesFactory = new SharedPreferencesFactory(getApplicationContext(), getConfig());
final int themeResourceId = getConfig().resDialogTheme();
if (themeResourceId != ACRAConstants.DEFAULT_RES_VALUE)
setTheme(themeResourceId);
buildAndShowDialog(savedInstanceState);
}
use of android.support.annotation.CallSuper in project wire-android by wireapp.
the class GlyphProgressView method init.
@CallSuper
protected void init() {
strokeWidth = ViewUtils.toPx(getContext(), DEFAULT_STROKE_WIDTH_DP);
progressPaint = new Paint();
progressPaint.setStrokeWidth(strokeWidth);
progressPaint.setAntiAlias(true);
progressPaint.setStyle(Paint.Style.STROKE);
updateRectF();
startAngle = DEFAULT_START_ANGLE;
setGravity(Gravity.CENTER);
}
use of android.support.annotation.CallSuper in project android_frameworks_base by DirtyUnicorns.
the class BaseActivity method onPrepareOptionsMenu.
@Override
@CallSuper
public boolean onPrepareOptionsMenu(Menu menu) {
super.onPrepareOptionsMenu(menu);
mSearchManager.showMenu(canSearchRoot());
final boolean inRecents = getCurrentDirectory() == null;
final MenuItem sort = menu.findItem(R.id.menu_sort);
final MenuItem sortSize = menu.findItem(R.id.menu_sort_size);
final MenuItem grid = menu.findItem(R.id.menu_grid);
final MenuItem list = menu.findItem(R.id.menu_list);
final MenuItem advanced = menu.findItem(R.id.menu_advanced);
final MenuItem fileSize = menu.findItem(R.id.menu_file_size);
// Search uses backend ranking; no sorting, recents doesn't support sort.
sort.setEnabled(!inRecents && !mSearchManager.isSearching());
// Only sort by size when file sizes are visible
sortSize.setVisible(mState.showSize);
fileSize.setVisible(!mState.forceSize);
// grid/list is effectively a toggle.
grid.setVisible(mState.derivedMode != State.MODE_GRID);
list.setVisible(mState.derivedMode != State.MODE_LIST);
advanced.setVisible(mState.showAdvancedOption);
advanced.setTitle(mState.showAdvancedOption && mState.showAdvanced ? R.string.menu_advanced_hide : R.string.menu_advanced_show);
fileSize.setTitle(LocalPreferences.getDisplayFileSize(this) ? R.string.menu_file_size_hide : R.string.menu_file_size_show);
return true;
}
use of android.support.annotation.CallSuper in project android_frameworks_base by ResurrectionRemix.
the class BaseActivity method onPrepareOptionsMenu.
@Override
@CallSuper
public boolean onPrepareOptionsMenu(Menu menu) {
super.onPrepareOptionsMenu(menu);
mSearchManager.showMenu(canSearchRoot());
final boolean inRecents = getCurrentDirectory() == null;
final MenuItem sort = menu.findItem(R.id.menu_sort);
final MenuItem sortSize = menu.findItem(R.id.menu_sort_size);
final MenuItem grid = menu.findItem(R.id.menu_grid);
final MenuItem list = menu.findItem(R.id.menu_list);
final MenuItem advanced = menu.findItem(R.id.menu_advanced);
final MenuItem fileSize = menu.findItem(R.id.menu_file_size);
// Search uses backend ranking; no sorting, recents doesn't support sort.
sort.setEnabled(!inRecents && !mSearchManager.isSearching());
// Only sort by size when file sizes are visible
sortSize.setVisible(mState.showSize);
fileSize.setVisible(!mState.forceSize);
// grid/list is effectively a toggle.
grid.setVisible(mState.derivedMode != State.MODE_GRID);
list.setVisible(mState.derivedMode != State.MODE_LIST);
advanced.setVisible(mState.showAdvancedOption);
advanced.setTitle(mState.showAdvancedOption && mState.showAdvanced ? R.string.menu_advanced_hide : R.string.menu_advanced_show);
fileSize.setTitle(LocalPreferences.getDisplayFileSize(this) ? R.string.menu_file_size_hide : R.string.menu_file_size_show);
return true;
}
use of android.support.annotation.CallSuper in project android_frameworks_base by crdroidandroid.
the class BaseActivity method onCreate.
@CallSuper
@Override
public void onCreate(Bundle icicle) {
// Record the time when onCreate is invoked for metric.
mStartTime = new Date().getTime();
super.onCreate(icicle);
final Intent intent = getIntent();
addListenerForLaunchCompletion();
setContentView(mLayoutId);
mDrawer = DrawerController.create(this);
mState = getState(icicle);
Metrics.logActivityLaunch(this, mState, intent);
mRoots = DocumentsApplication.getRootsCache(this);
getContentResolver().registerContentObserver(RootsCache.sNotificationUri, false, mRootsCacheObserver);
mSearchManager = new SearchViewManager(this, icicle);
DocumentsToolbar toolbar = (DocumentsToolbar) findViewById(R.id.toolbar);
setActionBar(toolbar);
mNavigator = new NavigationView(mDrawer, toolbar, (Spinner) findViewById(R.id.stack), mState, this);
// Base classes must update result in their onCreate.
setResult(Activity.RESULT_CANCELED);
}
Aggregations