Permalink
Browse files

Switched from actionbarsherlock to appcompat-v7

  • Loading branch information...
schnatterer committed Jun 14, 2015
1 parent 3da6184 commit 457a50bfcd63d084dac0faf3f35efe3f8077fb7e
@@ -46,3 +46,4 @@ local.properties
/Nusic/assets/CHANGELOG.html
/Nusic/assets/NOTICE.html
/target
project.properties
@@ -61,6 +61,13 @@
<version>${android.sdk.version}</version>
<scope>provided</scope>
</dependency>
<!-- "Re-include" the transitive dependency of nusic-ui-android that was excluded for eclipse build -->
<dependency>
<artifactId>support-v4</artifactId>
<groupId>com.android.support</groupId>
<version>${android.compatibility.version}</version>
<type>aar</type>
</dependency>
</dependencies>
</profile>
</profiles>
@@ -78,6 +85,14 @@
<artifactId>nusic-ui-android</artifactId>
<version>${project.parent.version}</version>
<type>aar</type>
<exclusions>
<exclusion>
<!-- Exclude this in eclipse build in order to avoid nable to execute
dex: Multiple dex files define Landroid/support/annotation/AnimRes; -->
<artifactId>support-v4</artifactId>
<groupId>com.android.support</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
@@ -97,11 +97,10 @@
-keep class com.google.common.** { *; }
# ActionBarSherlock
-keep class android.support.** { *; }
-keep interface android.support.** { *; }
-keep class com.actionbarsherlock.** { *; }
-keep interface com.actionbarsherlock.** { *; }
# appcompat-v7
-dontwarn android.support.v7.**
-keep class android.support.v7.** { *; }
-keep interface android.support.v7.** { *; }
# musicbrainzws2-java
-keep class org.apache.** { *; }
@@ -147,7 +146,6 @@
-keep class javax.annotation.** { *; }
# -keep class org.aopalliance.** { *; }
-dontwarn com.actionbarsherlock.internal.**
-dontwarn com.google.common.**
-dontwarn org.jdom.xpath.**
-dontwarn org.slf4j.**

This file was deleted.

Oops, something went wrong.
@@ -67,6 +67,13 @@
<version>${android.sdk.version}</version>
<scope>provided</scope>
</dependency>
<!-- Enable annotation corebase to improve performance. -->
<dependency>
<groupId>org.roboguice</groupId>
<artifactId>roboblender</artifactId>
<version>${roboguice.version}</version>
<scope>provided</scope>
</dependency>
</dependencies>
</profile>
</profiles>
@@ -92,13 +99,6 @@
<artifactId>roboguice</artifactId>
<version>${roboguice.version}</version>
</dependency>
<!-- Enable annotation corebase to improve performance. -->
<dependency>
<groupId>org.roboguice</groupId>
<artifactId>roboblender</artifactId>
<version>${roboguice.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
@@ -60,6 +60,13 @@
<version>${android.sdk.version}</version>
<scope>provided</scope>
</dependency>
<!-- Enable annotation database to improve performance. -->
<dependency>
<groupId>org.roboguice</groupId>
<artifactId>roboblender</artifactId>
<version>${roboguice.version}</version>
<scope>provided</scope>
</dependency>
<!-- This dependency makes it impossible to deploy with eclipse... Because
of its many transitive dependencies this will exceed the 65K limit: http://developer.android.com/tools/building/multidex.html
So include the robolectric-x.x.x-jar-with-dependencies to eclipse! http://robolectric.org/eclipse-quick-start/. -->
@@ -91,13 +98,6 @@
<artifactId>roboguice</artifactId>
<version>${roboguice.version}</version>
</dependency>
<!-- Enable annotation database to improve performance. -->
<dependency>
<groupId>org.roboguice</groupId>
<artifactId>roboblender</artifactId>
<version>${roboguice.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
@@ -1,26 +1,3 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (C) 2013 Johannes Schnatterer
See the NOTICE file distributed with this work for additional
information regarding copyright ownership.
This file is part of nusic-ui-android.
nusic-ui-android is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
nusic-ui-android is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with nusic-ui-android. If not, see <http://www.gnu.org/licenses/>.
-->
<lint>
</lint>
@@ -38,7 +38,6 @@
<name>nusic-ui-android</name>
<properties>
<abs.version>4.4.0</abs.version>
<assets.dir.input>${project.basedir}/assets</assets.dir.input>
<assets.dir.output>${project.build.directory}/filtered-assets</assets.dir.output>
<res.dir.input>${project.basedir}/res</res.dir.input>
@@ -66,6 +65,13 @@
<version>${android.sdk.version}</version>
<scope>provided</scope>
</dependency>
<!-- Enable annotation database to improve performance. -->
<dependency>
<groupId>org.roboguice</groupId>
<artifactId>roboblender</artifactId>
<version>${roboguice.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<!-- This dependency makes it impossible to deploy with eclipse... On
the other hand we can't run unit test without it from eclipse. -->
@@ -88,35 +94,16 @@
<dependencies>
<!-- Android dependecies -->
<dependency>
<groupId>android.support</groupId>
<artifactId>compatibility-v4</artifactId>
<version>${android.compatibility-v4.version}</version>
</dependency>
<dependency>
<groupId>com.actionbarsherlock</groupId>
<artifactId>actionbarsherlock</artifactId>
<version>${abs.version}</version>
<groupId>com.android.support</groupId>
<artifactId>appcompat-v7</artifactId>
<version>${android.compatibility.version}</version>
<type>aar</type>
<exclusions>
<exclusion>
<groupId>com.google.android</groupId>
<artifactId>support-v4</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.roboguice</groupId>
<artifactId>roboguice</artifactId>
<version>${roboguice.version}</version>
</dependency>
<!-- Enable annotation database to improve performance. -->
<dependency>
<groupId>org.roboguice</groupId>
<artifactId>roboblender</artifactId>
<version>${roboguice.version}</version>
<scope>provided</scope>
</dependency>
<!-- Nusic dependencies -->
<dependency>
<groupId>com.nostra13.universalimageloader</groupId>
@@ -270,6 +257,9 @@
<version>${android-maven-plugin.version}</version>
<extensions>true</extensions>
<configuration>
<sdk>
<platform>${android.api.level}</platform>
</sdk>
<sign>
<debug>false</debug>
</sign>

This file was deleted.

Oops, something went wrong.
@@ -1,43 +1,43 @@
<!--
Copyright (C) 2013 Johannes Schnatterer
See the NOTICE file distributed with this work for additional
information regarding copyright ownership.
This file is part of nusic-ui-android.
nusic-ui-android is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
nusic-ui-android is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with nusic-ui-android. If not, see <http://www.gnu.org/licenses/>.
-->
<resources>
<!--
Base application theme, dependent on API level. This theme is replaced
by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
-->
<style name="AppBaseTheme" parent="@style/Theme.Sherlock">
<!--
Theme customizations available in newer API levels can go in
res/values-vXX/styles.xml, while customizations related to
backward-compatibility can go here.
-->
</style>
<!-- Application theme. -->
<style name="AppTheme" parent="AppBaseTheme">
<!-- All customizations that are NOT specific to a particular API-level can go here. -->
</style>
</resources>
<!--
Copyright (C) 2013 Johannes Schnatterer
See the NOTICE file distributed with this work for additional
information regarding copyright ownership.
This file is part of nusic-ui-android.
nusic-ui-android is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
nusic-ui-android is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with nusic-ui-android. If not, see <http://www.gnu.org/licenses/>.
-->
<resources>
<!--
Base application theme, dependent on API level. This theme is replaced
by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
-->
<style name="AppBaseTheme" parent="@style/Theme.AppCompat">
<!--
Theme customizations available in newer API levels can go in
res/values-vXX/styles.xml, while customizations related to
backward-compatibility can go here.
-->
</style>
<!-- Application theme. -->
<style name="AppTheme" parent="AppBaseTheme">
<!-- All customizations that are NOT specific to a particular API-level can go here. -->
</style>
</resources>
@@ -33,7 +33,7 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import roboguice.activity.RoboSherlockFragmentActivity;
import roboguice.activity.RoboActionBarActivity;
import android.annotation.SuppressLint;
import android.app.AlertDialog;
import android.content.DialogInterface;
@@ -48,17 +48,16 @@
import android.support.v4.app.FragmentTransaction;
import android.support.v4.content.Loader;
import android.support.v4.view.ViewPager;
import android.support.v7.app.ActionBar;
import android.support.v7.app.ActionBar.Tab;
import android.text.method.LinkMovementMethod;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import com.actionbarsherlock.app.ActionBar;
import com.actionbarsherlock.app.ActionBar.Tab;
import com.actionbarsherlock.view.Menu;
import com.actionbarsherlock.view.MenuInflater;
import com.actionbarsherlock.view.MenuItem;
/**
* The activity that is started when the app starts.
*
@@ -68,7 +67,7 @@
* @author schnatterer
*
*/
public class MainActivity extends RoboSherlockFragmentActivity {
public class MainActivity extends RoboActionBarActivity {
private static final Logger LOG = LoggerFactory
.getLogger(MainActivity.class);
@@ -236,7 +235,7 @@ private void registerListeners() {
@Override
public boolean onCreateOptionsMenu(Menu menu) {
MenuInflater inflater = getSupportMenuInflater();
MenuInflater inflater = getMenuInflater();
inflater.inflate(R.menu.main, menu);
return true;
}
Oops, something went wrong.

0 comments on commit 457a50b

Please sign in to comment.