Search in sources :

Example 46 with BarPainter

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

the class LogActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_log);
    Toolbar toolbar = ToolbarHelper.setUpDefaultToolbar(this, getString(R.string.debug_log_files_activity_title));
    BarPainter barPainter = new BarPainter(this, toolbar);
    barPainter.setDefaultColor();
    toolbar.inflateMenu(LOG_MENU);
    toolbar.setOnMenuItemClickListener(this);
    recyclerView = (RecyclerView) findViewById(R.id.activity_log_recycler_view);
    logFilesAdapter = new LogFilesAdapter();
    recyclerView.setAdapter(logFilesAdapter);
    LinearLayoutManager linearLayoutManager = new LinearLayoutManager(this);
    recyclerView.setLayoutManager(linearLayoutManager);
    updateFileList(logFilesAdapter);
}
Also used : LogFilesAdapter(com.xabber.android.ui.adapter.LogFilesAdapter) LinearLayoutManager(androidx.recyclerview.widget.LinearLayoutManager) Toolbar(androidx.appcompat.widget.Toolbar) BarPainter(com.xabber.android.ui.color.BarPainter)

Example 47 with BarPainter

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

the class PushLogActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_server_info);
    Toolbar toolbar = ToolbarHelper.setUpDefaultToolbar(this, getString(R.string.push_log_title));
    BarPainter barPainter = new BarPainter(this, toolbar);
    barPainter.setDefaultColor();
    toolbar.inflateMenu(R.menu.toolbar_log);
    toolbar.setOnMenuItemClickListener(this);
    RecyclerView recyclerView = findViewById(R.id.server_info_recycler_view);
    serverInfoAdapter = new ServerInfoAdapter();
    recyclerView.setLayoutManager(new LinearLayoutManager(this));
    recyclerView.setAdapter(serverInfoAdapter);
    ProgressBar progressBar = findViewById(R.id.server_info_progress_bar);
    progressBar.setVisibility(View.GONE);
}
Also used : ServerInfoAdapter(com.xabber.android.ui.adapter.ServerInfoAdapter) RecyclerView(androidx.recyclerview.widget.RecyclerView) LinearLayoutManager(androidx.recyclerview.widget.LinearLayoutManager) ProgressBar(android.widget.ProgressBar) Toolbar(androidx.appcompat.widget.Toolbar) BarPainter(com.xabber.android.ui.color.BarPainter)

Example 48 with BarPainter

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

the class ContactAddActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_with_toolbar_progress_and_container);
    toolbar = ToolbarHelper.setUpDefaultToolbar(this, null, R.drawable.ic_clear_white_24dp);
    toolbar.inflateMenu(R.menu.toolbar_add_contact);
    toolbar.setOnMenuItemClickListener(new Toolbar.OnMenuItemClickListener() {

        @Override
        public boolean onMenuItemClick(MenuItem item) {
            return onOptionsItemSelected(item);
        }
    });
    progressBar = findViewById(R.id.toolbarProgress);
    barPainter = new BarPainter(this, toolbar);
    barPainter.setDefaultColor();
    Intent intent = getIntent();
    if (savedInstanceState == null) {
        getFragmentManager().beginTransaction().add(R.id.fragment_container, ContactAddFragment.newInstance(getAccount(intent), getUser(intent))).commit();
    }
}
Also used : MenuItem(android.view.MenuItem) Intent(android.content.Intent) 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