mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-07 05:24:46 +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"
|
android:paddingRight="8dp"
|
||||||
>
|
>
|
||||||
|
|
||||||
<LinearLayout android:orientation="horizontal"
|
<LinearLayout android:id="@+id/pick_lang"
|
||||||
|
android:orientation="horizontal"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
>
|
>
|
||||||
|
@ -17,7 +18,7 @@
|
||||||
android:text="@string/study_langpick"
|
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_width="fill_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:drawSelectorOnTop="true"
|
android:drawSelectorOnTop="true"
|
||||||
|
|
|
@ -46,6 +46,7 @@ public class StudyList extends XWListActivity
|
||||||
private static final String START_LANG = "START_LANG";
|
private static final String START_LANG = "START_LANG";
|
||||||
|
|
||||||
private Spinner m_spinner;
|
private Spinner m_spinner;
|
||||||
|
private View m_pickView; // LinearLayout, actually
|
||||||
private int[] m_langCodes;
|
private int[] m_langCodes;
|
||||||
private String[] m_words;
|
private String[] m_words;
|
||||||
private int m_position;
|
private int m_position;
|
||||||
|
@ -57,7 +58,8 @@ public class StudyList extends XWListActivity
|
||||||
|
|
||||||
setContentView( R.layout.studylist );
|
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() );
|
initOrFinish( getIntent() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -159,7 +161,7 @@ public class StudyList extends XWListActivity
|
||||||
if ( 0 == m_langCodes.length ) {
|
if ( 0 == m_langCodes.length ) {
|
||||||
finish();
|
finish();
|
||||||
} else if ( 1 == m_langCodes.length ) {
|
} else if ( 1 == m_langCodes.length ) {
|
||||||
m_spinner.setVisibility( View.GONE );
|
m_pickView.setVisibility( View.GONE );
|
||||||
m_position = 0;
|
m_position = 0;
|
||||||
loadList();
|
loadList();
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue