use of android.app.ActionBar in project android by JetBrains.
the class MyActivity method test1.
@Override
public void test1() {
ActionBar actionBar = getActionBar();
GridLayout gridLayout = new GridLayout(null);
int x = View.DRAWING_CACHE_QUALITY_AUTO;
int y = View.MEASURED_HEIGHT_STATE_SHIFT;
int alignmentMode = gridLayout.getAlignmentMode();
gridLayout.setRowOrderPreserved(true);
setContentView(R.layout.main);
}
use of android.app.ActionBar in project android by JetBrains.
the class MyActivity method testSuppressed.
@SuppressLint("NewApi")
public void testSuppressed() {
ActionBar actionBar = getActionBar();
GridLayout gridLayout = new GridLayout(null);
int x = View.DRAWING_CACHE_QUALITY_AUTO;
int y = View.MEASURED_HEIGHT_STATE_SHIFT;
int alignmentMode = gridLayout.getAlignmentMode();
gridLayout.setRowOrderPreserved(true);
}
use of android.app.ActionBar in project Conversations by siacs.
the class ConversationActivity method updateActionBarTitle.
private void updateActionBarTitle(boolean titleShouldBeName) {
final ActionBar ab = getActionBar();
final Conversation conversation = getSelectedConversation();
if (ab != null) {
if (titleShouldBeName && conversation != null) {
if ((ab.getDisplayOptions() & ActionBar.DISPLAY_HOME_AS_UP) != ActionBar.DISPLAY_HOME_AS_UP) {
ab.setDisplayOptions(ActionBar.DISPLAY_HOME_AS_UP | ActionBar.DISPLAY_SHOW_TITLE);
}
if (conversation.getMode() == Conversation.MODE_SINGLE || useSubjectToIdentifyConference()) {
ab.setTitle(conversation.getName());
} else {
ab.setTitle(conversation.getJid().toBareJid().toString());
}
} else {
if ((ab.getDisplayOptions() & ActionBar.DISPLAY_HOME_AS_UP) == ActionBar.DISPLAY_HOME_AS_UP) {
ab.setDisplayOptions(ActionBar.DISPLAY_SHOW_TITLE);
}
ab.setTitle(R.string.app_name);
}
}
}
use of android.app.ActionBar in project platform_frameworks_base by android.
the class NekoLand method onCreate.
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.neko_activity);
final ActionBar actionBar = getActionBar();
if (actionBar != null) {
actionBar.setLogo(Cat.create(this));
actionBar.setDisplayUseLogoEnabled(false);
actionBar.setDisplayShowHomeEnabled(true);
}
mPrefs = new PrefState(this);
mPrefs.setListener(this);
final RecyclerView recyclerView = (RecyclerView) findViewById(R.id.holder);
mAdapter = new CatAdapter();
recyclerView.setAdapter(mAdapter);
recyclerView.setLayoutManager(new GridLayoutManager(this, 3));
int numCats = updateCats();
MetricsLogger.histogram(this, "egg_neko_visit_gallery", numCats);
}
use of android.app.ActionBar in project Conversations by siacs.
the class VerifyOTRActivity method updateView.
protected void updateView() {
if (this.mConversation != null && this.mConversation.hasValidOtrSession()) {
final ActionBar actionBar = getActionBar();
this.mVerificationExplain.setText(R.string.no_otr_session_found);
invalidateOptionsMenu();
switch(this.mode) {
case MODE_ASK_QUESTION:
if (actionBar != null) {
actionBar.setTitle(R.string.ask_question);
}
this.updateViewAskQuestion();
break;
case MODE_ANSWER_QUESTION:
if (actionBar != null) {
actionBar.setTitle(R.string.smp_requested);
}
this.updateViewAnswerQuestion();
break;
case MODE_MANUAL_VERIFICATION:
default:
if (actionBar != null) {
actionBar.setTitle(R.string.manually_verify);
}
this.updateViewManualVerification();
break;
}
} else {
this.mManualVerificationArea.setVisibility(View.GONE);
this.mSmpVerificationArea.setVisibility(View.GONE);
}
}
Aggregations