mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-04 23:02:02 +01:00
hide the label and spinner when there's only one language
This commit is contained in:
parent
3ea86e630d
commit
647282968a
2 changed files with 7 additions and 4 deletions
|
@ -8,7 +8,8 @@
|
|||
android:paddingRight="8dp"
|
||||
>
|
||||
|
||||
<LinearLayout android:orientation="horizontal"
|
||||
<LinearLayout android:id="@+id/pick_lang"
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
>
|
||||
|
@ -17,7 +18,7 @@
|
|||
android:text="@string/study_langpick"
|
||||
/>
|
||||
|
||||
<Spinner android:id="@+id/pick_language"
|
||||
<Spinner android:id="@+id/pick_lang_spinner"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawSelectorOnTop="true"
|
||||
|
|
|
@ -46,6 +46,7 @@ public class StudyList extends XWListActivity
|
|||
private static final String START_LANG = "START_LANG";
|
||||
|
||||
private Spinner m_spinner;
|
||||
private View m_pickView; // LinearLayout, actually
|
||||
private int[] m_langCodes;
|
||||
private String[] m_words;
|
||||
private int m_position;
|
||||
|
@ -57,7 +58,8 @@ public class StudyList extends XWListActivity
|
|||
|
||||
setContentView( R.layout.studylist );
|
||||
|
||||
m_spinner = (Spinner)findViewById( R.id.pick_language );
|
||||
m_spinner = (Spinner)findViewById( R.id.pick_lang_spinner );
|
||||
m_pickView = findViewById( R.id.pick_lang );
|
||||
initOrFinish( getIntent() );
|
||||
}
|
||||
|
||||
|
@ -159,7 +161,7 @@ public class StudyList extends XWListActivity
|
|||
if ( 0 == m_langCodes.length ) {
|
||||
finish();
|
||||
} else if ( 1 == m_langCodes.length ) {
|
||||
m_spinner.setVisibility( View.GONE );
|
||||
m_pickView.setVisibility( View.GONE );
|
||||
m_position = 0;
|
||||
loadList();
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue