use of com.abewy.android.apps.klyph.view.ListEmptyView in project Klyph by jonathangerbaud.
the class KlyphGridFragment method defineEmptyView.
protected void defineEmptyView() {
if (gridView != null) {
ListEmptyView lev = new ListEmptyView(getActivity());
((ViewGroup) gridView.getParent()).addView(lev);
Log.d("KlyphGridFragment", "define empty view " + lev);
gridView.setEmptyView(lev);
}
}
use of com.abewy.android.apps.klyph.view.ListEmptyView in project Klyph by jonathangerbaud.
the class ImageFragment method onViewCreated.
@Override
public void onViewCreated(View view, Bundle savedInstanceState) {
progress = (ProgressBar) view.findViewById(R.id.progress);
emptyView = (ListEmptyView) view.findViewById(R.id.emptyView);
imageView = (ImageViewTouch) view.findViewById(R.id.image);
slidingDrawer = (KlyphSlidingDrawer) view.findViewById(R.id.sliding_drawer);
captionInfo = (ViewGroup) view.findViewById(R.id.caption_info);
profileImage = (ImageView) view.findViewById(R.id.author_profile_image);
authorName = (TextView) view.findViewById(R.id.author_name);
postTime = (TextView) view.findViewById(R.id.post_time);
sendTextEdit = (EditText) view.findViewById(R.id.send_text_edit);
sendButton = (ImageButton) view.findViewById(R.id.send_button);
emptyView.setText(R.string.cannot_find_photo);
getListView().setCacheColorHint(AttrUtil.getColor(getActivity(), android.R.attr.windowBackground));
// imageView.setOnScaleListener(this);
imageView.setSingleTapListener(new ImageViewTouch.OnImageViewTouchSingleTapListener() {
@Override
public void onSingleTapConfirmed() {
toggleBarVisibility();
}
});
sendButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
handlePostComment();
}
});
defineEmptyText(R.string.no_comment);
adapter = new MultiObjectAdapter(getListView(), SpecialLayout.PHOTO);
setListAdapter(adapter);
// setRequestType(Query.PHOTO_AND_COMMENTS);
setRequestType(Query.PHOTO);
super.onViewCreated(view, savedInstanceState);
// Crash if before super.onViewCreated(view, savedInstanceState);
getListView().getAdapter().registerDataSetObserver(observer);
}
use of com.abewy.android.apps.klyph.view.ListEmptyView in project Klyph by jonathangerbaud.
the class AlbumActivity method showError.
private void showError() {
ListEmptyView lev = new ListEmptyView(this);
lev.setText(R.string.request_error);
addContentView(lev, new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT));
setLoadingViewVisible(false);
}
use of com.abewy.android.apps.klyph.view.ListEmptyView in project Klyph by jonathangerbaud.
the class KlyphDialogFragment method defineEmptyView.
/**
* Create, add and set the list empty view Override this method if you want
* a custom empty view, or if you replaced listview by a gridview for
* example
*/
protected void defineEmptyView() {
ListEmptyView lev = new ListEmptyView(getActivity());
((ViewGroup) getListView().getParent()).addView(lev);
getListView().setEmptyView(lev);
if (this.emptyText > 0)
setEmptyText(emptyText);
}
Aggregations