Compare commits
2 Commits
v2019.3.28
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| e060f8505f | |||
| 84494ab68d |
@@ -6,8 +6,8 @@ android {
|
|||||||
applicationId "de.weseng.wifiweatherstation"
|
applicationId "de.weseng.wifiweatherstation"
|
||||||
minSdkVersion 26
|
minSdkVersion 26
|
||||||
targetSdkVersion 28
|
targetSdkVersion 28
|
||||||
versionCode 20190328
|
versionCode 20190331
|
||||||
versionName "2019.3.28"
|
versionName "2019.3.31"
|
||||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||||
}
|
}
|
||||||
buildTypes {
|
buildTypes {
|
||||||
|
|||||||
@@ -32,8 +32,7 @@
|
|||||||
</activity>
|
</activity>
|
||||||
<activity
|
<activity
|
||||||
android:name=".MainNativeActivity"
|
android:name=".MainNativeActivity"
|
||||||
android:label="@string/app_name"
|
android:label="@string/app_name">
|
||||||
android:configChanges="orientation|screenSize">
|
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.MAIN" />
|
<action android:name="android.intent.action.MAIN" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
|
|||||||
@@ -27,6 +27,9 @@ import org.json.JSONArray;
|
|||||||
import org.json.JSONException;
|
import org.json.JSONException;
|
||||||
import org.json.JSONObject;
|
import org.json.JSONObject;
|
||||||
|
|
||||||
|
import java.text.DecimalFormat;
|
||||||
|
import java.text.NumberFormat;
|
||||||
|
import java.text.ParseException;
|
||||||
import java.time.Instant;
|
import java.time.Instant;
|
||||||
import java.time.ZoneId;
|
import java.time.ZoneId;
|
||||||
import java.time.format.DateTimeFormatter;
|
import java.time.format.DateTimeFormatter;
|
||||||
@@ -99,10 +102,9 @@ public class MainNativeActivity extends AppCompatActivity {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
TextView tv = findViewById(R.id.textViewWeatherOutdoor);
|
TextView tvo = findViewById(R.id.textViewWeatherOutdoor);
|
||||||
tv.setText(Html.fromHtml(getString(R.string.weather_outdoor), Html.FROM_HTML_MODE_COMPACT));
|
tvo.setText(Html.fromHtml(getString(R.string.weather_outdoor), Html.FROM_HTML_MODE_COMPACT));
|
||||||
|
|
||||||
if (savedInstanceState == null) {
|
|
||||||
String urlPre = "";
|
String urlPre = "";
|
||||||
if (SettingsActivity.isLocal(getApplicationContext())) {
|
if (SettingsActivity.isLocal(getApplicationContext())) {
|
||||||
//Toast.makeText(getApplicationContext(), "intern", Toast.LENGTH_LONG).show();
|
//Toast.makeText(getApplicationContext(), "intern", Toast.LENGTH_LONG).show();
|
||||||
@@ -113,12 +115,95 @@ public class MainNativeActivity extends AppCompatActivity {
|
|||||||
if (urlGlobal != null && urlGlobal.length() > 0)
|
if (urlGlobal != null && urlGlobal.length() > 0)
|
||||||
urlPre = urlGlobal.substring(urlGlobal.length() - 1).equals("/") ? urlGlobal : urlGlobal + "/";
|
urlPre = urlGlobal.substring(urlGlobal.length() - 1).equals("/") ? urlGlobal : urlGlobal + "/";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Restore saved state of orientation change
|
||||||
|
*/
|
||||||
|
if (savedInstanceState != null) {
|
||||||
|
CharSequence cs;
|
||||||
|
String s;
|
||||||
|
Color color;
|
||||||
|
TextView tv;
|
||||||
|
float f;
|
||||||
|
ArrayList<Integer> alt = new ArrayList<>();
|
||||||
|
alt.add(R.id.textViewTemperatureValue1);
|
||||||
|
alt.add(R.id.textViewTemperatureValue2);
|
||||||
|
alt.add(R.id.textViewTemperatureValue3);
|
||||||
|
for (int i : alt) {
|
||||||
|
cs = savedInstanceState.getCharSequence(String.valueOf(i));
|
||||||
|
tv = findViewById(i);
|
||||||
|
tv.setText(cs);
|
||||||
|
s = cs.toString();
|
||||||
|
if (!s.equals(getString(R.string.dummy_value))) {
|
||||||
|
NumberFormat nf = new DecimalFormat("0.#");
|
||||||
|
try {
|
||||||
|
f = nf.parse(s).floatValue();
|
||||||
|
color = valueToColor(f, 17, 19, 23, 25, blue, green, red);
|
||||||
|
tv.setTextColor(color.toArgb());
|
||||||
|
} catch (ParseException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ArrayList<Integer> alh = new ArrayList<>();
|
||||||
|
alh.add(R.id.textViewHumidityValue1);
|
||||||
|
alh.add(R.id.textViewHumidityValue2);
|
||||||
|
alh.add(R.id.textViewHumidityValue3);
|
||||||
|
for (int i : alh) {
|
||||||
|
cs = savedInstanceState.getCharSequence(String.valueOf(i));
|
||||||
|
tv = findViewById(i);
|
||||||
|
tv.setText(cs);
|
||||||
|
s = cs.toString();
|
||||||
|
if (!s.equals(getString(R.string.dummy_value))) {
|
||||||
|
NumberFormat nf = new DecimalFormat("0.#");
|
||||||
|
try {
|
||||||
|
f = nf.parse(s).floatValue();
|
||||||
|
color = valueToColor(f, 25, 40, 60, 75, red, green, blue);
|
||||||
|
tv.setTextColor(color.toArgb());
|
||||||
|
} catch (ParseException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ArrayList<Integer> alm = new ArrayList<>();
|
||||||
|
alm.add(R.id.textViewTemperatureMin1);
|
||||||
|
alm.add(R.id.textViewTemperatureMin2);
|
||||||
|
alm.add(R.id.textViewTemperatureMin3);
|
||||||
|
alm.add(R.id.textViewTemperatureMax1);
|
||||||
|
alm.add(R.id.textViewTemperatureMax2);
|
||||||
|
alm.add(R.id.textViewTemperatureMax3);
|
||||||
|
alm.add(R.id.textViewTemperatureDelta1);
|
||||||
|
alm.add(R.id.textViewTemperatureDelta2);
|
||||||
|
alm.add(R.id.textViewTemperatureDelta3);
|
||||||
|
alm.add(R.id.textViewHumidityMin1);
|
||||||
|
alm.add(R.id.textViewHumidityMin2);
|
||||||
|
alm.add(R.id.textViewHumidityMin3);
|
||||||
|
alm.add(R.id.textViewHumidityMax1);
|
||||||
|
alm.add(R.id.textViewHumidityMax2);
|
||||||
|
alm.add(R.id.textViewHumidityMax3);
|
||||||
|
alm.add(R.id.textViewHumidityDelta1);
|
||||||
|
alm.add(R.id.textViewHumidityDelta2);
|
||||||
|
alm.add(R.id.textViewHumidityDelta3);
|
||||||
|
alm.add(R.id.textViewWeatherOutdoor);
|
||||||
|
for (int i : alm) {
|
||||||
|
cs = savedInstanceState.getCharSequence(String.valueOf(i));
|
||||||
|
tv = findViewById(i);
|
||||||
|
tv.setText(cs);
|
||||||
|
}
|
||||||
|
dataListStringTemp1 = savedInstanceState.getStringArrayList(String.valueOf("dataListStringTemp1"));
|
||||||
|
dataListStringTemp2 = savedInstanceState.getStringArrayList(String.valueOf("dataListStringTemp2"));
|
||||||
|
dataListStringTemp3 = savedInstanceState.getStringArrayList(String.valueOf("dataListStringTemp3"));
|
||||||
|
dataListStringHumidity1 = savedInstanceState.getStringArrayList(String.valueOf("dataListStringHumidity1"));
|
||||||
|
dataListStringHumidity2 = savedInstanceState.getStringArrayList(String.valueOf("dataListStringHumidity2"));
|
||||||
|
dataListStringHumidity3 = savedInstanceState.getStringArrayList(String.valueOf("dataListStringHumidity3"));
|
||||||
|
}
|
||||||
|
|
||||||
executeAsyncTask(new GetData(R.id.textViewTemperatureValue1, R.id.textViewHumidityValue1),
|
executeAsyncTask(new GetData(R.id.textViewTemperatureValue1, R.id.textViewHumidityValue1),
|
||||||
urlPre + "api.php?host=192.168.1.71&last");
|
urlPre + "api.php?host=" + getString(R.string.host_data_server_1) + "&last");
|
||||||
executeAsyncTask(new GetData(R.id.textViewTemperatureValue2, R.id.textViewHumidityValue2),
|
executeAsyncTask(new GetData(R.id.textViewTemperatureValue2, R.id.textViewHumidityValue2),
|
||||||
urlPre + "api.php?host=192.168.1.72&last");
|
urlPre + "api.php?host=" + getString(R.string.host_data_server_2) + "&last");
|
||||||
executeAsyncTask(new GetData(R.id.textViewTemperatureValue3, R.id.textViewHumidityValue3),
|
executeAsyncTask(new GetData(R.id.textViewTemperatureValue3, R.id.textViewHumidityValue3),
|
||||||
urlPre + "api.php?host=192.168.1.73&last");
|
urlPre + "api.php?host=" + getString(R.string.host_data_server_3) + "&last");
|
||||||
|
|
||||||
executeAsyncTask(new OpenWeatherMap(R.id.textViewWeatherOutdoor), urlPre + "openweathermap/api.php");
|
executeAsyncTask(new OpenWeatherMap(R.id.textViewWeatherOutdoor), urlPre + "openweathermap/api.php");
|
||||||
|
|
||||||
@@ -134,10 +219,53 @@ public class MainNativeActivity extends AppCompatActivity {
|
|||||||
R.id.textViewTemperatureMin3, R.id.textViewTemperatureMax3, R.id.textViewTemperatureDelta3,
|
R.id.textViewTemperatureMin3, R.id.textViewTemperatureMax3, R.id.textViewTemperatureDelta3,
|
||||||
R.id.textViewHumidityMin3, R.id.textViewHumidityMax3, R.id.textViewHumidityDelta3,
|
R.id.textViewHumidityMin3, R.id.textViewHumidityMax3, R.id.textViewHumidityDelta3,
|
||||||
true, dataListStringTemp3, dataListStringHumidity3));
|
true, dataListStringTemp3, dataListStringHumidity3));
|
||||||
executeAsyncTask(endlessTasks.get(0), urlPre + "api.php?host=192.168.1.71&day");
|
executeAsyncTask(endlessTasks.get(0), urlPre + "api.php?host=" + getString(R.string.host_data_server_1) + "&day");
|
||||||
executeAsyncTask(endlessTasks.get(1), urlPre + "api.php?host=192.168.1.72&day");
|
executeAsyncTask(endlessTasks.get(1), urlPre + "api.php?host=" + getString(R.string.host_data_server_2) + "&day");
|
||||||
executeAsyncTask(endlessTasks.get(2), urlPre + "api.php?host=192.168.1.73&day");
|
executeAsyncTask(endlessTasks.get(2), urlPre + "api.php?host=" + getString(R.string.host_data_server_3) + "&day");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Save state for orientation change
|
||||||
|
*/
|
||||||
|
protected void onSaveInstanceState(Bundle savedInstanceState) {
|
||||||
|
super.onSaveInstanceState(savedInstanceState);
|
||||||
|
ArrayList<Integer> al = new ArrayList<>();
|
||||||
|
al.add(R.id.textViewTemperatureValue1);
|
||||||
|
al.add(R.id.textViewTemperatureValue2);
|
||||||
|
al.add(R.id.textViewTemperatureValue3);
|
||||||
|
al.add(R.id.textViewTemperatureMin1);
|
||||||
|
al.add(R.id.textViewTemperatureMin2);
|
||||||
|
al.add(R.id.textViewTemperatureMin3);
|
||||||
|
al.add(R.id.textViewTemperatureMax1);
|
||||||
|
al.add(R.id.textViewTemperatureMax2);
|
||||||
|
al.add(R.id.textViewTemperatureMax3);
|
||||||
|
al.add(R.id.textViewTemperatureDelta1);
|
||||||
|
al.add(R.id.textViewTemperatureDelta2);
|
||||||
|
al.add(R.id.textViewTemperatureDelta3);
|
||||||
|
al.add(R.id.textViewHumidityValue1);
|
||||||
|
al.add(R.id.textViewHumidityValue2);
|
||||||
|
al.add(R.id.textViewHumidityValue3);
|
||||||
|
al.add(R.id.textViewHumidityMin1);
|
||||||
|
al.add(R.id.textViewHumidityMin2);
|
||||||
|
al.add(R.id.textViewHumidityMin3);
|
||||||
|
al.add(R.id.textViewHumidityMax1);
|
||||||
|
al.add(R.id.textViewHumidityMax2);
|
||||||
|
al.add(R.id.textViewHumidityMax3);
|
||||||
|
al.add(R.id.textViewHumidityDelta1);
|
||||||
|
al.add(R.id.textViewHumidityDelta2);
|
||||||
|
al.add(R.id.textViewHumidityDelta3);
|
||||||
|
al.add(R.id.textViewWeatherOutdoor);
|
||||||
|
TextView tv;
|
||||||
|
for (int i : al) {
|
||||||
|
tv = findViewById(i);
|
||||||
|
savedInstanceState.putCharSequence(String.valueOf(i), tv.getText());
|
||||||
|
}
|
||||||
|
savedInstanceState.putStringArrayList("dataListStringTemp1", dataListStringTemp1);
|
||||||
|
savedInstanceState.putStringArrayList("dataListStringTemp2", dataListStringTemp2);
|
||||||
|
savedInstanceState.putStringArrayList("dataListStringTemp3", dataListStringTemp3);
|
||||||
|
savedInstanceState.putStringArrayList("dataListStringHumidity1", dataListStringHumidity1);
|
||||||
|
savedInstanceState.putStringArrayList("dataListStringHumidity2", dataListStringHumidity2);
|
||||||
|
savedInstanceState.putStringArrayList("dataListStringHumidity3", dataListStringHumidity3);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -229,12 +357,12 @@ public class MainNativeActivity extends AppCompatActivity {
|
|||||||
|
|
||||||
GetData(int v1, int v2, int min1, int max1, int delta1, int min2, int max2, int delta2) {
|
GetData(int v1, int v2, int min1, int max1, int delta1, int min2, int max2, int delta2) {
|
||||||
this(v1, v2);
|
this(v1, v2);
|
||||||
idMin1 = min1;
|
this.idMin1 = min1;
|
||||||
idMax1 = max1;
|
this.idMax1 = max1;
|
||||||
idDelta1 = delta1;
|
this.idDelta1 = delta1;
|
||||||
idMin2 = min2;
|
this.idMin2 = min2;
|
||||||
idMax2 = max2;
|
this.idMax2 = max2;
|
||||||
idDelta2 = delta2;
|
this.idDelta2 = delta2;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -257,7 +385,7 @@ public class MainNativeActivity extends AppCompatActivity {
|
|||||||
super.onPreExecute();
|
super.onPreExecute();
|
||||||
// Showing progress bar
|
// Showing progress bar
|
||||||
pBar = findViewById(R.id.progressBar);
|
pBar = findViewById(R.id.progressBar);
|
||||||
if (pBar.getVisibility() == View.INVISIBLE) {
|
if (pBar.getVisibility() == View.INVISIBLE && pBarLockCount != 0) {
|
||||||
pBar.setVisibility(View.VISIBLE);
|
pBar.setVisibility(View.VISIBLE);
|
||||||
}
|
}
|
||||||
if (endless) {
|
if (endless) {
|
||||||
|
|||||||
526
app/src/main/res/layout-land/activity_main_native.xml
Normal file
526
app/src/main/res/layout-land/activity_main_native.xml
Normal file
@@ -0,0 +1,526 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
tools:context=".MainNativeActivity">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_marginBottom="@dimen/activity_vertical_margin"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent">
|
||||||
|
|
||||||
|
<TableLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="@dimen/widget_horizontal_margin"
|
||||||
|
android:layout_marginTop="@dimen/activity_vertical_margin"
|
||||||
|
android:layout_marginEnd="@dimen/widget_horizontal_margin"
|
||||||
|
android:layout_weight="1"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHorizontal_bias="1.0"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
|
<TableRow
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_marginStart="@dimen/widget_horizontal_margin"
|
||||||
|
android:layout_marginBottom="-8dp"
|
||||||
|
android:weightSum="6">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/textViewTemperature"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_span="3"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:text="@string/temperature"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/textViewHumidity"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_span="3"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:text="@string/humidity"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
</TableRow>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:background="?android:attr/listDivider"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent" />
|
||||||
|
|
||||||
|
<TableLayout
|
||||||
|
android:id="@+id/tableRow1"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="?android:attr/selectableItemBackground"
|
||||||
|
android:paddingTop="@dimen/widget_vertical_margin"
|
||||||
|
android:paddingBottom="@dimen/widget_vertical_margin">
|
||||||
|
|
||||||
|
<TableRow
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_marginStart="@dimen/widget_horizontal_margin"
|
||||||
|
android:layout_marginEnd="@dimen/widget_horizontal_margin">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/textViewTemperatureValue1"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="end"
|
||||||
|
android:text="@string/dummy_value"
|
||||||
|
android:textSize="@dimen/value_main_size"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/textViewTemperatureUnit1"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="@dimen/widget_horizontal_margin"
|
||||||
|
android:text="@string/temperature_unit"
|
||||||
|
android:textSize="32sp" />
|
||||||
|
|
||||||
|
<Space
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/textViewHumidityValue1"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="end"
|
||||||
|
android:text="@string/dummy_value"
|
||||||
|
android:textSize="@dimen/value_main_size"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/textViewHumidityUnit1"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="@dimen/widget_horizontal_margin"
|
||||||
|
android:text="@string/humidity_unit"
|
||||||
|
android:textSize="32sp" />
|
||||||
|
|
||||||
|
<Space
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1" />
|
||||||
|
</TableRow>
|
||||||
|
|
||||||
|
<TableRow
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_marginStart="@dimen/widget_horizontal_margin"
|
||||||
|
android:layout_marginEnd="@dimen/widget_horizontal_margin"
|
||||||
|
android:weightSum="6">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_span="3"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/textViewTemperatureMin1"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginEnd="@dimen/widget_horizontal_margin"
|
||||||
|
android:text="@string/dummy_value2" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/textViewTemperatureMax1"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginEnd="@dimen/widget_horizontal_margin"
|
||||||
|
android:text="@string/dummy_value2" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/textViewTemperatureDelta1"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/dummy_value2" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_span="3"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/textViewHumidityMin1"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginEnd="@dimen/widget_horizontal_margin"
|
||||||
|
android:text="@string/dummy_value2" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/textViewHumidityMax1"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginEnd="@dimen/widget_horizontal_margin"
|
||||||
|
android:text="@string/dummy_value2" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/textViewHumidityDelta1"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/dummy_value2" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</TableRow>
|
||||||
|
</TableLayout>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:background="?android:attr/listDivider"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent" />
|
||||||
|
|
||||||
|
<TableLayout
|
||||||
|
android:id="@+id/tableRow2"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="?android:attr/selectableItemBackground"
|
||||||
|
android:paddingTop="@dimen/widget_vertical_margin"
|
||||||
|
android:paddingBottom="@dimen/widget_vertical_margin">
|
||||||
|
|
||||||
|
<TableRow
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_marginStart="@dimen/widget_horizontal_margin"
|
||||||
|
android:layout_marginEnd="@dimen/widget_horizontal_margin">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/textViewTemperatureValue2"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="end"
|
||||||
|
android:text="@string/dummy_value"
|
||||||
|
android:textSize="@dimen/value_main_size"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/textViewTemperatureUnit2"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="@dimen/widget_horizontal_margin"
|
||||||
|
android:text="@string/temperature_unit"
|
||||||
|
android:textSize="32sp" />
|
||||||
|
|
||||||
|
<Space
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/textViewHumidityValue2"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="end"
|
||||||
|
android:text="@string/dummy_value"
|
||||||
|
android:textSize="@dimen/value_main_size"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/textViewHumidityUnit2"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="@dimen/widget_horizontal_margin"
|
||||||
|
android:text="@string/humidity_unit"
|
||||||
|
android:textSize="32sp" />
|
||||||
|
|
||||||
|
<Space
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1" />
|
||||||
|
</TableRow>
|
||||||
|
|
||||||
|
<TableRow
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_marginStart="@dimen/widget_horizontal_margin"
|
||||||
|
android:layout_marginEnd="@dimen/widget_horizontal_margin"
|
||||||
|
android:weightSum="6">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_span="3"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/textViewTemperatureMin2"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginEnd="@dimen/widget_horizontal_margin"
|
||||||
|
android:text="@string/dummy_value2" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/textViewTemperatureMax2"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginEnd="@dimen/widget_horizontal_margin"
|
||||||
|
android:text="@string/dummy_value2" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/textViewTemperatureDelta2"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/dummy_value2" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_span="3"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/textViewHumidityMin2"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginEnd="@dimen/widget_horizontal_margin"
|
||||||
|
android:text="@string/dummy_value2" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/textViewHumidityMax2"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginEnd="@dimen/widget_horizontal_margin"
|
||||||
|
android:text="@string/dummy_value2" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/textViewHumidityDelta2"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/dummy_value2" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</TableRow>
|
||||||
|
</TableLayout>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:background="?android:attr/listDivider"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent" />
|
||||||
|
|
||||||
|
<TableLayout
|
||||||
|
android:id="@+id/tableRow3"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="?android:attr/selectableItemBackground"
|
||||||
|
android:paddingTop="@dimen/widget_vertical_margin"
|
||||||
|
android:paddingBottom="@dimen/widget_vertical_margin">
|
||||||
|
|
||||||
|
<TableRow
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_marginStart="@dimen/widget_horizontal_margin"
|
||||||
|
android:layout_marginEnd="@dimen/widget_horizontal_margin">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/textViewTemperatureValue3"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="end"
|
||||||
|
android:text="@string/dummy_value"
|
||||||
|
android:textSize="@dimen/value_main_size"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/textViewTemperatureUnit3"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="@dimen/widget_horizontal_margin"
|
||||||
|
android:text="@string/temperature_unit"
|
||||||
|
android:textSize="32sp" />
|
||||||
|
|
||||||
|
<Space
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/textViewHumidityValue3"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="end"
|
||||||
|
android:text="@string/dummy_value"
|
||||||
|
android:textSize="@dimen/value_main_size"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/textViewHumidityUnit3"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="@dimen/widget_horizontal_margin"
|
||||||
|
android:text="@string/humidity_unit"
|
||||||
|
android:textSize="32sp" />
|
||||||
|
|
||||||
|
<Space
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1" />
|
||||||
|
</TableRow>
|
||||||
|
|
||||||
|
<TableRow
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_marginStart="@dimen/widget_horizontal_margin"
|
||||||
|
android:layout_marginEnd="@dimen/widget_horizontal_margin"
|
||||||
|
android:weightSum="6">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_span="3"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/textViewTemperatureMin3"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginEnd="@dimen/widget_horizontal_margin"
|
||||||
|
android:text="@string/dummy_value2" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/textViewTemperatureMax3"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginEnd="@dimen/widget_horizontal_margin"
|
||||||
|
android:text="@string/dummy_value2" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/textViewTemperatureDelta3"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/dummy_value2" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_span="3"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/textViewHumidityMin3"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginEnd="@dimen/widget_horizontal_margin"
|
||||||
|
android:text="@string/dummy_value2" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/textViewHumidityMax3"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginEnd="@dimen/widget_horizontal_margin"
|
||||||
|
android:text="@string/dummy_value2" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/textViewHumidityDelta3"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/dummy_value2" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</TableRow>
|
||||||
|
</TableLayout>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:background="?android:attr/listDivider"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent" />
|
||||||
|
|
||||||
|
</TableLayout>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="1dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="?android:attr/listDivider"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHorizontal_bias="0.0"
|
||||||
|
app:layout_constraintStart_toStartOf="parent" />
|
||||||
|
|
||||||
|
<android.support.constraint.ConstraintLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/textViewWeatherOutdoor"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="@dimen/widget_horizontal_margin"
|
||||||
|
android:layout_marginTop="@dimen/widget_vertical_margin"
|
||||||
|
android:layout_marginEnd="@dimen/widget_horizontal_margin"
|
||||||
|
android:layout_marginBottom="@dimen/widget_vertical_margin"
|
||||||
|
android:text="@string/weather_outdoor"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:layout_marginBottom="80dp"
|
||||||
|
android:background="?android:attr/listDivider"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHorizontal_bias="0.0"
|
||||||
|
app:layout_constraintStart_toStartOf="parent" />
|
||||||
|
|
||||||
|
<!-- size 48x48 -->
|
||||||
|
<ProgressBar
|
||||||
|
android:id="@+id/progressBar"
|
||||||
|
style="?android:attr/progressBarStyle"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginEnd="16dp"
|
||||||
|
android:layout_marginBottom="16dp"
|
||||||
|
android:visibility="invisible"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent" />
|
||||||
|
|
||||||
|
<!-- size 16x16 -->
|
||||||
|
<ProgressBar
|
||||||
|
android:id="@+id/progressBarSmall"
|
||||||
|
style="?android:attr/progressBarStyleSmall"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginEnd="32dp"
|
||||||
|
android:layout_marginBottom="32dp"
|
||||||
|
android:visibility="invisible"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent" />
|
||||||
|
|
||||||
|
</android.support.constraint.ConstraintLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
</android.support.constraint.ConstraintLayout>
|
||||||
@@ -59,6 +59,9 @@
|
|||||||
<string name="hint_url_local">Local URL</string>
|
<string name="hint_url_local">Local URL</string>
|
||||||
<string name="url_global" translatable="false">http://inetsrv.no-ip.org/site/wifi-weather-station/</string>
|
<string name="url_global" translatable="false">http://inetsrv.no-ip.org/site/wifi-weather-station/</string>
|
||||||
<string name="hint_url_global">Global URL</string>
|
<string name="hint_url_global">Global URL</string>
|
||||||
|
<string name="host_data_server_1" translatable="false">192.168.1.71</string>
|
||||||
|
<string name="host_data_server_2" translatable="false">192.168.1.72</string>
|
||||||
|
<string name="host_data_server_3" translatable="false">192.168.1.73</string>
|
||||||
<!-- Strings related to login -->
|
<!-- Strings related to login -->
|
||||||
<string name="title_activity_login">Sign in</string>
|
<string name="title_activity_login">Sign in</string>
|
||||||
<string name="prompt_email">Email</string>
|
<string name="prompt_email">Email</string>
|
||||||
|
|||||||
Reference in New Issue
Block a user