small changes
This commit is contained in:
parent
203c85e114
commit
2684ecda1e
|
@ -2,6 +2,7 @@
|
||||||
<android.support.v4.view.ViewPager xmlns:android="http://schemas.android.com/apk/res/android"
|
<android.support.v4.view.ViewPager xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:id="@+id/start_conversation_view_pager"
|
android:id="@+id/start_conversation_view_pager"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent" >
|
android:layout_height="match_parent"
|
||||||
|
android:background="@color/primarybackground">
|
||||||
|
|
||||||
</android.support.v4.view.ViewPager>
|
</android.support.v4.view.ViewPager>
|
|
@ -1,22 +1,24 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<menu xmlns:android="http://schemas.android.com/apk/res/android" >
|
<menu xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||||
|
|
||||||
|
<item
|
||||||
|
android:id="@+id/action_search"
|
||||||
|
android:actionViewClass="android.widget.SearchView"
|
||||||
|
android:icon="@drawable/ic_action_search"
|
||||||
|
android:showAsAction="collapseActionView|always"
|
||||||
|
android:title="@string/search"/>
|
||||||
|
|
||||||
<item
|
<item
|
||||||
android:id="@+id/action_create_contact"
|
android:id="@+id/action_create_contact"
|
||||||
android:icon="@drawable/ic_action_add_person"
|
android:icon="@drawable/ic_action_add_person"
|
||||||
android:showAsAction="ifRoom"
|
android:showAsAction="always"
|
||||||
android:title="@string/create_contact"/>
|
android:title="@string/create_contact"/>
|
||||||
<item
|
<item
|
||||||
android:id="@+id/action_create_conference"
|
android:id="@+id/action_create_conference"
|
||||||
android:icon="@drawable/ic_action_add_group"
|
android:icon="@drawable/ic_action_add_group"
|
||||||
android:showAsAction="ifRoom"
|
android:showAsAction="always"
|
||||||
android:title="@string/create_conference"/>
|
android:title="@string/create_conference"/>
|
||||||
<item
|
|
||||||
android:id="@+id/action_search"
|
|
||||||
android:actionViewClass="android.widget.SearchView"
|
|
||||||
android:icon="@drawable/ic_action_search"
|
|
||||||
android:showAsAction="collapseActionView|ifRoom"
|
|
||||||
android:title="@string/search"/>
|
|
||||||
<item
|
<item
|
||||||
android:id="@+id/action_accounts"
|
android:id="@+id/action_accounts"
|
||||||
android:orderInCategory="90"
|
android:orderInCategory="90"
|
||||||
|
|
|
@ -18,7 +18,6 @@ import android.support.v4.view.ViewPager;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.Menu;
|
import android.view.Menu;
|
||||||
import android.view.MenuItem;
|
import android.view.MenuItem;
|
||||||
import android.view.MenuItem.OnActionExpandListener;
|
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.widget.AdapterView;
|
import android.widget.AdapterView;
|
||||||
|
@ -90,19 +89,6 @@ public class StartConversation extends XmppActivity {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
private OnActionExpandListener mOnSearchActionExpandListener = new OnActionExpandListener() {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean onMenuItemActionExpand(MenuItem item) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean onMenuItemActionCollapse(MenuItem item) {
|
|
||||||
invalidateOptionsMenu();
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCreate(Bundle savedInstanceState) {
|
public void onCreate(Bundle savedInstanceState) {
|
||||||
|
@ -176,8 +162,6 @@ public class StartConversation extends XmppActivity {
|
||||||
TextView textView = (TextView) mSearchView.findViewById(id);
|
TextView textView = (TextView) mSearchView.findViewById(id);
|
||||||
textView.setTextColor(Color.WHITE);
|
textView.setTextColor(Color.WHITE);
|
||||||
mSearchView.setOnQueryTextListener(this.mOnQueryTextListener);
|
mSearchView.setOnQueryTextListener(this.mOnQueryTextListener);
|
||||||
menuSearch
|
|
||||||
.setOnActionExpandListener(this.mOnSearchActionExpandListener);
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -211,10 +195,8 @@ public class StartConversation extends XmppActivity {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void onTabChanged() {
|
private void onTabChanged() {
|
||||||
if (mSearchView == null || mSearchView.isIconified()) {
|
|
||||||
invalidateOptionsMenu();
|
invalidateOptionsMenu();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
private class ListItemAdapter extends ArrayAdapter<ListItem> {
|
private class ListItemAdapter extends ArrayAdapter<ListItem> {
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue