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