Search in sources :

Example 31 with BarPainter

use of com.xabber.android.ui.color.BarPainter in project xabber-android by redsolution.

the class ContactTitleActionBarInflater method setUpActionBarView.

public void setUpActionBarView() {
    Toolbar toolbar = ToolbarHelper.setUpDefaultToolbar(activity);
    barPainter = new BarPainter(activity, toolbar);
    contactView = LayoutInflater.from(activity).inflate(R.layout.contact_title, null);
    toolbar.addView(contactView, new ActionBar.LayoutParams(ActionBar.LayoutParams.MATCH_PARENT, ActionBar.LayoutParams.MATCH_PARENT));
}
Also used : ActionBar(androidx.appcompat.app.ActionBar) Toolbar(androidx.appcompat.widget.Toolbar) BarPainter(com.xabber.android.ui.color.BarPainter)

Example 32 with BarPainter

use of com.xabber.android.ui.color.BarPainter in project xabber-android by redsolution.

the class XabberLoginActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    if (savedInstanceState != null)
        currentFragment = savedInstanceState.getString(CURRENT_FRAGMENT);
    else {
        Bundle extras = getIntent().getExtras();
        if (extras != null)
            currentFragment = extras.getString(CURRENT_FRAGMENT);
    }
    setContentView(R.layout.activity_xabber_login);
    toolbar = (Toolbar) findViewById(R.id.toolbar_default);
    toolbar.setNavigationOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View v) {
            SignUpRepo.getInstance().clearRepo();
            finish();
        }
    });
    barPainter = new BarPainter(this, toolbar);
    setupToolbar(true);
}
Also used : Bundle(android.os.Bundle) View(android.view.View) BarPainter(com.xabber.android.ui.color.BarPainter)

Example 33 with BarPainter

use of com.xabber.android.ui.color.BarPainter in project xabber-android by redsolution.

the class XAChangePassActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setTheme(R.style.Theme_LightToolbar);
    setContentView(R.layout.activity_change_xa_pass);
    toolbar = (Toolbar) findViewById(R.id.toolbar_default);
    toolbar.setNavigationIcon(R.drawable.ic_arrow_left);
    toolbar.setNavigationOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View v) {
            finish();
        }
    });
    toolbar.setTitleTextColor(getResources().getColor(R.color.black_text));
    toolbar.setTitle(R.string.button_change_pass);
    BarPainter barPainter = new BarPainter(this, toolbar);
    barPainter.setLiteGrey();
    progressBar = findViewById(R.id.progressBar);
    edtOldPass = findViewById(R.id.edtOldPass);
    tilOldPass = findViewById(R.id.tilOldPass);
    edtPass = findViewById(R.id.edtPass);
    tilPass = findViewById(R.id.tilPass);
    edtConfirmPass = findViewById(R.id.edtConfirmPass);
    tilConfirmPass = findViewById(R.id.tilConfirmPass);
    btnChange = findViewById(R.id.btnChange);
    btnChange.setOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View v) {
            onChangePassClick(edtOldPass, edtPass, edtConfirmPass);
        }
    });
}
Also used : View(android.view.View) BarPainter(com.xabber.android.ui.color.BarPainter)

Example 34 with BarPainter

use of com.xabber.android.ui.color.BarPainter in project xabber-android by redsolution.

the class BaseListEditor method onInflate.

/**
 * Inflates layout.
 *
 * @param savedInstanceState
 */
protected void onInflate(Bundle savedInstanceState) {
    setContentView(R.layout.list);
    Toolbar toolbar = ToolbarHelper.setUpDefaultToolbar(this, getToolbarTitle());
    toolbar.inflateMenu(getOptionsMenuId());
    toolbar.getMenu().findItem(getAddActionId()).setIntent(getAddIntent());
    barPainter = new BarPainter(this, toolbar);
}
Also used : Toolbar(androidx.appcompat.widget.Toolbar) BarPainter(com.xabber.android.ui.color.BarPainter)

Example 35 with BarPainter

use of com.xabber.android.ui.color.BarPainter in project xabber-android by redsolution.

the class ChatGlobalSettings method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    if (isFinishing())
        return;
    setContentView(R.layout.activity_with_toolbar_and_container);
    String title = PreferenceSummaryHelperActivity.getPreferenceTitle(getString(R.string.chat_viewer));
    Toolbar toolbar = ToolbarHelper.setUpDefaultToolbar(this, title);
    BarPainter barPainter = new BarPainter(this, toolbar);
    barPainter.setDefaultColor();
    if (savedInstanceState == null) {
        getFragmentManager().beginTransaction().add(R.id.fragment_container, new ChatGlobalSettingsFragment()).commit();
    }
}
Also used : Toolbar(androidx.appcompat.widget.Toolbar) BarPainter(com.xabber.android.ui.color.BarPainter)

Aggregations

BarPainter (com.xabber.android.ui.color.BarPainter)48 View (android.view.View)26 Toolbar (androidx.appcompat.widget.Toolbar)26 Intent (android.content.Intent)15 Toolbar (android.support.v7.widget.Toolbar)8 LinearLayoutManager (androidx.recyclerview.widget.LinearLayoutManager)8 TextView (android.widget.TextView)7 RecyclerView (androidx.recyclerview.widget.RecyclerView)7 AccountJid (com.xabber.android.data.entity.AccountJid)7 MenuItem (android.view.MenuItem)5 AdapterView (android.widget.AdapterView)4 Bundle (android.os.Bundle)2 LayoutInflater (android.view.LayoutInflater)2 ListView (android.widget.ListView)2 AccountItem (com.xabber.android.data.account.AccountItem)2 StatusMode (com.xabber.android.data.account.StatusMode)2 UserJid (com.xabber.android.data.entity.UserJid)2 OccupantListAdapter (com.xabber.android.ui.adapter.OccupantListAdapter)2 ServerInfoAdapter (com.xabber.android.ui.adapter.ServerInfoAdapter)2 StatusEditorAdapter (com.xabber.android.ui.adapter.StatusEditorAdapter)2