forked from upstream-mirrors/quik
Merge pull request #352 from redwerk/about_tab_update
updated 'about tab' screen #341
This commit is contained in:
@@ -149,6 +149,9 @@ public class SettingsFragment extends PreferenceFragment implements Preference.O
|
|||||||
public static final String VERSION = "pref_key_version";
|
public static final String VERSION = "pref_key_version";
|
||||||
public static final String CHANGELOG = "pref_key_changelog";
|
public static final String CHANGELOG = "pref_key_changelog";
|
||||||
public static final String THANKS = "pref_key_thanks";
|
public static final String THANKS = "pref_key_thanks";
|
||||||
|
public static final String GOOGLE_PLUS = "pref_key_google_plus";
|
||||||
|
public static final String GITHUB = "pref_key_github";
|
||||||
|
public static final String CROWDIN = "pref_key_crowdin";
|
||||||
|
|
||||||
public static final String WELCOME_SEEN = "pref_key_welcome_seen";
|
public static final String WELCOME_SEEN = "pref_key_welcome_seen";
|
||||||
|
|
||||||
@@ -156,6 +159,10 @@ public class SettingsFragment extends PreferenceFragment implements Preference.O
|
|||||||
|
|
||||||
public static final String CATEGORY_TAG = "settings_category_fragment_tag";
|
public static final String CATEGORY_TAG = "settings_category_fragment_tag";
|
||||||
|
|
||||||
|
public static final String GOOGLE_PLUS_URL = "https://plus.google.com/communities/104505769539048913485";
|
||||||
|
public static final String GITHUB_URL = "https://github.com/qklabs/qksms";
|
||||||
|
public static final String CROWDIN_URL = "https://crowdin.com/project/qksms";
|
||||||
|
|
||||||
private MainActivity mContext;
|
private MainActivity mContext;
|
||||||
private PreferenceManager mPreferenceManager;
|
private PreferenceManager mPreferenceManager;
|
||||||
private SharedPreferences mPrefs;
|
private SharedPreferences mPrefs;
|
||||||
@@ -596,8 +603,7 @@ public class SettingsFragment extends PreferenceFragment implements Preference.O
|
|||||||
@Override
|
@Override
|
||||||
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
|
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
|
||||||
String baseUrl = ((QKTextView) view.findViewById(R.id.list_item_subtitle)).getText().toString();
|
String baseUrl = ((QKTextView) view.findViewById(R.id.list_item_subtitle)).getText().toString();
|
||||||
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("https://" + baseUrl));
|
startBrowserIntent("https://" + baseUrl);
|
||||||
startActivity(browserIntent);
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.show();
|
.show();
|
||||||
@@ -605,11 +611,25 @@ public class SettingsFragment extends PreferenceFragment implements Preference.O
|
|||||||
case DONATE:
|
case DONATE:
|
||||||
DonationManager.getInstance(mContext).showDonateDialog();
|
DonationManager.getInstance(mContext).showDonateDialog();
|
||||||
break;
|
break;
|
||||||
|
case GOOGLE_PLUS:
|
||||||
|
startBrowserIntent(GOOGLE_PLUS_URL);
|
||||||
|
break;
|
||||||
|
case GITHUB:
|
||||||
|
startBrowserIntent(GITHUB_URL);
|
||||||
|
break;
|
||||||
|
case CROWDIN:
|
||||||
|
startBrowserIntent(CROWDIN_URL);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void startBrowserIntent(final String baseUrl) {
|
||||||
|
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(baseUrl));
|
||||||
|
startActivity(browserIntent);
|
||||||
|
}
|
||||||
|
|
||||||
public boolean isCategoryList() {
|
public boolean isCategoryList() {
|
||||||
return mResource == R.xml.settings_main;
|
return mResource == R.xml.settings_main;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -259,6 +259,12 @@
|
|||||||
<string name="pref_about_thanks_summary">Tap to view open-source contributors</string>
|
<string name="pref_about_thanks_summary">Tap to view open-source contributors</string>
|
||||||
<string name="pref_donate_title">Donate</string>
|
<string name="pref_donate_title">Donate</string>
|
||||||
<string name="pref_donate_summary">QKSMS is free. Help support us by donating!</string>
|
<string name="pref_donate_summary">QKSMS is free. Help support us by donating!</string>
|
||||||
|
<string name="pref_about_gplus_title">Google+</string>
|
||||||
|
<string name="pref_about_gplus_summary">Join the QKSMS Beta Testing community on Google+</string>
|
||||||
|
<string name="pref_about_github_title">GitHub</string>
|
||||||
|
<string name="pref_about_github_summary">QKSMS is open source. Contribute and report issues on GitHub</string>
|
||||||
|
<string name="pref_about_crowdin_title">Crowdin</string>
|
||||||
|
<string name="pref_about_crowdin_summary">Join the QKSMS translation project on Crowdin</string>
|
||||||
|
|
||||||
<!--Preference subcategory-->
|
<!--Preference subcategory-->
|
||||||
<string name="pref_subcat_theme">Theme</string>
|
<string name="pref_subcat_theme">Theme</string>
|
||||||
|
|||||||
@@ -22,6 +22,21 @@
|
|||||||
android:layout="@layout/list_item_preference"
|
android:layout="@layout/list_item_preference"
|
||||||
android:summary="@string/pref_about_thanks_summary"
|
android:summary="@string/pref_about_thanks_summary"
|
||||||
android:title="@string/pref_about_thanks_title" />
|
android:title="@string/pref_about_thanks_title" />
|
||||||
|
<Preference
|
||||||
|
android:key="pref_key_google_plus"
|
||||||
|
android:layout="@layout/list_item_preference"
|
||||||
|
android:title="@string/pref_about_gplus_title"
|
||||||
|
android:summary="@string/pref_about_gplus_summary" />
|
||||||
|
<Preference
|
||||||
|
android:key="pref_key_github"
|
||||||
|
android:layout="@layout/list_item_preference"
|
||||||
|
android:title="@string/pref_about_github_title"
|
||||||
|
android:summary="@string/pref_about_github_summary" />
|
||||||
|
<Preference
|
||||||
|
android:key="pref_key_crowdin"
|
||||||
|
android:layout="@layout/list_item_preference"
|
||||||
|
android:title="@string/pref_about_crowdin_title"
|
||||||
|
android:summary="@string/pref_about_crowdin_summary" />
|
||||||
<Preference
|
<Preference
|
||||||
android:icon="@drawable/ic_donate"
|
android:icon="@drawable/ic_donate"
|
||||||
android:key="pref_key_donate"
|
android:key="pref_key_donate"
|
||||||
|
|||||||
Reference in New Issue
Block a user