Fixed spinner text color on Android 4.x

This commit is contained in:
PeratX 2017-04-29 17:42:19 +08:00
parent 1e9c4d0312
commit 42b445d0be
2 changed files with 2 additions and 2 deletions

View File

@ -51,7 +51,7 @@ public class DnsTestFragment extends Fragment {
final TextView textViewTestInfo = (TextView) view.findViewById(R.id.textView_test_info);
final Spinner spinnerServerChoice = (Spinner) view.findViewById(R.id.spinner_server_choice);
ArrayAdapter spinnerArrayAdapter = new ArrayAdapter<>(Daedalus.getInstance(), android.R.layout.simple_list_item_1, DnsServer.getDnsServerNames(Daedalus.getInstance()));
ArrayAdapter spinnerArrayAdapter = new ArrayAdapter<>(getActivity(), android.R.layout.simple_list_item_1, DnsServer.getDnsServerNames(Daedalus.getInstance()));
spinnerServerChoice.setAdapter(spinnerArrayAdapter);
spinnerServerChoice.setSelection(Integer.valueOf(Daedalus.getPrefs().getString("primary_server", "0")));

View File

@ -45,7 +45,7 @@ public class HostsFragment extends Fragment {
mHandler = new HostsHandler().setView(view).setHostsFragment(this);
final Spinner spinnerHosts = (Spinner) view.findViewById(R.id.spinner_hosts);
ArrayAdapter spinnerArrayAdapter = new ArrayAdapter<>(Daedalus.getInstance(), android.R.layout.simple_list_item_1, HostsProvider.getHostsProviderNames());
ArrayAdapter spinnerArrayAdapter = new ArrayAdapter<>(getActivity(), android.R.layout.simple_list_item_1, HostsProvider.getHostsProviderNames());
spinnerHosts.setAdapter(spinnerArrayAdapter);
spinnerHosts.setSelection(0);