Skip to content

Commit

Permalink
Bump version number and add dependencies
Browse files Browse the repository at this point in the history
Bump version number and add dependencies to the about section
  • Loading branch information
Splitter committed Mar 15, 2014
1 parent a975fcb commit 1e47891
Show file tree
Hide file tree
Showing 6 changed files with 99 additions and 6 deletions.
2 changes: 1 addition & 1 deletion AndroidManifest.xml
Expand Up @@ -2,7 +2,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.andrew.apolloMod"
android:versionCode="1"
android:versionName="1.4" >
android:versionName="1.5" >

<uses-sdk
android:minSdkVersion="14"
Expand Down
67 changes: 67 additions & 0 deletions assets/licenses.html
@@ -0,0 +1,67 @@
<html><head><style> body { font-family: sans-serif;} pre { background-color: #eeeeee; padding: 1em; white-space: pre-wrap; } a:link,a:visited,a:hover{color:#0099cc;}</style></head><body>
<h3>Notices for library:</h3>
<ul>
<li><a href="https://github.com/umano/AndroidSlidingUpPanel">AndroidSlidingUpPanel</a></li>
</ul>
<pre>
/*
* Copyright (C) 2013 Umano
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
</pre>


<h3>Notices for library:</h3><ul>
<li><a href="https://github.com/bauerca/drag-sort-listview">DragSortListView</a></li>
</ul>
<pre>
/*
* Copyright (C) 2012 Carl Bauer
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
</pre>
</body></html>

<h3>Notices for file:</h3><ul>
<li>android-support-v4.jar</li>
</ul>
<pre>
/*
* Copyright (C) 2012 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
</pre>
</body></html>
3 changes: 3 additions & 0 deletions res/values/strings.xml
Expand Up @@ -137,12 +137,15 @@ Original Apollo Source Code: \n
https://github.com/CyanogenMod/android_packages_apps_Apollo/tree/cm-10.1
]]></string>
<string name="dependencies">Dependency Licenses</string>
<string name="dependencies_title">Dependency Licenses:</string>

<!-- Settings keys -->
<string name="key_themes" translatable="false">themepreview</string>
<string name="key_themes_package" translatable="false">themePackageName</string>
<string name="key_themes_preferences" translatable="false">themePrefences</string>
<string name="key_build_version" translatable="false">build_version</string>
<string name="key_build_depends" translatable="false">build_depends</string>
<string name="key_tabs_enabled" translatable="false">tabs_enabled</string>
<string name="key_visualization_type" translatable="false">visualization_type</string>
<string name="key_widget_style" translatable="false">widget_type</string>
Expand Down
3 changes: 3 additions & 0 deletions res/xml/settings.xml
Expand Up @@ -47,6 +47,9 @@
android:key="@string/key_build_version"
android:summary="@string/app_version_number"
android:title="@string/version" />
<Preference
android:key="@string/key_build_depends"
android:title="@string/dependencies" />
</PreferenceCategory>

</PreferenceScreen>
2 changes: 1 addition & 1 deletion src/com/andrew/apolloMod/Constants.java
Expand Up @@ -15,7 +15,7 @@ public final class Constants {
// SharedPreferences
public final static String APOLLO = "Apollo", APOLLO_PREFERENCES = "apollopreferences",
ARTIST_KEY = "artist", ALBUM_KEY = "album", ALBUM_ID_KEY = "albumid", NUMALBUMS = "num_albums",
GENRE_KEY = "genres", ARTIST_ID = "artistid", NUMWEEKS = "numweeks",
GENRE_KEY = "genres", ARTIST_ID = "artistid", NUMWEEKS = "numweeks",BUILD_DEPENDS = "build_depends",
PLAYLIST_NAME_FAVORITES = "Favorites", PLAYLIST_NAME = "playlist", WIDGET_STYLE="widget_type",
VISUALIZATION_TYPE="visualization_type", DELETE_CACHE="delete_cache", BUILD_VERSION = "build_version",
UP_STARTS_ALBUM_ACTIVITY = "upStartsAlbumActivity", TABS_ENABLED = "tabs_enabled";
Expand Down
28 changes: 24 additions & 4 deletions src/com/andrew/apolloMod/preferences/SettingsHolder.java
Expand Up @@ -23,6 +23,7 @@
import android.text.method.LinkMovementMethod;
import android.text.util.Linkify;
import android.view.MenuItem;
import android.webkit.WebView;
import android.widget.TextView;

import com.andrew.apolloMod.IApolloService;
Expand All @@ -35,10 +36,8 @@
import static com.andrew.apolloMod.Constants.WIDGET_STYLE;
import static com.andrew.apolloMod.Constants.DELETE_CACHE;
import static com.andrew.apolloMod.Constants.BUILD_VERSION;
/**
* @author Andrew Neal FIXME - Work on the IllegalStateException thrown when
* using PreferenceFragment and theme chooser
*/
import static com.andrew.apolloMod.Constants.BUILD_DEPENDS;

@SuppressWarnings("deprecation")
public class SettingsHolder extends PreferenceActivity implements ServiceConnection {
Context mContext;
Expand All @@ -63,6 +62,8 @@ protected void onCreate(Bundle savedInstanceState) {
// Init about dialog
initAboutDialog();

initDependencies();

}

@Override
Expand Down Expand Up @@ -128,6 +129,25 @@ public boolean onPreferenceClick(final Preference preference) {
});

}

private void initDependencies(){
final Preference buildDepend = findPreference(BUILD_DEPENDS);
buildDepend.setOnPreferenceClickListener(new OnPreferenceClickListener() {
@Override
public boolean onPreferenceClick(final Preference preference) {

final WebView webView = new WebView(mContext);
webView.loadUrl("file:///android_asset/licenses.html");
new AlertDialog.Builder(mContext)
.setTitle(R.string.dependencies_title)
.setView(webView)
.setPositiveButton(android.R.string.ok, null)
.create()
.show();
return true;
}
});
}
/**
* Removes all of the cache entries.
*/
Expand Down

0 comments on commit 1e47891

Please sign in to comment.