Skip to content

Commit

Permalink
Merge pull request #432 from yate/prepare-release
Browse files Browse the repository at this point in the history
increment version
  • Loading branch information
johnarleyburns committed Nov 5, 2014
2 parents f34ec2a + 45138b3 commit a0f1296
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 12 deletions.
4 changes: 2 additions & 2 deletions app/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.chanapps.four.activity"
android:versionCode="78"
android:versionName="@string/versionName">
android:versionCode="80"
android:versionName="2.0.4">

<uses-sdk
android:minSdkVersion="15"
Expand Down
7 changes: 0 additions & 7 deletions app/res/values/version.xml

This file was deleted.

12 changes: 9 additions & 3 deletions app/src/com/chanapps/four/fragment/AboutFragment.java
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
package com.chanapps.four.fragment;

import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageInfo;
import android.os.Bundle;
import android.preference.Preference;
import android.preference.PreferenceFragment;
import android.util.Log;

import com.android.gallery3d.app.PackagesMonitor;
import com.chanapps.four.activity.R;
import com.chanapps.four.component.ActivityDispatcher;
import com.chanapps.four.component.URLFormatComponent;
Expand Down Expand Up @@ -49,9 +53,11 @@ protected void versionPreference(final String pref) {
if (DEBUG) Log.i(TAG, "versionPreference");
Preference p = findPreference(pref);
try {
String version = getString(R.string.versionName);
String yyyymmdd = getString(R.string.versionDate);
Date d = DateUtils.parseDate(yyyymmdd, VERSION_DATE_FORMAT);
PackageInfo info = getActivity().getPackageManager().getPackageInfo(getActivity().getPackageName(), 0);

String version = info.versionName;
Date d = new Date(info.lastUpdateTime);

String dateStr = DateFormat.getDateInstance(DateFormat.MEDIUM).format(d);
String title = String.format(getString(R.string.pref_about_application_version), version);
String summary = String.format(getString(R.string.pref_about_application_version_sum), dateStr);
Expand Down

0 comments on commit a0f1296

Please sign in to comment.