Added "Demo Mode" when phone data source is selected and highlighted it in warning colour - fixes #56.
This commit is contained in:
@@ -504,9 +504,15 @@ public class MainActivity extends AppCompatActivity {
|
||||
if (mUtil.isServerRunning()) {
|
||||
tv = (TextView) findViewById(R.id.serverStatusTv);
|
||||
if (mConnection.mBound)
|
||||
if (mConnection.mSdServer.mSdDataSourceName.equals("Phone")) {
|
||||
tv.setText(getString(R.string.ServerRunningOK) + getString(R.string.DataSource) + " = " + "Phone"+"\n"+"(Demo Mode)");
|
||||
tv.setBackgroundColor(warnColour);
|
||||
tv.setTextColor(warnTextColour);
|
||||
} else {
|
||||
tv.setText(getString(R.string.ServerRunningOK) + getString(R.string.DataSource) + " = " + mConnection.mSdServer.mSdDataSourceName);
|
||||
tv.setBackgroundColor(okColour);
|
||||
tv.setTextColor(okTextColour);
|
||||
}
|
||||
tv = (TextView) findViewById(R.id.serverIpTv);
|
||||
tv.setText(getString(R.string.AccessServerAt) + " http://"
|
||||
+ mUtil.getLocalIpAddress()
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<TextView
|
||||
android:id="@+id/serverStatusTv"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0.5"
|
||||
android:gravity="center"
|
||||
android:text="textView1" />
|
||||
@@ -27,7 +27,7 @@
|
||||
<TextView
|
||||
android:id="@+id/serverIpTv"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="0.5"
|
||||
android:gravity="center"
|
||||
android:text="textView2" />
|
||||
@@ -81,7 +81,7 @@
|
||||
<TextView
|
||||
android:id="@+id/battTv"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:text="battTv" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
Reference in New Issue
Block a user