Added "Demo Mode" when phone data source is selected and highlighted it in warning colour - fixes #56.

This commit is contained in:
Graham Jones
2022-08-06 20:52:45 +01:00
parent 3fa884dcfb
commit e953887a4b
2 changed files with 12 additions and 6 deletions

View File

@@ -504,9 +504,15 @@ public class MainActivity extends AppCompatActivity {
if (mUtil.isServerRunning()) {
tv = (TextView) findViewById(R.id.serverStatusTv);
if (mConnection.mBound)
tv.setText(getString(R.string.ServerRunningOK) + getString(R.string.DataSource) + " = " + mConnection.mSdServer.mSdDataSourceName);
tv.setBackgroundColor(okColour);
tv.setTextColor(okTextColour);
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()