From d9d325b18bb60f831043c785e7af72405b1dfa3d Mon Sep 17 00:00:00 2001 From: CiufudeanDani Date: Mon, 28 Mar 2022 16:34:53 +0300 Subject: [PATCH] text color on radio --- .../src/main/java/com/safemobile/services/TCPService.java | 6 ++---- .../src/main/java/com/safemobile/services/TCPhandler.java | 2 +- .../com/safemobile/safedispatch/SDMobileActivity.java | 8 ++++---- safeDispatch/src/main/res/layout/tabradio.xml | 8 +++----- 4 files changed, 10 insertions(+), 14 deletions(-) diff --git a/libSafeMobile/src/main/java/com/safemobile/services/TCPService.java b/libSafeMobile/src/main/java/com/safemobile/services/TCPService.java index b734c77..eb83182 100644 --- a/libSafeMobile/src/main/java/com/safemobile/services/TCPService.java +++ b/libSafeMobile/src/main/java/com/safemobile/services/TCPService.java @@ -28,13 +28,11 @@ public class TCPService extends Service { int port = 13589; try { port = Integer.parseInt(AppParams.PORT); - } - catch(Exception ex) { } + } catch(Exception ex) { } tcpParser = new TCPmsgParser(); - if(tcp == null && !AppParams.IP.equalsIgnoreCase("n/a")) - { + if(tcp == null && !AppParams.IP.equalsIgnoreCase("n/a")) { tcp = new TCPhandler(getApplicationContext(), AppParams.IP, port); } diff --git a/libSafeMobile/src/main/java/com/safemobile/services/TCPhandler.java b/libSafeMobile/src/main/java/com/safemobile/services/TCPhandler.java index 038ca86..4cec5e1 100644 --- a/libSafeMobile/src/main/java/com/safemobile/services/TCPhandler.java +++ b/libSafeMobile/src/main/java/com/safemobile/services/TCPhandler.java @@ -25,7 +25,7 @@ public class TCPhandler implements Runnable private boolean alive = true; public String serverHostname = new String ("10.120.1.114");// - private int port = 13579; + private int port; private Thread listenThread; private Socket soc =null; diff --git a/safeDispatch/src/main/java/com/safemobile/safedispatch/SDMobileActivity.java b/safeDispatch/src/main/java/com/safemobile/safedispatch/SDMobileActivity.java index 387f136..e1f2218 100644 --- a/safeDispatch/src/main/java/com/safemobile/safedispatch/SDMobileActivity.java +++ b/safeDispatch/src/main/java/com/safemobile/safedispatch/SDMobileActivity.java @@ -233,10 +233,10 @@ public class SDMobileActivity extends Activity { etPassword.setText(AppParams.PASSWORD.equalsIgnoreCase("n/a") ? "" : AppParams.PASSWORD); } - layoutTCP = (RelativeLayout) findViewById(R.id.layoutTCP); + layoutTCP = findViewById(R.id.layoutTCP); - llUsername = (LinearLayout) findViewById(R.id.llUsername); - llPassword = (LinearLayout) findViewById(R.id.llPassword); + llUsername = findViewById(R.id.llUsername); + llPassword = findViewById(R.id.llPassword); // enable ui after the language is changed and tcp connection is on if (tcp != null && tcp.isConnectionUP) { @@ -663,7 +663,7 @@ public class SDMobileActivity extends Activity { // get default password AppParams.PASSWORD = AppParams.prefs.getString(PASSWORD, "n/a"); // get default IP - AppParams.IP = AppParams.prefs.getString("ip", "192.168.2.100"); + AppParams.IP = AppParams.prefs.getString("ip", "185.8.154.190"); // get Radio ID & IP AppParams.RADIOID = AppParams.prefs.getInt("radioId", 100); diff --git a/safeDispatch/src/main/res/layout/tabradio.xml b/safeDispatch/src/main/res/layout/tabradio.xml index ddb84b4..5190004 100644 --- a/safeDispatch/src/main/res/layout/tabradio.xml +++ b/safeDispatch/src/main/res/layout/tabradio.xml @@ -237,7 +237,6 @@ android:layout_height="wrap_content" android:text="@string/Zone" android:textStyle="bold" - android:textColor="#ffffffff" android:textAppearance="?android:attr/textAppearanceMedium"/> @@ -387,7 +385,7 @@ android:checked="true" android:text="@string/AllCall" android:textAppearance="?android:attr/textAppearanceMedium" - android:textColor="#ffffffff" /> + /> + /> + />