Removed array.xml
This commit is contained in:
parent
bf7d5d408b
commit
b30695b577
@ -41,8 +41,7 @@
|
||||
<activity
|
||||
android:name=".activity.MainActivity"
|
||||
android:label="@string/app_name"
|
||||
android:launchMode="singleTask"
|
||||
android:theme="@style/AppTheme.NoActionBar">
|
||||
android:launchMode="singleTask">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN"/>
|
||||
|
||||
|
@ -23,6 +23,14 @@ public class Daedalus extends Application {
|
||||
add(new DnsServer("2", "123.206.61.167", R.string.server_south_china));
|
||||
}};
|
||||
|
||||
public static final String[] DEFAULT_TEST_DOMAINS = new String[]{
|
||||
"google.com",
|
||||
"twitter.com",
|
||||
"youtube.com",
|
||||
"facebook.com",
|
||||
"wikipedia.org"
|
||||
};
|
||||
|
||||
private static Daedalus instance = null;
|
||||
|
||||
@Override
|
||||
|
@ -10,7 +10,6 @@ import android.os.Bundle;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.support.design.widget.FloatingActionButton;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.support.v7.widget.Toolbar;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
@ -46,8 +45,8 @@ public class MainActivity extends AppCompatActivity {
|
||||
initConfig();
|
||||
|
||||
setContentView(R.layout.activity_main);
|
||||
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
|
||||
setSupportActionBar(toolbar);
|
||||
/*Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
|
||||
setSupportActionBar(toolbar);*/
|
||||
|
||||
FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
|
||||
fab.setOnClickListener(new View.OnClickListener() {
|
||||
|
@ -16,6 +16,7 @@ import de.measite.minidns.Question;
|
||||
import de.measite.minidns.Record;
|
||||
import de.measite.minidns.record.A;
|
||||
import de.measite.minidns.util.InetAddressUtil;
|
||||
import org.itxtech.daedalus.Daedalus;
|
||||
import org.itxtech.daedalus.R;
|
||||
import org.itxtech.daedalus.util.DnsServer;
|
||||
|
||||
@ -53,7 +54,7 @@ public class ServerTestActivity extends AppCompatActivity {
|
||||
spinnerServerChoice.setAdapter(spinnerArrayAdapter);
|
||||
|
||||
final AutoCompleteTextView textViewTestUrl = (AutoCompleteTextView) findViewById(R.id.autoCompleteTextView_test_url);
|
||||
ArrayAdapter autoCompleteArrayAdapter = new ArrayAdapter<>(this, android.R.layout.simple_list_item_1, getResources().getStringArray(R.array.default_test_urls));
|
||||
ArrayAdapter autoCompleteArrayAdapter = new ArrayAdapter<>(this, android.R.layout.simple_list_item_1, Daedalus.DEFAULT_TEST_DOMAINS);
|
||||
textViewTestUrl.setAdapter(autoCompleteArrayAdapter);
|
||||
|
||||
final Context context = this;
|
||||
@ -78,7 +79,7 @@ public class ServerTestActivity extends AppCompatActivity {
|
||||
try {
|
||||
String testUrl = textViewTestUrl.getText().toString();
|
||||
if (testUrl.equals("")) {
|
||||
testUrl = getResources().getStringArray(R.array.default_test_urls)[0];
|
||||
testUrl = Daedalus.DEFAULT_TEST_DOMAINS[0];
|
||||
}
|
||||
String testText = "";
|
||||
String[] dnsServers = {DnsServer.getDnsServerAddressByStringDesription(context, spinnerServerChoice.getSelectedItem().toString()), "114.114.114.114", "8.8.8.8"};
|
||||
|
@ -5,7 +5,14 @@ import android.preference.ListPreference;
|
||||
import android.util.AttributeSet;
|
||||
|
||||
/**
|
||||
* @author PeratX
|
||||
* Daedalus Project
|
||||
*
|
||||
* @author iTXTech
|
||||
* @link https://itxtech.org
|
||||
* <p>
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, version 3.
|
||||
*/
|
||||
public class ClickPreference extends ListPreference {
|
||||
|
||||
|
@ -8,20 +8,6 @@
|
||||
android:fitsSystemWindows="true"
|
||||
tools:context="org.itxtech.daedalus.activity.MainActivity">
|
||||
|
||||
<android.support.design.widget.AppBarLayout
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:theme="@style/AppTheme.AppBarOverlay">
|
||||
|
||||
<android.support.v7.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:background="?attr/colorPrimary"
|
||||
app:popupTheme="@style/AppTheme.PopupOverlay"/>
|
||||
|
||||
</android.support.design.widget.AppBarLayout>
|
||||
|
||||
<android.support.design.widget.FloatingActionButton
|
||||
android:id="@+id/fab"
|
||||
android:layout_width="wrap_content"
|
||||
|
@ -1,9 +0,0 @@
|
||||
<resources>
|
||||
<string-array name="default_test_urls">
|
||||
<item>google.com</item>
|
||||
<item>twitter.com</item>
|
||||
<item>youtube.com</item>
|
||||
<item>facebook.com</item>
|
||||
<item>wikipedia.org</item>
|
||||
</string-array>
|
||||
</resources>
|
Loading…
x
Reference in New Issue
Block a user