Commit d2aef422 authored by Grigory Fedorov's avatar Grigory Fedorov

Join conference screen uses action bar painting.

parent 5a4acebb
...@@ -39,6 +39,7 @@ import com.xabber.android.data.intent.EntityIntentBuilder; ...@@ -39,6 +39,7 @@ import com.xabber.android.data.intent.EntityIntentBuilder;
import com.xabber.android.data.message.MessageManager; import com.xabber.android.data.message.MessageManager;
import com.xabber.android.data.notification.NotificationManager; import com.xabber.android.data.notification.NotificationManager;
import com.xabber.android.ui.adapter.AccountChooseAdapter; import com.xabber.android.ui.adapter.AccountChooseAdapter;
import com.xabber.android.ui.helper.ActionBarPainter;
import com.xabber.android.ui.helper.ManagedActivity; import com.xabber.android.ui.helper.ManagedActivity;
import com.xabber.androiddev.R; import com.xabber.androiddev.R;
...@@ -65,6 +66,8 @@ public class MUCEditor extends ManagedActivity implements View.OnClickListener, ...@@ -65,6 +66,8 @@ public class MUCEditor extends ManagedActivity implements View.OnClickListener,
private EditText nickView; private EditText nickView;
private EditText passwordView; private EditText passwordView;
private ActionBarPainter actionBarPainter;
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
...@@ -119,7 +122,12 @@ public class MUCEditor extends ManagedActivity implements View.OnClickListener, ...@@ -119,7 +122,12 @@ public class MUCEditor extends ManagedActivity implements View.OnClickListener,
if (accounts.size() == 1) if (accounts.size() == 1)
account = accounts.iterator().next(); account = accounts.iterator().next();
} }
actionBarPainter = new ActionBarPainter(this);
if (account != null) { if (account != null) {
actionBarPainter.updateWithAccountName(account);
for (int position = 0; position < accountView.getCount(); position++) for (int position = 0; position < accountView.getCount(); position++)
if (account.equals(accountView.getItemAtPosition(position))) { if (account.equals(accountView.getItemAtPosition(position))) {
accountView.setSelection(position); accountView.setSelection(position);
...@@ -129,6 +137,7 @@ public class MUCEditor extends ManagedActivity implements View.OnClickListener, ...@@ -129,6 +137,7 @@ public class MUCEditor extends ManagedActivity implements View.OnClickListener,
if ("".equals(nickView.getText().toString())) if ("".equals(nickView.getText().toString()))
nickView.setText(getNickname(((String) accountView nickView.setText(getNickname(((String) accountView
.getSelectedItem()))); .getSelectedItem())));
} }
@Override @Override
...@@ -217,11 +226,12 @@ public class MUCEditor extends ManagedActivity implements View.OnClickListener, ...@@ -217,11 +226,12 @@ public class MUCEditor extends ManagedActivity implements View.OnClickListener,
if (selectedAccount == AdapterView.INVALID_POSITION) if (selectedAccount == AdapterView.INVALID_POSITION)
previous = ""; previous = "";
else else
previous = getNickname((String) accountView.getAdapter().getItem( previous = getNickname((String) accountView.getAdapter().getItem(selectedAccount));
selectedAccount));
if (current.equals(previous)) if (current.equals(previous))
nickView.setText(getNickname((String) accountView.getSelectedItem())); nickView.setText(getNickname((String) accountView.getSelectedItem()));
selectedAccount = accountView.getSelectedItemPosition(); selectedAccount = accountView.getSelectedItemPosition();
actionBarPainter.updateWithAccountName((String) accountView.getSelectedItem());
} }
@Override @Override
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment