Browse Source

Added Version Number to UI

hbw_build
Wong Joon Hui 3 years ago
parent
commit
2fa22a8106
  1. 4
      app/build.gradle
  2. 4
      app/src/main/java/com/cst/im30/activity/MainActivity.java
  3. 8
      app/src/main/res/layout/activity_main.xml

4
app/build.gradle

@ -10,8 +10,8 @@ android {
minSdkVersion 25
//noinspection ExpiredTargetSdkVersion
targetSdkVersion 28
versionCode 4
versionName "1.0.3"
versionCode 5
versionName "1.0.4"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

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

@ -30,6 +30,7 @@ import androidx.activity.result.contract.ActivityResultContracts;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.content.ContextCompat;
import com.cst.im30.BuildConfig;
import com.cst.im30.EchoClient;
import com.cst.im30.MainApplication;
import com.cst.im30.PaymentHandler;
@ -80,6 +81,9 @@ public class MainActivity extends AppCompatActivity implements CallableInterface
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
TextView versionText = findViewById(R.id.versionText);
versionText.setText(BuildConfig.VERSION_NAME);
checkPermissions();
sliderLayout = findViewById(R.id.slider_layout_ma);

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

@ -108,7 +108,6 @@
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"
@ -150,4 +149,11 @@
android:visibility="gone"
tools:ignore="HardcodedText" />
<TextView
android:id="@+id/versionText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentEnd="true" />
</RelativeLayout>
Loading…
Cancel
Save