fixing some layout problems
This commit is contained in:
@@ -44,14 +44,10 @@ import com.actionbarsherlock.app.SherlockFragment;
|
||||
/**
|
||||
* Public key list with sticky list headers.
|
||||
*
|
||||
* - uses StickyListHeaders library
|
||||
* - custom adapter: KeyListPublicAdapter
|
||||
* - uses StickyListHeaders library - custom adapter: KeyListPublicAdapter
|
||||
*
|
||||
* TODO: - fix loader with spinning animation - fix design - fix view holder in adapter
|
||||
*
|
||||
* TODO:
|
||||
* - fix loader with spinning animation
|
||||
* - fix design
|
||||
* - fix view holder in adapter
|
||||
*
|
||||
*/
|
||||
public class KeyListPublicFragment extends SherlockFragment implements
|
||||
AdapterView.OnItemClickListener, LoaderManager.LoaderCallbacks<Cursor> {
|
||||
@@ -72,15 +68,14 @@ public class KeyListPublicFragment extends SherlockFragment implements
|
||||
|
||||
mKeyListPublicActivity = (KeyListPublicActivity) getActivity();
|
||||
|
||||
stickyList = (StickyListHeadersListView) getActivity().findViewById(
|
||||
R.id.key_list_public_fragment_stickylist);
|
||||
stickyList = (StickyListHeadersListView) getActivity().findViewById(R.id.list);
|
||||
|
||||
stickyList.setOnItemClickListener(this);
|
||||
// stickyList.setOnHeaderClickListener(this);
|
||||
// stickyList.setOnStickyHeaderOffsetChangedListener(this);
|
||||
// mStickyList.addHeaderView(inflater.inflate(R.layout.list_header, null));
|
||||
// mStickyList.addFooterView(inflater.inflate(R.layout.list_footer, null));
|
||||
// stickyList.setEmptyView(findViewById(R.id.empty));
|
||||
stickyList.setEmptyView(getActivity().findViewById(R.id.empty));
|
||||
stickyList.setAreHeadersSticky(true);
|
||||
stickyList.setDrawingListUnderStickyHeader(true);
|
||||
stickyList.setFastScrollEnabled(true);
|
||||
|
||||
@@ -61,7 +61,7 @@ public class KeyListAdapter extends CursorTreeAdapter {
|
||||
*/
|
||||
@Override
|
||||
public View newGroupView(Context context, Cursor cursor, boolean isExpanded, ViewGroup parent) {
|
||||
return mInflater.inflate(R.layout.key_list_group_item, null);
|
||||
return mInflater.inflate(R.layout.key_list_item, null);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -81,7 +81,7 @@ public class KeyListPublicAdapter extends CursorAdapter implements StickyListHea
|
||||
|
||||
@Override
|
||||
public View newView(Context context, Cursor cursor, ViewGroup parent) {
|
||||
return mInflater.inflate(R.layout.key_list_group_item, null);
|
||||
return mInflater.inflate(R.layout.key_list_item, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -76,7 +76,7 @@ public class KeyListSecretAdapter extends CursorAdapter {
|
||||
|
||||
@Override
|
||||
public View newView(Context context, Cursor cursor, ViewGroup parent) {
|
||||
return mInflater.inflate(R.layout.key_list_group_item, null);
|
||||
return mInflater.inflate(R.layout.key_list_item, null);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user