mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-15 15:41:24 +01:00
use a standard list item for words rather than consing up a TextView
and having to worry about text size.
This commit is contained in:
parent
1d13f7d1f2
commit
aba4e02cac
1 changed files with 4 additions and 6 deletions
|
@ -1,4 +1,4 @@
|
|||
/* -*- compile-command: "cd ../../../../../; ant install"; -*- */
|
||||
/* -*- compile-command: "cd ../../../../../; ant debug install"; -*- */
|
||||
/*
|
||||
* Copyright 2009 - 2011 by Eric House (xwords@eehouse.org). All
|
||||
* rights reserved.
|
||||
|
@ -57,7 +57,6 @@ public class DictBrowseActivity extends XWListActivity
|
|||
private int m_dictClosure = 0;
|
||||
private int m_lang;
|
||||
private String m_name;
|
||||
private float m_textSize;
|
||||
private Spinner m_minSpinner;
|
||||
private Spinner m_maxSpinner;
|
||||
private int m_minShown;
|
||||
|
@ -93,12 +92,13 @@ public class DictBrowseActivity extends XWListActivity
|
|||
|
||||
public Object getItem( int position )
|
||||
{
|
||||
TextView text = new TextView( DictBrowseActivity.this );
|
||||
TextView text =
|
||||
(TextView)Utils.inflate( DictBrowseActivity.this,
|
||||
android.R.layout.simple_list_item_1 );
|
||||
String str = XwJNI.dict_iter_nthWord( m_dictClosure, position );
|
||||
if ( null != str ) {
|
||||
text.setText( str );
|
||||
text.setOnClickListener( DictBrowseActivity.this );
|
||||
text.setTextSize( m_textSize );
|
||||
}
|
||||
return text;
|
||||
}
|
||||
|
@ -153,8 +153,6 @@ public class DictBrowseActivity extends XWListActivity
|
|||
m_name = name;
|
||||
m_lang = DictLangCache.getDictLangCode( this, name );
|
||||
|
||||
m_textSize = 2.0f + new TextView( this ).getTextSize();
|
||||
|
||||
String[] names = { name };
|
||||
DictUtils.DictPairs pairs = DictUtils.openDicts( this, names );
|
||||
m_dictClosure = XwJNI.dict_iter_init( pairs.m_bytes[0],
|
||||
|
|
Loading…
Reference in a new issue