Search in sources :

Example 11 with ActionBar

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);
}
Also used : GridLayout(android.widget.GridLayout) ActionBar(android.app.ActionBar) SuppressLint(android.annotation.SuppressLint)

Example 12 with ActionBar

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);
}
Also used : GridLayout(android.widget.GridLayout) ActionBar(android.app.ActionBar) SuppressLint(android.annotation.SuppressLint) SuppressLint(android.annotation.SuppressLint)

Example 13 with ActionBar

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);
        }
    }
}
Also used : Conversation(eu.siacs.conversations.entities.Conversation) ActionBar(android.app.ActionBar)

Example 14 with ActionBar

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);
}
Also used : GridLayoutManager(android.support.v7.widget.GridLayoutManager) RecyclerView(android.support.v7.widget.RecyclerView) ActionBar(android.app.ActionBar)

Example 15 with ActionBar

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);
    }
}
Also used : ActionBar(android.app.ActionBar)

Aggregations

ActionBar (android.app.ActionBar)265 View (android.view.View)58 Intent (android.content.Intent)35 TextView (android.widget.TextView)21 ColorDrawable (android.graphics.drawable.ColorDrawable)20 OnClickListener (android.view.View.OnClickListener)14 AdapterView (android.widget.AdapterView)14 ListView (android.widget.ListView)12 Bundle (android.os.Bundle)10 Test (org.junit.Test)10 SharedPreferences (android.content.SharedPreferences)9 Uri (android.net.Uri)9 Button (android.widget.Button)9 AlertDialog (android.app.AlertDialog)8 DialogInterface (android.content.DialogInterface)8 ViewPager (android.support.v4.view.ViewPager)8 SpannableString (android.text.SpannableString)8 ComponentName (android.content.ComponentName)7 ArrayAdapter (android.widget.ArrayAdapter)7 FrameLayout (android.widget.FrameLayout)7