mirror of
https://github.com/moparisthebest/android-app
synced 2024-12-23 15:08:49 -05:00
Setting build & version number
This commit is contained in:
parent
b6b7675eb5
commit
a71a0a7bd8
@ -19,8 +19,8 @@ android {
|
||||
defaultConfig {
|
||||
minSdkVersion 8
|
||||
targetSdkVersion 20
|
||||
versionCode 1
|
||||
versionName "1.0"
|
||||
versionCode 9
|
||||
versionName "1.6"
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
|
@ -102,7 +102,6 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginTop="10dp"
|
||||
android:text="@string/version"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<TextView
|
||||
|
@ -23,5 +23,4 @@
|
||||
<string name="txtGlobalToken"><b><u>API global token :</u></b></string>
|
||||
<string name="txtAPIUsername"><b><u>Your User ID:</u></b></string>
|
||||
<string name="txtAPIToken"><b><u>Your Token:</u></b></string>
|
||||
<string name="version">1.5.3.2</string>
|
||||
</resources>
|
||||
|
@ -9,6 +9,7 @@ import android.view.View;
|
||||
import android.view.View.OnClickListener;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import android.widget.TextView;
|
||||
|
||||
public class Settings extends Activity {
|
||||
Button btnDone;
|
||||
@ -16,6 +17,7 @@ public class Settings extends Activity {
|
||||
EditText editAPIUsername;
|
||||
EditText editAPIToken;
|
||||
EditText editGlobalToken;
|
||||
TextView textViewVersion;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
@ -43,5 +45,11 @@ public class Settings extends Activity {
|
||||
finish();
|
||||
}
|
||||
});
|
||||
try {
|
||||
textViewVersion = (TextView) findViewById(R.id.version);
|
||||
textViewVersion.setText(getApplicationContext().getPackageManager().getPackageInfo(getApplicationContext().getPackageName(), 0).versionName);
|
||||
} catch (Exception e) {
|
||||
//
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user