update language wizard display to be more clear

This commit is contained in:
Nathan Freitas 2014-04-04 10:46:28 -04:00
parent fe44c29164
commit 75d3ecb2ec
2 changed files with 7 additions and 18 deletions

View File

@ -40,7 +40,6 @@
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="1"
android:entries="@array/languages"
> >
</ListView> </ListView>

View File

@ -2,39 +2,23 @@ package org.torproject.android.wizard;
import java.util.Locale; import java.util.Locale;
import org.torproject.android.Orbot;
import org.torproject.android.R; import org.torproject.android.R;
import org.torproject.android.TorConstants; import org.torproject.android.TorConstants;
import org.torproject.android.R.drawable;
import org.torproject.android.R.id;
import org.torproject.android.R.layout;
import org.torproject.android.R.string;
import org.torproject.android.settings.AppManager;
import android.app.Activity; import android.app.Activity;
import android.app.AlertDialog;
import android.content.Context; import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent; import android.content.Intent;
import android.content.SharedPreferences; import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor; import android.content.SharedPreferences.Editor;
import android.content.res.Configuration; import android.content.res.Configuration;
import android.net.Uri;
import android.os.Bundle; import android.os.Bundle;
import android.preference.PreferenceManager; import android.preference.PreferenceManager;
import android.view.View; import android.view.View;
import android.view.View.OnClickListener;
import android.widget.AdapterView; import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener; import android.widget.AdapterView.OnItemClickListener;
import android.widget.ArrayAdapter;
import android.widget.Button; import android.widget.Button;
import android.widget.CheckBox;
import android.widget.CompoundButton;
import android.widget.ListView; import android.widget.ListView;
import android.widget.RadioButton;
import android.widget.RadioGroup;
import android.widget.TextView;
import android.widget.CompoundButton.OnCheckedChangeListener;
import android.widget.Toast;
public class ChooseLocaleWizardActivity extends Activity implements TorConstants { public class ChooseLocaleWizardActivity extends Activity implements TorConstants {
@ -84,8 +68,14 @@ public class ChooseLocaleWizardActivity extends Activity implements TorConstants
Button next = ((Button)findViewById(R.id.btnWizard2)); Button next = ((Button)findViewById(R.id.btnWizard2));
// next.setEnabled(false); // next.setEnabled(false);
String[] strLangs = getResources().getStringArray(R.array.languages);
strLangs[0] = Locale.getDefault().getDisplayName();
ArrayAdapter<String> adapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, android.R.id.text1, strLangs);
listLocales.setAdapter(adapter);
listLocales.setSelection(0); listLocales.setSelection(0);
listLocales.setOnItemClickListener(new OnItemClickListener() { listLocales.setOnItemClickListener(new OnItemClickListener() {