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/safeDispatch/src/main/java/com/safemobile/safedispatch/SDMobileActivity.java b/safeDispatch/src/main/java/com/safemobile/safedispatch/SDMobileActivity.java index 24e1fe0..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); @@ -737,10 +737,10 @@ public class SDMobileActivity extends Activity { Dialog dialogInfo = new Dialog(context); dialogInfo.requestWindowFeature(Window.FEATURE_NO_TITLE); dialogInfo.setContentView(R.layout.dialog_login); - TextView textTitle = (TextView) dialogInfo.findViewById(R.id.textTitle); - TextView text = (TextView) dialogInfo.findViewById(R.id.text); - TextView text2 = (TextView) dialogInfo.findViewById(R.id.text2); - ImageView image = (ImageView) dialogInfo.findViewById(R.id.image); + TextView textTitle = dialogInfo.findViewById(R.id.textTitle); + TextView text = dialogInfo.findViewById(R.id.text); + TextView text2 = dialogInfo.findViewById(R.id.text2); + ImageView image = dialogInfo.findViewById(R.id.image); textTitle.setText(getString(R.string.connectionError)); image.setImageResource(R.drawable.error); diff --git a/safeDispatch/src/main/res/layout-large/row_livevehicle.xml b/safeDispatch/src/main/res/layout-large/row_livevehicle.xml index 57d51c0..01e3748 100644 --- a/safeDispatch/src/main/res/layout-large/row_livevehicle.xml +++ b/safeDispatch/src/main/res/layout-large/row_livevehicle.xml @@ -31,10 +31,10 @@ android:paddingLeft="3dp" android:layout_weight="1"/> - + android:id="@+id/linearLayoutChecked" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_weight="0" + android:background="@drawable/checked" + android:orientation="horizontal" /> \ No newline at end of file diff --git a/safeDispatch/src/main/res/layout-large/tabsetup.xml b/safeDispatch/src/main/res/layout-large/tabsetup.xml index 63dcebb..8e2d5e0 100644 --- a/safeDispatch/src/main/res/layout-large/tabsetup.xml +++ b/safeDispatch/src/main/res/layout-large/tabsetup.xml @@ -32,7 +32,6 @@ android:layout_height="wrap_content" android:text="@string/serverIP" android:textAppearance="?android:attr/textAppearanceMedium" - android:textColor="#FFFFFF" android:textStyle="bold" android:layout_gravity="center_vertical" android:gravity="center_vertical|right" @@ -67,7 +66,6 @@ android:layout_height="wrap_content" android:text="@string/serverPort" android:textAppearance="?android:attr/textAppearanceMedium" - android:textColor="#FFFFFF" android:textStyle="bold" android:gravity="center_vertical|right" android:layout_gravity="center_vertical|right" @@ -112,7 +110,6 @@ android:layout_height="wrap_content" android:text="@string/configName" android:textAppearance="?android:attr/textAppearanceMedium" - android:textColor="#FFFFFF" android:textStyle="bold" android:gravity="center_vertical|right" android:layout_gravity="center_vertical"/> @@ -181,7 +178,6 @@ android:text="@string/language" android:textAppearance="?android:attr/textAppearanceMedium" android:textStyle="bold" - android:textColor="#FFFFFF" android:gravity="right" android:layout_gravity="center_vertical"/> - + diff --git a/safeDispatch/src/main/res/layout/dialog.xml b/safeDispatch/src/main/res/layout/dialog.xml index 3db07c8..20533ca 100644 --- a/safeDispatch/src/main/res/layout/dialog.xml +++ b/safeDispatch/src/main/res/layout/dialog.xml @@ -1,37 +1,38 @@ - - - - - - + + + + + + diff --git a/safeDispatch/src/main/res/layout/dialog_login.xml b/safeDispatch/src/main/res/layout/dialog_login.xml index 95b8f57..23ed11e 100644 --- a/safeDispatch/src/main/res/layout/dialog_login.xml +++ b/safeDispatch/src/main/res/layout/dialog_login.xml @@ -40,7 +40,6 @@ android:paddingTop="8dp" android:text="Row1" android:textAppearance="?android:attr/textAppearanceLarge" - android:textColor="@color/black" /> diff --git a/safeDispatch/src/main/res/layout/dialogdatepicker.xml b/safeDispatch/src/main/res/layout/dialogdatepicker.xml index 3e976bf..e743eaa 100644 --- a/safeDispatch/src/main/res/layout/dialogdatepicker.xml +++ b/safeDispatch/src/main/res/layout/dialogdatepicker.xml @@ -61,4 +61,4 @@ android:textSize="16dp" /> - + \ No newline at end of file diff --git a/safeDispatch/src/main/res/layout/login_h.xml b/safeDispatch/src/main/res/layout/login_h.xml index e5b2af1..0081efc 100644 --- a/safeDispatch/src/main/res/layout/login_h.xml +++ b/safeDispatch/src/main/res/layout/login_h.xml @@ -217,13 +217,13 @@ + android:id="@+id/imageLoading" + android:layout_width="64dp" + android:layout_height="64dp" + android:layout_gravity="center_vertical" + android:layout_weight="0" + android:visibility="gone" + android:layout_alignParentTop="true" + android:layout_alignParentLeft="true" /> \ No newline at end of file diff --git a/safeDispatch/src/main/res/layout/main_before.xml b/safeDispatch/src/main/res/layout/main_before.xml index aed4d79..f1d4db5 100644 --- a/safeDispatch/src/main/res/layout/main_before.xml +++ b/safeDispatch/src/main/res/layout/main_before.xml @@ -209,8 +209,6 @@ - - - + android:layout_toLeftOf="@+id/frameLayout13" /> - - - + android:id="@+id/imageLoading" + android:layout_width="64dp" + android:layout_height="64dp" + android:layout_gravity="center_vertical" + android:layout_weight="0" + android:visibility="gone" + android:layout_alignParentTop="true" + android:layout_alignParentLeft="true" /> \ No newline at end of file diff --git a/safeDispatch/src/main/res/layout/row_livevehicle.xml b/safeDispatch/src/main/res/layout/row_livevehicle.xml index 57d51c0..01e3748 100644 --- a/safeDispatch/src/main/res/layout/row_livevehicle.xml +++ b/safeDispatch/src/main/res/layout/row_livevehicle.xml @@ -31,10 +31,10 @@ android:paddingLeft="3dp" android:layout_weight="1"/> - + android:id="@+id/linearLayoutChecked" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_weight="0" + android:background="@drawable/checked" + android:orientation="horizontal" /> \ No newline at end of file diff --git a/safeDispatch/src/main/res/layout/spinner.xml b/safeDispatch/src/main/res/layout/spinner.xml index b1f3f07..4e36420 100644 --- a/safeDispatch/src/main/res/layout/spinner.xml +++ b/safeDispatch/src/main/res/layout/spinner.xml @@ -1,30 +1,30 @@ + - + + - - - - + android:gravity="center_vertical"/> + + \ No newline at end of file diff --git a/safeDispatch/src/main/res/layout/style_header_alarm.xml b/safeDispatch/src/main/res/layout/style_header_alarm.xml index c780ca1..d3f34dc 100644 --- a/safeDispatch/src/main/res/layout/style_header_alarm.xml +++ b/safeDispatch/src/main/res/layout/style_header_alarm.xml @@ -10,14 +10,14 @@ android:gravity="center_vertical" > + android:id="@+id/imageButtonAdd" + android:layout_width="1dp" + android:layout_height="wrap_content" + android:layout_weight="0" + android:layout_marginRight="5dp" + android:paddingLeft="2dp" + android:visibility="invisible" + android:background="@drawable/addmessage_selector"/> - - + \ No newline at end of file diff --git a/safeDispatch/src/main/res/layout/tabalarm.xml b/safeDispatch/src/main/res/layout/tabalarm.xml index d67e7a0..bc380a2 100644 --- a/safeDispatch/src/main/res/layout/tabalarm.xml +++ b/safeDispatch/src/main/res/layout/tabalarm.xml @@ -4,86 +4,85 @@ android:layout_height="fill_parent" android:orientation="vertical" style="?bg"> - + - - + + - + - + - + - - + - + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:layout_weight="1"> + \ No newline at end of file diff --git a/safeDispatch/src/main/res/layout/tabradio.xml b/safeDispatch/src/main/res/layout/tabradio.xml index 6f0fc57..5190004 100644 --- a/safeDispatch/src/main/res/layout/tabradio.xml +++ b/safeDispatch/src/main/res/layout/tabradio.xml @@ -7,356 +7,352 @@ style="?bg"> + android:id="@+id/layoutGateway" + android:layout_height="wrap_content" + android:layout_width="fill_parent" + android:weightSum="100" + android:orientation="horizontal" + style="?header"> - + - + - + - + - + - + - + - + - + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + - + - - - + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:orientation="horizontal" + android:paddingRight="10dp" + android:layout_gravity="center_vertical"> + + + - - - - - - + + + + + + - + - - - - - + + + + + + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:orientation="horizontal" + android:gravity="center" + android:layout_gravity="center_horizontal"> - - + + - - - - - + + + + + - - - + + + - + - + - + - - + + - - - - - - - -