Browse Source

Bug fix

hbw_build
Wong Joon Hui 3 years ago
parent
commit
da9aac0749
  1. 0
      app/src/main/assets/CST_1640011627_KIOSK002.env
  2. BIN
      app/src/main/ic_udc_launcher-playstore.png
  3. 4
      app/src/main/java/com/cst/im30/MainApplication.java
  4. 12
      app/src/main/java/com/cst/im30/activity/MainActivity.java
  5. 18
      app/src/main/res/layout/activity_main.xml

0
app/src/main/assets/CST_1640011627_KIOSK002_hwb_build_deploy.env → app/src/main/assets/CST_1640011627_KIOSK002.env

BIN
app/src/main/ic_udc_launcher-playstore.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 53 KiB

4
app/src/main/java/com/cst/im30/MainApplication.java

@ -110,7 +110,9 @@ public class MainApplication extends Application {
super.onCreate(); super.onCreate();
instance = this; instance = this;
new SetupUtils().readEnvFile(); if (new SetupUtils().readEnvFile()) {
setupReady = true;
}
if (!setupReady) { if (!setupReady) {
return; return;

12
app/src/main/java/com/cst/im30/activity/MainActivity.java

@ -224,6 +224,11 @@ public class MainActivity extends AppCompatActivity implements CallableInterface
protected void onResume() { protected void onResume() {
super.onResume(); super.onResume();
if (!MainApplication.setupReady) {
setupNotReady();
return;
}
if (!MainApplication.icIsConnected) { if (!MainApplication.icIsConnected) {
initEchoClientIC(); initEchoClientIC();
connectEchoClientIC(); connectEchoClientIC();
@ -239,6 +244,13 @@ public class MainActivity extends AppCompatActivity implements CallableInterface
MainApplication.currentActivity = this; MainApplication.currentActivity = this;
} }
private void setupNotReady() {
//echoStatusLayout.setVisibility(View.GONE);
TextView setupText = findViewById(R.id.setupText);
setupText.setVisibility(View.VISIBLE);
}
private void setupTextSlider() { private void setupTextSlider() {
TextSliderView textSliderView = new TextSliderView(this); TextSliderView textSliderView = new TextSliderView(this);

18
app/src/main/res/layout/activity_main.xml

@ -11,7 +11,8 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentTop="true" android:layout_alignParentTop="true"
android:orientation="horizontal" android:orientation="horizontal"
android:weightSum="2"> android:weightSum="2"
android:baselineAligned="false">
<FrameLayout <FrameLayout
android:layout_width="0dp" android:layout_width="0dp"
@ -97,6 +98,21 @@
android:textStyle="bold" android:textStyle="bold"
tools:ignore="HardcodedText" /> tools:ignore="HardcodedText" />
<TextView
android:id="@+id/setupText"
android:visibility="gone"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/testText"
android:layout_centerHorizontal="true"
android:layout_marginStart="40dp"
android:text="Configuration File Not Found"
android:textAlignment="center"
android:textSize="40sp"
android:textColor="@color/red"
android:textStyle="bold"
tools:ignore="HardcodedText" />
<ImageView <ImageView
android:id="@+id/loading_image_mt" android:id="@+id/loading_image_mt"
android:layout_width="wrap_content" android:layout_width="wrap_content"

Loading…
Cancel
Save