use of com.xabber.android.ui.color.BarPainter in project xabber-android by redsolution.
the class AccountAddActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (isFinishing())
return;
setContentView(R.layout.activity_with_toolbar_and_container);
if (savedInstanceState == null) {
getFragmentManager().beginTransaction().add(R.id.fragment_container, AccountAddFragment.newInstance()).commit();
}
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar_default);
toolbar.setNavigationIcon(R.drawable.ic_clear_white_24dp);
toolbar.setNavigationOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
finish();
}
});
toolbar.inflateMenu(R.menu.toolbar_add_account);
toolbar.getMenu().findItem(R.id.action_add_account).setIcon(null);
toolbar.setOnMenuItemClickListener(this);
BarPainter barPainter = new BarPainter(this, toolbar);
barPainter.setDefaultColor();
}
use of com.xabber.android.ui.color.BarPainter in project xabber-android by redsolution.
the class AccountHistorySettingsActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_account_history_settings);
AccountJid account = getAccount(getIntent());
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar_default);
toolbar.setNavigationIcon(R.drawable.ic_arrow_left_white_24dp);
toolbar.setTitle(R.string.account_chat_history);
toolbar.setNavigationOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
finish();
}
});
BarPainter barPainter = new BarPainter(this, toolbar);
barPainter.updateWithAccountName(account);
if (savedInstanceState == null) {
getFragmentManager().beginTransaction().add(R.id.account_history_settings_fragment, AccountHistorySettingsFragment.newInstance(account)).commit();
}
}
use of com.xabber.android.ui.color.BarPainter in project xabber-android by redsolution.
the class AccountListActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_account_list);
toolbar = (Toolbar) findViewById(R.id.toolbar_default);
toolbar.setNavigationIcon(R.drawable.ic_clear_white_24dp);
toolbar.setNavigationOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
NavUtils.navigateUpFromSameTask(AccountListActivity.this);
}
});
toolbar.setTitle(R.string.title_reordering_account);
toolbar.inflateMenu(R.menu.toolbar_account_list);
toolbar.setOnMenuItemClickListener(this);
barPainter = new BarPainter(this, toolbar);
RecyclerView recyclerView = (RecyclerView) findViewById(R.id.account_list_recycler_view);
tvSummary = (TextView) findViewById(R.id.tvSummary);
accountListAdapter = new AccountListReorderAdapter(this, this);
recyclerView.setLayoutManager(new LinearLayoutManager(this));
recyclerView.setAdapter(accountListAdapter);
ItemTouchHelper.Callback callback = new SimpleItemTouchHelperCallback(accountListAdapter);
touchHelper = new ItemTouchHelper(callback);
touchHelper.attachToRecyclerView(recyclerView);
}
use of com.xabber.android.ui.color.BarPainter in project xabber-android by redsolution.
the class AccountSettingsActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_account_settings);
account = getAccount(getIntent());
accountItem = AccountManager.getInstance().getAccount(this.account);
if (accountItem == null) {
LogManager.e(LOG_TAG, "Account item is null " + account);
finish();
return;
}
toolbar = (Toolbar) findViewById(R.id.toolbar_default);
toolbar.setNavigationIcon(R.drawable.ic_arrow_left_white_24dp);
toolbar.setTitle(R.string.account_connection_settings);
toolbar.setNavigationOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
finish();
}
});
toolbar.inflateMenu(R.menu.toolbar_account_connection_settings);
toolbar.setOnMenuItemClickListener(this);
barPainter = new BarPainter(this, toolbar);
barPainter.updateWithAccountName(account);
if (savedInstanceState == null) {
getFragmentManager().beginTransaction().add(R.id.account_settings_fragment, new AccountEditorFragment()).commit();
}
}
use of com.xabber.android.ui.color.BarPainter in project xabber-android by redsolution.
the class AccountSyncActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_account_synchronization);
final Intent intent = getIntent();
AccountJid account = getAccount(intent);
if (account == null) {
finish();
return;
}
accountItem = AccountManager.getInstance().getAccount(account);
if (accountItem == null) {
Application.getInstance().onError(R.string.NO_SUCH_ACCOUNT);
finish();
return;
}
jid = accountItem.getAccount().getFullJid().asBareJid().toString();
toolbar = (Toolbar) findViewById(R.id.toolbar_default);
toolbar.setNavigationIcon(R.drawable.ic_arrow_left_white_24dp);
toolbar.setNavigationOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
finish();
}
});
toolbar.setTitle(R.string.account_sync);
barPainter = new BarPainter(this, toolbar);
barPainter.updateWithAccountName(account);
btnDeleteSettings = (Button) findViewById(R.id.btnDeleteSettings);
switchSync = (Switch) findViewById(R.id.switchSync);
rlSyncSwitch = (RelativeLayout) findViewById(R.id.rlSyncSwitch);
tvJid = (TextView) findViewById(R.id.tvJid);
tvStatus = (TextView) findViewById(R.id.tvStatus);
ivStatus = (ImageView) findViewById(R.id.ivStatus);
syncStatusView = (LinearLayout) findViewById(R.id.syncStatusView);
progressBar = (ProgressBar) findViewById(R.id.progressBar);
rlSyncSwitch.setOnClickListener(this);
btnDeleteSettings.setOnClickListener(this);
syncStatusView.setOnClickListener(this);
}
Aggregations