use of com.abewy.android.apps.klyph.adapter.MultiObjectAdapter in project Klyph by jonathangerbaud.
the class FriendPickerActivity method onCreate.
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
singleChoice = getIntent().getBooleanExtra(KlyphBundleExtras.SINGLE_CHOICE, false);
setTitle(singleChoice ? R.string.friend_picker_single_choice_title : R.string.friend_picker_title);
setListAdapter(new MultiObjectAdapter(getListView(), singleChoice ? SpecialLayout.FRIEND_PICKER_SINGLE : SpecialLayout.FRIEND_PICKER));
getListView().setItemsCanFocus(false);
getListView().setChoiceMode(ListView.CHOICE_MODE_MULTIPLE);
searchText = (EditText) findViewById(R.id.search_text);
searchText.addTextChangedListener(new TextWatcher() {
@Override
public void onTextChanged(CharSequence s, int start, int before, int count) {
filter(s.toString());
}
@Override
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
}
@Override
public void afterTextChanged(Editable s) {
}
});
setRequestType(Query.ALL_FRIENDS);
if (getIntent().hasExtra(KlyphBundleExtras.FRIEND_PICKER_IDS)) {
ArrayList<String> ids = getIntent().getStringArrayListExtra(KlyphBundleExtras.FRIEND_PICKER_IDS);
if (ids != null && ids.size() > 0) {
initialIds = ids;
}
}
if (FRIEND_LIST == null) {
load();
} else {
// reset previously selected objects
for (GraphObject graphObject : FRIEND_LIST) {
graphObject.setSelected(false);
}
populate(FRIEND_LIST);
}
}
use of com.abewy.android.apps.klyph.adapter.MultiObjectAdapter in project Klyph by jonathangerbaud.
the class TitledViewPagerActivity method displaySpinnerInActionBar.
@Override
public void displaySpinnerInActionBar(List<GraphObject> data, int position, OnNavigationListener listener) {
MultiObjectAdapter adapter = new MultiObjectAdapter(null, SpecialLayout.DROP_DOWN_ITEM);
adapter.addAll(data);
getActionBar().setNavigationMode(ActionBar.NAVIGATION_MODE_LIST);
getActionBar().setListNavigationCallbacks(adapter, listener);
getActionBar().setSelectedNavigationItem(position);
}
use of com.abewy.android.apps.klyph.adapter.MultiObjectAdapter in project Klyph by jonathangerbaud.
the class KlyphFakeHeaderGridFragment method onViewCreated.
@Override
public void onViewCreated(View view, Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
MultiObjectAdapter adapter = new MultiObjectAdapter(getListView(), getSpecialLayout());
LayoutParams params = (LayoutParams) getGridView().getEmptyView().getLayoutParams();
params.topMargin = fakeHeaderHeight;
getGridView().getEmptyView().setLayoutParams(params);
View progress = view.findViewById(android.R.id.progress);
params = (LayoutParams) progress.getLayoutParams();
params.topMargin = fakeHeaderHeight;
params.gravity = Gravity.CENTER_HORIZONTAL | Gravity.TOP;
progress.setLayoutParams(params);
setListAdapter(adapter);
}
use of com.abewy.android.apps.klyph.adapter.MultiObjectAdapter in project Klyph by jonathangerbaud.
the class AlbumVideos method onViewCreated.
@Override
public void onViewCreated(View view, Bundle savedInstanceState) {
setListVisible(false);
setRequestType(Query.ALBUM_VIDEOS);
super.onViewCreated(view, savedInstanceState);
getGridView().setAdapter(new MultiObjectAdapter(getListView(), SpecialLayout.GRID));
defineEmptyText(R.string.empty_list_no_video);
}
use of com.abewy.android.apps.klyph.adapter.MultiObjectAdapter in project Klyph by jonathangerbaud.
the class AllPhotosFragment method onViewCreated.
@Override
public void onViewCreated(View view, Bundle savedInstanceState) {
setListVisible(false);
super.onViewCreated(view, savedInstanceState);
getGridView().setAdapter(new MultiObjectAdapter(getListView(), SpecialLayout.GRID));
defineEmptyText(R.string.empty_list_no_photo);
setRequestType(Query.ALL_PHOTOS);
if (KlyphData.getAllPhotos() == null) {
load();
} else {
populate(KlyphData.getAllPhotos());
}
}
Aggregations