mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-02-12 08:47:50 +01:00
use a built-in layout for top-level rows to get the expander drawn right.
This commit is contained in:
parent
9dfcb2dda2
commit
a559fdaae9
1 changed files with 8 additions and 6 deletions
|
@ -67,6 +67,11 @@ public class DictsActivity extends ExpandableListActivity
|
||||||
private class DictListAdapter implements ExpandableListAdapter {
|
private class DictListAdapter implements ExpandableListAdapter {
|
||||||
private Context m_context;
|
private Context m_context;
|
||||||
|
|
||||||
|
public DictListAdapter( Context context ) {
|
||||||
|
//super( context, m_dicts.length );
|
||||||
|
m_context = context;
|
||||||
|
}
|
||||||
|
|
||||||
public boolean areAllItemsEnabled() { return false; }
|
public boolean areAllItemsEnabled() { return false; }
|
||||||
|
|
||||||
public Object getChild(int groupPosition, int childPosition)
|
public Object getChild(int groupPosition, int childPosition)
|
||||||
|
@ -137,7 +142,9 @@ public class DictsActivity extends ExpandableListActivity
|
||||||
public View getGroupView( int groupPosition, boolean isExpanded,
|
public View getGroupView( int groupPosition, boolean isExpanded,
|
||||||
View convertView, ViewGroup parent )
|
View convertView, ViewGroup parent )
|
||||||
{
|
{
|
||||||
TextView view = new TextView( m_context );
|
View row = LayoutInflater.from(DictsActivity.this).
|
||||||
|
inflate(android.R.layout.simple_expandable_list_item_1, null );
|
||||||
|
TextView view = (TextView)row.findViewById( android.R.id.text1 );
|
||||||
view.setText( DictLangCache.getLangNames(m_context)[groupPosition] );
|
view.setText( DictLangCache.getLangNames(m_context)[groupPosition] );
|
||||||
return view;
|
return view;
|
||||||
}
|
}
|
||||||
|
@ -151,11 +158,6 @@ public class DictsActivity extends ExpandableListActivity
|
||||||
public void unregisterDataSetObserver( DataSetObserver obs ){}
|
public void unregisterDataSetObserver( DataSetObserver obs ){}
|
||||||
|
|
||||||
|
|
||||||
public DictListAdapter( Context context ) {
|
|
||||||
//super( context, m_dicts.length );
|
|
||||||
m_context = context;
|
|
||||||
}
|
|
||||||
|
|
||||||
// public Object getItem( int position) { return m_dicts[position]; }
|
// public Object getItem( int position) { return m_dicts[position]; }
|
||||||
// public View getView( final int position, View convertView,
|
// public View getView( final int position, View convertView,
|
||||||
// ViewGroup parent ) {
|
// ViewGroup parent ) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue