mirror of
https://github.com/moparisthebest/open-keychain
synced 2024-11-30 04:22:18 -05:00
fixing some layout problems
This commit is contained in:
parent
3b5878f86d
commit
faabf8eca2
@ -1,26 +1,10 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<!--
|
|
||||||
Copyright (C) 2010 Thialfihar <thi@thialfihar.org>
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="?android:attr/listPreferredItemHeight"
|
android:layout_height="?android:attr/listPreferredItemHeight"
|
||||||
android:layout_marginRight="?android:attr/scrollbarSize"
|
android:layout_marginRight="?android:attr/scrollbarSize"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:paddingLeft="36dip"
|
android:paddingLeft="8dp"
|
||||||
android:singleLine="true" >
|
android:singleLine="true" >
|
||||||
|
|
||||||
<TextView
|
<TextView
|
@ -2,13 +2,28 @@
|
|||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical" >
|
||||||
android:paddingLeft="8dp"
|
|
||||||
android:paddingRight="8dp" >
|
|
||||||
|
|
||||||
<se.emilsjolander.stickylistheaders.StickyListHeadersListView
|
<se.emilsjolander.stickylistheaders.StickyListHeadersListView
|
||||||
android:id="@+id/key_list_public_fragment_stickylist"
|
android:id="@+id/list"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent" />
|
android:layout_height="match_parent"
|
||||||
|
android:clipToPadding="false"
|
||||||
|
android:drawSelectorOnTop="true"
|
||||||
|
android:fastScrollEnabled="true"
|
||||||
|
android:paddingBottom="16dp"
|
||||||
|
android:paddingLeft="16dp"
|
||||||
|
android:paddingRight="32dp"
|
||||||
|
android:paddingTop="16dp"
|
||||||
|
android:scrollbarStyle="outsideOverlay" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/empty"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="@string/list_empty"
|
||||||
|
android:textSize="30sp"
|
||||||
|
android:visibility="gone" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
@ -2,15 +2,15 @@
|
|||||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="@drawable/header_selector" >
|
android:background="@color/abs__background_holo_light" >
|
||||||
|
|
||||||
<se.emilsjolander.stickylistheaders.views.UnderlineTextView
|
<se.emilsjolander.stickylistheaders.views.UnderlineTextView
|
||||||
android:id="@+id/stickylist_header_text"
|
android:id="@+id/stickylist_header_text"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="start|left"
|
android:layout_gravity="start|left"
|
||||||
android:padding="5dp"
|
android:padding="8dp"
|
||||||
android:textColor="@android:color/white"
|
android:textColor="@color/emphasis"
|
||||||
android:textSize="17sp"
|
android:textSize="17sp"
|
||||||
android:textStyle="bold" />
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
@ -44,14 +44,10 @@ import com.actionbarsherlock.app.SherlockFragment;
|
|||||||
/**
|
/**
|
||||||
* Public key list with sticky list headers.
|
* Public key list with sticky list headers.
|
||||||
*
|
*
|
||||||
* - uses StickyListHeaders library
|
* - uses StickyListHeaders library - custom adapter: KeyListPublicAdapter
|
||||||
* - 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
|
public class KeyListPublicFragment extends SherlockFragment implements
|
||||||
AdapterView.OnItemClickListener, LoaderManager.LoaderCallbacks<Cursor> {
|
AdapterView.OnItemClickListener, LoaderManager.LoaderCallbacks<Cursor> {
|
||||||
@ -72,15 +68,14 @@ public class KeyListPublicFragment extends SherlockFragment implements
|
|||||||
|
|
||||||
mKeyListPublicActivity = (KeyListPublicActivity) getActivity();
|
mKeyListPublicActivity = (KeyListPublicActivity) getActivity();
|
||||||
|
|
||||||
stickyList = (StickyListHeadersListView) getActivity().findViewById(
|
stickyList = (StickyListHeadersListView) getActivity().findViewById(R.id.list);
|
||||||
R.id.key_list_public_fragment_stickylist);
|
|
||||||
|
|
||||||
stickyList.setOnItemClickListener(this);
|
stickyList.setOnItemClickListener(this);
|
||||||
// stickyList.setOnHeaderClickListener(this);
|
// stickyList.setOnHeaderClickListener(this);
|
||||||
// stickyList.setOnStickyHeaderOffsetChangedListener(this);
|
// stickyList.setOnStickyHeaderOffsetChangedListener(this);
|
||||||
// mStickyList.addHeaderView(inflater.inflate(R.layout.list_header, null));
|
// mStickyList.addHeaderView(inflater.inflate(R.layout.list_header, null));
|
||||||
// mStickyList.addFooterView(inflater.inflate(R.layout.list_footer, 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.setAreHeadersSticky(true);
|
||||||
stickyList.setDrawingListUnderStickyHeader(true);
|
stickyList.setDrawingListUnderStickyHeader(true);
|
||||||
stickyList.setFastScrollEnabled(true);
|
stickyList.setFastScrollEnabled(true);
|
||||||
|
@ -61,7 +61,7 @@ public class KeyListAdapter extends CursorTreeAdapter {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public View newGroupView(Context context, Cursor cursor, boolean isExpanded, ViewGroup parent) {
|
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
|
@Override
|
||||||
public View newView(Context context, Cursor cursor, ViewGroup parent) {
|
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
|
@Override
|
||||||
|
@ -76,7 +76,7 @@ public class KeyListSecretAdapter extends CursorAdapter {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public View newView(Context context, Cursor cursor, ViewGroup parent) {
|
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user