Removed ActionbarSherlock dependency
This commit is contained in:
parent
e14525a14f
commit
05ad8fbfa3
|
@ -12,9 +12,12 @@
|
|||
bin/
|
||||
gen/
|
||||
target/
|
||||
build/
|
||||
|
||||
# Local configuration file (sdk path, etc)
|
||||
local.properties
|
||||
gradle.properties
|
||||
.gradle
|
||||
build.xml
|
||||
|
||||
# Backup files
|
||||
|
|
472
pom.xml
472
pom.xml
|
@ -1,245 +1,255 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>de.danoeh</groupId>
|
||||
<artifactId>antennapod</artifactId>
|
||||
<packaging>apk</packaging>
|
||||
<version>0.9.7.4</version>
|
||||
<name>AntennaPod</name>
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>de.danoeh</groupId>
|
||||
<artifactId>antennapod</artifactId>
|
||||
<packaging>apk</packaging>
|
||||
<version>0.9.7.4</version>
|
||||
<name>AntennaPod</name>
|
||||
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>android.support</groupId>
|
||||
<artifactId>compatibility-v4</artifactId>
|
||||
<version>18</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>android.support</groupId>
|
||||
<artifactId>compatibility-v7-appcompat</artifactId>
|
||||
<version>18</version>
|
||||
<type>apklib</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>android.support</groupId>
|
||||
<artifactId>compatibility-v7-appcompat</artifactId>
|
||||
<version>18</version>
|
||||
<type>jar</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-lang3</artifactId>
|
||||
<version>3.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.shredzone.flattr4j</groupId>
|
||||
<artifactId>flattr4j-core</artifactId>
|
||||
<version>2.7</version>
|
||||
<scope>compile</scope>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.apache.httpcomponents</groupId>
|
||||
<artifactId>httpcore</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>org.apache.httpcomponents</groupId>
|
||||
<artifactId>httpclient</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>org.json</groupId>
|
||||
<artifactId>json</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.android</groupId>
|
||||
<artifactId>android</artifactId>
|
||||
<scope>provided</scope>
|
||||
<version>4.1.1.4</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.android</groupId>
|
||||
<artifactId>annotations</artifactId>
|
||||
<version>4.1.1.4</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-io</groupId>
|
||||
<artifactId>commons-io</artifactId>
|
||||
<version>2.4</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.mobeta.android.dslv</groupId>
|
||||
<artifactId>drag-sort-listview</artifactId>
|
||||
<version>0.6.1-SNAPSHOT</version>
|
||||
<type>apklib</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.nineoldandroids</groupId>
|
||||
<artifactId>library</artifactId>
|
||||
<version>2.4.0</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-lang3</artifactId>
|
||||
<version>3.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.shredzone.flattr4j</groupId>
|
||||
<artifactId>flattr4j-core</artifactId>
|
||||
<version>2.4</version>
|
||||
<scope>compile</scope>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.apache.httpcomponents</groupId>
|
||||
<artifactId>httpcore</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>org.apache.httpcomponents</groupId>
|
||||
<artifactId>httpclient</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>org.json</groupId>
|
||||
<artifactId>json</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.android</groupId>
|
||||
<artifactId>android</artifactId>
|
||||
<scope>provided</scope>
|
||||
<version>4.1.1.4</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.actionbarsherlock</groupId>
|
||||
<artifactId>library</artifactId>
|
||||
<version>4.1.0</version>
|
||||
<type>apklib</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.android</groupId>
|
||||
<artifactId>annotations</artifactId>
|
||||
<version>4.1.1.4</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-io</groupId>
|
||||
<artifactId>commons-io</artifactId>
|
||||
<version>2.4</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.mobeta.android.dslv</groupId>
|
||||
<artifactId>drag-sort-listview</artifactId>
|
||||
<version>0.6.1-SNAPSHOT</version>
|
||||
<type>apklib</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.nineoldandroids</groupId>
|
||||
<artifactId>library</artifactId>
|
||||
<version>2.4.0</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<sourceDirectory>src</sourceDirectory>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>2.3.2</version>
|
||||
<configuration>
|
||||
<source>1.6</source>
|
||||
<target>1.6</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>com.jayway.maven.plugins.android.generation2</groupId>
|
||||
<artifactId>android-maven-plugin</artifactId>
|
||||
<version>3.6.1</version>
|
||||
<configuration>
|
||||
<sdk>
|
||||
<path>${env.ANDROID_HOME}</path>
|
||||
<platform>17</platform>
|
||||
</sdk>
|
||||
<manifest>
|
||||
<debuggable>true</debuggable>
|
||||
</manifest>
|
||||
</configuration>
|
||||
<extensions>true</extensions>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>alignApk</id>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>zipalign</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<build>
|
||||
<sourceDirectory>src</sourceDirectory>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>2.3.2</version>
|
||||
<configuration>
|
||||
<source>1.6</source>
|
||||
<target>1.6</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>com.jayway.maven.plugins.android.generation2</groupId>
|
||||
<artifactId>android-maven-plugin</artifactId>
|
||||
<version>3.6.1</version>
|
||||
<configuration>
|
||||
<sdk>
|
||||
<path>${env.ANDROID_HOME}</path>
|
||||
<platform>17</platform>
|
||||
</sdk>
|
||||
<manifest>
|
||||
<debuggable>true</debuggable>
|
||||
</manifest>
|
||||
</configuration>
|
||||
<extensions>true</extensions>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>alignApk</id>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>zipalign</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>development</id>
|
||||
<!-- using this since activeByDefault does not work well with multiple
|
||||
profiles -->
|
||||
<activation>
|
||||
<property>
|
||||
<name>environment</name>
|
||||
<value>!production</value>
|
||||
</property>
|
||||
</activation>
|
||||
<properties>
|
||||
<deployment.stage>In Development</deployment.stage>
|
||||
</properties>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>production</id>
|
||||
<properties>
|
||||
<deployment.stage>In Production</deployment.stage>
|
||||
</properties>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>release</id>
|
||||
<!-- via this activation the profile is automatically used when the release
|
||||
is done with the maven release plugin -->
|
||||
<activation>
|
||||
<property>
|
||||
<name>performRelease</name>
|
||||
<value>true</value>
|
||||
</property>
|
||||
</activation>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-jarsigner-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>signing</id>
|
||||
<goals>
|
||||
<goal>sign</goal>
|
||||
<goal>verify</goal>
|
||||
</goals>
|
||||
<phase>package</phase>
|
||||
<inherited>true</inherited>
|
||||
<configuration>
|
||||
<removeExistingSignatures>true</removeExistingSignatures>
|
||||
<archiveDirectory />
|
||||
<includes>
|
||||
<include>${project.build.directory}/${project.artifactId}-${project.version}.apk</include>
|
||||
</includes>
|
||||
<keystore>${sign.keystore}</keystore>
|
||||
<alias>${sign.alias}</alias>
|
||||
<storepass>${sign.storepass}</storepass>
|
||||
<keypass>${sign.keypass}</keypass>
|
||||
<verbose>true</verbose>
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>development</id>
|
||||
<!-- using this since activeByDefault does not work well with multiple
|
||||
profiles -->
|
||||
<activation>
|
||||
<property>
|
||||
<name>environment</name>
|
||||
<value>!production</value>
|
||||
</property>
|
||||
</activation>
|
||||
<properties>
|
||||
<deployment.stage>In Development</deployment.stage>
|
||||
</properties>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>production</id>
|
||||
<properties>
|
||||
<deployment.stage>In Production</deployment.stage>
|
||||
</properties>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>release</id>
|
||||
<!-- via this activation the profile is automatically used when the release
|
||||
is done with the maven release plugin -->
|
||||
<activation>
|
||||
<property>
|
||||
<name>performRelease</name>
|
||||
<value>true</value>
|
||||
</property>
|
||||
</activation>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-jarsigner-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>signing</id>
|
||||
<goals>
|
||||
<goal>sign</goal>
|
||||
<goal>verify</goal>
|
||||
</goals>
|
||||
<phase>package</phase>
|
||||
<inherited>true</inherited>
|
||||
<configuration>
|
||||
<removeExistingSignatures>true</removeExistingSignatures>
|
||||
<archiveDirectory />
|
||||
<includes>
|
||||
<include>${project.build.directory}/${project.artifactId}-${project.version}.apk</include>
|
||||
</includes>
|
||||
<keystore>${sign.keystore}</keystore>
|
||||
<alias>${sign.alias}</alias>
|
||||
<storepass>${sign.storepass}</storepass>
|
||||
<keypass>${sign.keypass}</keypass>
|
||||
<verbose>true</verbose>
|
||||
<arguments>
|
||||
<argument>-sigalg</argument><argument>MD5withRSA</argument>
|
||||
<argument>-digestalg</argument><argument>SHA1</argument>
|
||||
</arguments>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<!-- the signed apk then needs to be zipaligned and we activate proguard
|
||||
and we run the manifest update -->
|
||||
<plugin>
|
||||
<groupId>com.jayway.maven.plugins.android.generation2</groupId>
|
||||
<artifactId>android-maven-plugin</artifactId>
|
||||
<inherited>true</inherited>
|
||||
<configuration>
|
||||
<sign>
|
||||
<debug>false</debug>
|
||||
</sign>
|
||||
<zipalign>
|
||||
<skip>false</skip>
|
||||
<verbose>true</verbose>
|
||||
<inputApk>${project.build.directory}/${project.artifactId}-${project.version}.apk</inputApk>
|
||||
<outputApk>${project.build.directory}/${project.artifactId}-${project.version}-signed-aligned.apk
|
||||
</outputApk>
|
||||
</zipalign>
|
||||
<manifest>
|
||||
<debuggable>false</debuggable>
|
||||
<versionCodeAutoIncrement>false</versionCodeAutoIncrement>
|
||||
</manifest>
|
||||
<proguard>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<!-- the signed apk then needs to be zipaligned and we activate proguard
|
||||
and we run the manifest update -->
|
||||
<plugin>
|
||||
<groupId>com.jayway.maven.plugins.android.generation2</groupId>
|
||||
<artifactId>android-maven-plugin</artifactId>
|
||||
<inherited>true</inherited>
|
||||
<configuration>
|
||||
<sign>
|
||||
<debug>false</debug>
|
||||
</sign>
|
||||
<zipalign>
|
||||
<skip>false</skip>
|
||||
<verbose>true</verbose>
|
||||
<inputApk>${project.build.directory}/${project.artifactId}-${project.version}.apk</inputApk>
|
||||
<outputApk>${project.build.directory}/${project.artifactId}-${project.version}-signed-aligned.apk
|
||||
</outputApk>
|
||||
</zipalign>
|
||||
<manifest>
|
||||
<debuggable>false</debuggable>
|
||||
<versionCodeAutoIncrement>false</versionCodeAutoIncrement>
|
||||
</manifest>
|
||||
<proguard>
|
||||
<skip>false</skip>
|
||||
<config>proguard.cfg</config>
|
||||
</proguard>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>alignApk</id>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>zipalign</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>build-helper-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<artifacts>
|
||||
<artifact>
|
||||
<file>${project.build.directory}/${project.artifactId}-${project.version}-signed-aligned.apk</file>
|
||||
<type>apk</type>
|
||||
<classifier>signed-aligned</classifier>
|
||||
</artifact>
|
||||
<artifact>
|
||||
<file>${project.build.directory}/proguard/mapping.txt</file>
|
||||
<type>map</type>
|
||||
<classifier>release</classifier>
|
||||
</artifact>
|
||||
</artifacts>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>attach-signed-aligned</id>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>attach-artifact</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
</profiles>
|
||||
</proguard>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>alignApk</id>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>zipalign</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>build-helper-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<artifacts>
|
||||
<artifact>
|
||||
<file>${project.build.directory}/${project.artifactId}-${project.version}-signed-aligned.apk</file>
|
||||
<type>apk</type>
|
||||
<classifier>signed-aligned</classifier>
|
||||
</artifact>
|
||||
<artifact>
|
||||
<file>${project.build.directory}/proguard/mapping.txt</file>
|
||||
<type>map</type>
|
||||
<classifier>release</classifier>
|
||||
</artifact>
|
||||
</artifacts>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>attach-signed-aligned</id>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>attach-artifact</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
</profiles>
|
||||
|
||||
</project>
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
<ListView
|
||||
android:id="@+id/listview"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"/>
|
||||
|
||||
</LinearLayout>
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<style name="Theme.MediaPlayer" parent="@style/Theme.Sherlock.Light.ForceOverflow">
|
||||
<style name="Theme.MediaPlayer" parent="@style/Theme.AppCompat.Light">
|
||||
<item name="android:windowActionBarOverlay">true</item>
|
||||
</style>
|
||||
</resources>
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<style name="Theme.AntennaPod.Light" parent="@style/Theme.Sherlock.Light.ForceOverflow">
|
||||
<style name="Theme.AntennaPod.Light" parent="@style/Theme.AppCompat.Light">
|
||||
<item name="attr/action_about">@drawable/action_about</item>
|
||||
<item name="attr/action_search">@drawable/action_search</item>
|
||||
<item name="attr/action_settings">@drawable/action_settings</item>
|
||||
|
@ -37,7 +37,7 @@
|
|||
<item name="attr/dragview_float_background">@color/white</item>
|
||||
</style>
|
||||
|
||||
<style name="Theme.AntennaPod.Dark" parent="@style/Theme.Sherlock.ForceOverflow">
|
||||
<style name="Theme.AntennaPod.Dark" parent="@style/Theme.AppCompat">
|
||||
<item name="attr/action_about">@drawable/action_about_dark</item>
|
||||
<item name="attr/action_search">@drawable/action_search_dark</item>
|
||||
<item name="attr/action_settings">@drawable/action_settings_dark</item>
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
package de.danoeh.antennapod.activity;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.support.v7.app.ActionBarActivity;
|
||||
import android.webkit.WebView;
|
||||
import android.webkit.WebViewClient;
|
||||
|
||||
import com.actionbarsherlock.app.SherlockActivity;
|
||||
|
||||
import de.danoeh.antennapod.R;
|
||||
|
||||
/** Displays the 'about' screen */
|
||||
public class AboutActivity extends SherlockActivity {
|
||||
public class AboutActivity extends ActionBarActivity {
|
||||
|
||||
private WebView webview;
|
||||
|
||||
|
|
|
@ -2,6 +2,9 @@ package de.danoeh.antennapod.activity;
|
|||
|
||||
import java.util.Date;
|
||||
|
||||
import android.support.v7.app.ActionBarActivity;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import android.app.AlertDialog;
|
||||
|
@ -15,10 +18,6 @@ import android.view.View.OnClickListener;
|
|||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
|
||||
import com.actionbarsherlock.app.SherlockActivity;
|
||||
import com.actionbarsherlock.view.Menu;
|
||||
import com.actionbarsherlock.view.MenuItem;
|
||||
|
||||
import de.danoeh.antennapod.AppConfig;
|
||||
import de.danoeh.antennapod.R;
|
||||
import de.danoeh.antennapod.feed.Feed;
|
||||
|
@ -31,7 +30,7 @@ import de.danoeh.antennapod.util.StorageUtils;
|
|||
import de.danoeh.antennapod.util.URLChecker;
|
||||
|
||||
/** Activity for adding a Feed */
|
||||
public class AddFeedActivity extends SherlockActivity {
|
||||
public class AddFeedActivity extends ActionBarActivity {
|
||||
private static final String TAG = "AddFeedActivity";
|
||||
|
||||
private DownloadRequester requester;
|
||||
|
@ -200,6 +199,8 @@ public class AddFeedActivity extends SherlockActivity {
|
|||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
switch (item.getItemId()) {
|
||||
|
|
|
@ -7,18 +7,17 @@ import android.content.res.TypedArray;
|
|||
import android.os.Bundle;
|
||||
import android.support.v4.app.Fragment;
|
||||
import android.support.v4.app.FragmentTransaction;
|
||||
import android.support.v4.app.ListFragment;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.view.View.OnClickListener;
|
||||
import android.view.Window;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.ImageButton;
|
||||
import android.widget.ImageView.ScaleType;
|
||||
import android.widget.ListView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.actionbarsherlock.app.SherlockListFragment;
|
||||
import com.actionbarsherlock.view.Window;
|
||||
|
||||
import de.danoeh.antennapod.AppConfig;
|
||||
import de.danoeh.antennapod.R;
|
||||
import de.danoeh.antennapod.adapter.ChapterListAdapter;
|
||||
|
@ -48,7 +47,7 @@ public class AudioplayerActivity extends MediaplayerActivity {
|
|||
|
||||
private CoverFragment coverFragment;
|
||||
private ItemDescriptionFragment descriptionFragment;
|
||||
private SherlockListFragment chapterFragment;
|
||||
private ListFragment chapterFragment;
|
||||
|
||||
private Fragment currentlyShownFragment;
|
||||
private int currentlyShownPosition = -1;
|
||||
|
@ -248,8 +247,7 @@ public class AudioplayerActivity extends MediaplayerActivity {
|
|||
/**
|
||||
* Changes the currently displayed fragment.
|
||||
*
|
||||
* @param Must
|
||||
* be POS_COVER, POS_DESCR, or POS_CHAPTERS
|
||||
* @param pos Must be POS_COVER, POS_DESCR, or POS_CHAPTERS
|
||||
* */
|
||||
private void switchToFragment(int pos) {
|
||||
if (AppConfig.DEBUG)
|
||||
|
@ -280,7 +278,7 @@ public class AudioplayerActivity extends MediaplayerActivity {
|
|||
break;
|
||||
case POS_CHAPTERS:
|
||||
if (chapterFragment == null) {
|
||||
chapterFragment = new SherlockListFragment() {
|
||||
chapterFragment = new ListFragment() {
|
||||
|
||||
@Override
|
||||
public void onListItemClick(ListView l, View v,
|
||||
|
|
|
@ -12,7 +12,11 @@ import android.content.Intent;
|
|||
import android.os.Bundle;
|
||||
import android.os.Environment;
|
||||
import android.os.FileObserver;
|
||||
import android.support.v7.app.ActionBarActivity;
|
||||
import android.util.Log;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuInflater;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.view.View.OnClickListener;
|
||||
import android.widget.AdapterView;
|
||||
|
@ -24,11 +28,6 @@ import android.widget.ListView;
|
|||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.actionbarsherlock.app.SherlockActivity;
|
||||
import com.actionbarsherlock.view.Menu;
|
||||
import com.actionbarsherlock.view.MenuInflater;
|
||||
import com.actionbarsherlock.view.MenuItem;
|
||||
|
||||
import de.danoeh.antennapod.AppConfig;
|
||||
import de.danoeh.antennapod.R;
|
||||
import de.danoeh.antennapod.preferences.UserPreferences;
|
||||
|
@ -37,7 +36,7 @@ import de.danoeh.antennapod.preferences.UserPreferences;
|
|||
* Let's the user choose a directory on the storage device. The selected folder
|
||||
* will be sent back to the starting activity as an activity result.
|
||||
*/
|
||||
public class DirectoryChooserActivity extends SherlockActivity {
|
||||
public class DirectoryChooserActivity extends ActionBarActivity {
|
||||
private static final String TAG = "DirectoryChooserActivity";
|
||||
|
||||
private static final String CREATE_DIRECTORY_NAME = "AntennaPod";
|
||||
|
|
|
@ -11,15 +11,16 @@ import android.content.res.TypedArray;
|
|||
import android.os.AsyncTask;
|
||||
import android.os.Bundle;
|
||||
import android.os.IBinder;
|
||||
import android.support.v7.app.ActionBarActivity;
|
||||
import android.support.v7.view.ActionMode;
|
||||
import android.util.Log;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.widget.AdapterView;
|
||||
import android.widget.AdapterView.OnItemLongClickListener;
|
||||
|
||||
import com.actionbarsherlock.app.SherlockListActivity;
|
||||
import com.actionbarsherlock.view.ActionMode;
|
||||
import com.actionbarsherlock.view.Menu;
|
||||
import com.actionbarsherlock.view.MenuItem;
|
||||
import android.widget.ListView;
|
||||
|
||||
import de.danoeh.antennapod.AppConfig;
|
||||
import de.danoeh.antennapod.R;
|
||||
|
@ -33,7 +34,7 @@ import de.danoeh.antennapod.storage.DownloadRequester;
|
|||
* Shows all running downloads in a list. The list objects are DownloadStatus
|
||||
* objects created by a DownloadObserver.
|
||||
*/
|
||||
public class DownloadActivity extends SherlockListActivity implements
|
||||
public class DownloadActivity extends ActionBarActivity implements
|
||||
ActionMode.Callback {
|
||||
|
||||
private static final String TAG = "DownloadActivity";
|
||||
|
@ -50,10 +51,16 @@ public class DownloadActivity extends SherlockListActivity implements
|
|||
|
||||
private AsyncTask<Void, Void, Void> contentRefresher;
|
||||
|
||||
private ListView listview;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
setTheme(UserPreferences.getTheme());
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.listview_activity);
|
||||
|
||||
listview = (ListView) findViewById(R.id.listview);
|
||||
|
||||
if (AppConfig.DEBUG)
|
||||
Log.d(TAG, "Creating Activity");
|
||||
requester = DownloadRequester.getInstance();
|
||||
|
@ -102,7 +109,7 @@ public class DownloadActivity extends SherlockListActivity implements
|
|||
Log.d(TAG, "Connection to service established");
|
||||
dla = new DownloadlistAdapter(DownloadActivity.this, 0,
|
||||
downloadService.getDownloads());
|
||||
setListAdapter(dla);
|
||||
listview.setAdapter(dla);
|
||||
dla.notifyDataSetChanged();
|
||||
}
|
||||
};
|
||||
|
@ -154,7 +161,7 @@ public class DownloadActivity extends SherlockListActivity implements
|
|||
@Override
|
||||
protected void onPostCreate(Bundle savedInstanceState) {
|
||||
super.onPostCreate(savedInstanceState);
|
||||
getListView().setOnItemLongClickListener(new OnItemLongClickListener() {
|
||||
listview.setOnItemLongClickListener(new OnItemLongClickListener() {
|
||||
|
||||
@Override
|
||||
public boolean onItemLongClick(AdapterView<?> arg0, View view,
|
||||
|
@ -165,7 +172,7 @@ public class DownloadActivity extends SherlockListActivity implements
|
|||
}
|
||||
dla.setSelectedItemIndex(position);
|
||||
selectedDownload = selection;
|
||||
mActionMode = startActionMode(DownloadActivity.this);
|
||||
mActionMode = startSupportActionMode(DownloadActivity.this);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -2,10 +2,12 @@ package de.danoeh.antennapod.activity;
|
|||
|
||||
import android.os.Bundle;
|
||||
|
||||
import com.actionbarsherlock.app.SherlockListActivity;
|
||||
import com.actionbarsherlock.view.Menu;
|
||||
import com.actionbarsherlock.view.MenuItem;
|
||||
import android.support.v7.app.ActionBarActivity;
|
||||
|
||||
import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
import android.widget.ListView;
|
||||
import de.danoeh.antennapod.R;
|
||||
import de.danoeh.antennapod.adapter.DownloadLogAdapter;
|
||||
import de.danoeh.antennapod.feed.EventDistributor;
|
||||
import de.danoeh.antennapod.feed.FeedManager;
|
||||
|
@ -15,21 +17,26 @@ import de.danoeh.antennapod.preferences.UserPreferences;
|
|||
* Displays completed and failed downloads in a list. The data comes from the
|
||||
* FeedManager.
|
||||
*/
|
||||
public class DownloadLogActivity extends SherlockListActivity {
|
||||
public class DownloadLogActivity extends ActionBarActivity {
|
||||
private static final String TAG = "DownloadLogActivity";
|
||||
|
||||
DownloadLogAdapter dla;
|
||||
FeedManager manager;
|
||||
|
||||
private ListView listview;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
setTheme(UserPreferences.getTheme());
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.listview_activity);
|
||||
manager = FeedManager.getInstance();
|
||||
|
||||
listview = (ListView) findViewById(R.layout.listview_activity);
|
||||
|
||||
dla = new DownloadLogAdapter(this);
|
||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
setListAdapter(dla);
|
||||
listview.setAdapter(dla);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1,15 +1,14 @@
|
|||
package de.danoeh.antennapod.activity;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.support.v7.app.ActionBarActivity;
|
||||
import android.util.Log;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuInflater;
|
||||
import android.view.MenuItem;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.actionbarsherlock.app.SherlockActivity;
|
||||
import com.actionbarsherlock.view.Menu;
|
||||
import com.actionbarsherlock.view.MenuInflater;
|
||||
import com.actionbarsherlock.view.MenuItem;
|
||||
|
||||
import de.danoeh.antennapod.AppConfig;
|
||||
import de.danoeh.antennapod.R;
|
||||
import de.danoeh.antennapod.asynctask.ImageLoader;
|
||||
|
@ -22,7 +21,7 @@ import de.danoeh.antennapod.util.LangUtils;
|
|||
import de.danoeh.antennapod.util.menuhandler.FeedMenuHandler;
|
||||
|
||||
/** Displays information about a feed. */
|
||||
public class FeedInfoActivity extends SherlockActivity {
|
||||
public class FeedInfoActivity extends ActionBarActivity {
|
||||
private static final String TAG = "FeedInfoActivity";
|
||||
|
||||
public static final String EXTRA_FEED_ID = "de.danoeh.antennapod.extra.feedId";
|
||||
|
|
|
@ -7,14 +7,13 @@ import android.content.res.TypedArray;
|
|||
import android.os.Bundle;
|
||||
import android.support.v4.app.FragmentManager;
|
||||
import android.support.v4.app.FragmentTransaction;
|
||||
import android.support.v7.app.ActionBarActivity;
|
||||
import android.util.Log;
|
||||
|
||||
import com.actionbarsherlock.app.SherlockFragmentActivity;
|
||||
import com.actionbarsherlock.view.Menu;
|
||||
import com.actionbarsherlock.view.MenuInflater;
|
||||
import com.actionbarsherlock.view.MenuItem;
|
||||
import com.actionbarsherlock.view.Window;
|
||||
|
||||
import android.view.Menu;
|
||||
import android.view.MenuInflater;
|
||||
import android.view.MenuItem;
|
||||
import android.view.Window;
|
||||
import de.danoeh.antennapod.R;
|
||||
import de.danoeh.antennapod.asynctask.FeedRemover;
|
||||
import de.danoeh.antennapod.dialog.ConfirmationDialog;
|
||||
|
@ -30,7 +29,7 @@ import de.danoeh.antennapod.util.StorageUtils;
|
|||
import de.danoeh.antennapod.util.menuhandler.FeedMenuHandler;
|
||||
|
||||
/** Displays a List of FeedItems */
|
||||
public class FeedItemlistActivity extends SherlockFragmentActivity {
|
||||
public class FeedItemlistActivity extends ActionBarActivity {
|
||||
private static final String TAG = "FeedItemlistActivity";
|
||||
|
||||
private FeedManager manager;
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
package de.danoeh.antennapod.activity;
|
||||
|
||||
|
||||
import android.support.v7.app.ActionBarActivity;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
import org.shredzone.flattr4j.exception.FlattrException;
|
||||
|
||||
import android.content.Intent;
|
||||
|
@ -12,10 +15,6 @@ import android.view.View.OnClickListener;
|
|||
import android.widget.Button;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.actionbarsherlock.app.SherlockActivity;
|
||||
import com.actionbarsherlock.view.Menu;
|
||||
import com.actionbarsherlock.view.MenuItem;
|
||||
|
||||
import de.danoeh.antennapod.AppConfig;
|
||||
import de.danoeh.antennapod.R;
|
||||
import de.danoeh.antennapod.preferences.UserPreferences;
|
||||
|
@ -23,7 +22,7 @@ import de.danoeh.antennapod.util.flattr.FlattrUtils;
|
|||
|
||||
/** Guides the user through the authentication process */
|
||||
|
||||
public class FlattrAuthActivity extends SherlockActivity {
|
||||
public class FlattrAuthActivity extends ActionBarActivity {
|
||||
private static final String TAG = "FlattrAuthActivity";
|
||||
|
||||
private TextView txtvExplanation;
|
||||
|
|
|
@ -5,16 +5,15 @@ import java.text.DateFormat;
|
|||
import android.os.Bundle;
|
||||
import android.support.v4.app.FragmentManager;
|
||||
import android.support.v4.app.FragmentTransaction;
|
||||
import android.support.v7.app.ActionBarActivity;
|
||||
import android.text.format.DateUtils;
|
||||
import android.util.Log;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuInflater;
|
||||
import android.view.MenuItem;
|
||||
import android.view.Window;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.actionbarsherlock.app.SherlockFragmentActivity;
|
||||
import com.actionbarsherlock.view.Menu;
|
||||
import com.actionbarsherlock.view.MenuInflater;
|
||||
import com.actionbarsherlock.view.MenuItem;
|
||||
import com.actionbarsherlock.view.Window;
|
||||
|
||||
import de.danoeh.antennapod.AppConfig;
|
||||
import de.danoeh.antennapod.R;
|
||||
import de.danoeh.antennapod.dialog.DownloadRequestErrorDialogCreator;
|
||||
|
@ -30,7 +29,7 @@ import de.danoeh.antennapod.util.StorageUtils;
|
|||
import de.danoeh.antennapod.util.menuhandler.FeedItemMenuHandler;
|
||||
|
||||
/** Displays a single FeedItem and provides various actions */
|
||||
public class ItemviewActivity extends SherlockFragmentActivity {
|
||||
public class ItemviewActivity extends ActionBarActivity {
|
||||
private static final String TAG = "ItemviewActivity";
|
||||
|
||||
private FeedManager manager;
|
||||
|
@ -106,7 +105,7 @@ public class ItemviewActivity extends SherlockFragmentActivity {
|
|||
|
||||
@Override
|
||||
public boolean onCreateOptionsMenu(Menu menu) {
|
||||
MenuInflater inflater = getSupportMenuInflater();
|
||||
MenuInflater inflater = getMenuInflater();
|
||||
inflater.inflate(R.menu.feeditem, menu);
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -9,16 +9,14 @@ import android.support.v4.app.Fragment;
|
|||
import android.support.v4.app.FragmentPagerAdapter;
|
||||
import android.support.v4.app.FragmentTransaction;
|
||||
import android.support.v4.view.ViewPager;
|
||||
import android.support.v7.app.ActionBar;
|
||||
import android.support.v7.app.ActionBarActivity;
|
||||
import android.util.Log;
|
||||
|
||||
import com.actionbarsherlock.app.ActionBar;
|
||||
import com.actionbarsherlock.app.ActionBar.Tab;
|
||||
import com.actionbarsherlock.app.SherlockFragmentActivity;
|
||||
import com.actionbarsherlock.view.Menu;
|
||||
import com.actionbarsherlock.view.MenuInflater;
|
||||
import com.actionbarsherlock.view.MenuItem;
|
||||
import com.actionbarsherlock.view.Window;
|
||||
|
||||
import android.view.Menu;
|
||||
import android.view.MenuInflater;
|
||||
import android.view.MenuItem;
|
||||
import android.view.Window;
|
||||
import de.danoeh.antennapod.AppConfig;
|
||||
import de.danoeh.antennapod.R;
|
||||
import de.danoeh.antennapod.feed.EventDistributor;
|
||||
|
@ -33,7 +31,7 @@ import de.danoeh.antennapod.storage.DownloadRequester;
|
|||
import de.danoeh.antennapod.util.StorageUtils;
|
||||
|
||||
/** The activity that is shown when the user launches the app. */
|
||||
public class MainActivity extends SherlockFragmentActivity {
|
||||
public class MainActivity extends ActionBarActivity {
|
||||
private static final String TAG = "MainActivity";
|
||||
|
||||
private static final int EVENTS = EventDistributor.DOWNLOAD_HANDLED
|
||||
|
@ -62,9 +60,9 @@ public class MainActivity extends SherlockFragmentActivity {
|
|||
|
||||
viewpager.setAdapter(pagerAdapter);
|
||||
|
||||
Tab feedsTab = getSupportActionBar().newTab();
|
||||
ActionBar.Tab feedsTab = getSupportActionBar().newTab();
|
||||
feedsTab.setText(R.string.podcasts_label);
|
||||
Tab episodesTab = getSupportActionBar().newTab();
|
||||
ActionBar.Tab episodesTab = getSupportActionBar().newTab();
|
||||
episodesTab.setText(R.string.episodes_label);
|
||||
|
||||
pagerAdapter.addTab(feedsTab, FeedlistFragment.class, null);
|
||||
|
@ -248,7 +246,7 @@ public class MainActivity extends SherlockFragmentActivity {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void onTabSelected(Tab tab, FragmentTransaction ft) {
|
||||
public void onTabSelected(ActionBar.Tab tab, FragmentTransaction ft) {
|
||||
Object tag = tab.getTag();
|
||||
for (int i = 0; i < mTabs.size(); i++) {
|
||||
if (mTabs.get(i) == tag) {
|
||||
|
@ -258,12 +256,12 @@ public class MainActivity extends SherlockFragmentActivity {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void onTabUnselected(Tab tab, FragmentTransaction ft) {
|
||||
public void onTabUnselected(ActionBar.Tab tab, FragmentTransaction ft) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTabReselected(Tab tab, FragmentTransaction ft) {
|
||||
public void onTabReselected(ActionBar.Tab tab, FragmentTransaction ft) {
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -6,17 +6,16 @@ import android.content.Intent;
|
|||
import android.graphics.PixelFormat;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.support.v7.app.ActionBarActivity;
|
||||
import android.util.Log;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuInflater;
|
||||
import android.view.MenuItem;
|
||||
import android.widget.ImageButton;
|
||||
import android.widget.SeekBar;
|
||||
import android.widget.SeekBar.OnSeekBarChangeListener;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.actionbarsherlock.app.SherlockFragmentActivity;
|
||||
import com.actionbarsherlock.view.Menu;
|
||||
import com.actionbarsherlock.view.MenuInflater;
|
||||
import com.actionbarsherlock.view.MenuItem;
|
||||
|
||||
import de.danoeh.antennapod.AppConfig;
|
||||
import de.danoeh.antennapod.R;
|
||||
import de.danoeh.antennapod.asynctask.FlattrClickWorker;
|
||||
|
@ -35,7 +34,7 @@ import de.danoeh.antennapod.util.playback.PlaybackController;
|
|||
* Provides general features which are both needed for playing audio and video
|
||||
* files.
|
||||
*/
|
||||
public abstract class MediaplayerActivity extends SherlockFragmentActivity
|
||||
public abstract class MediaplayerActivity extends ActionBarActivity
|
||||
implements OnSeekBarChangeListener {
|
||||
private static final String TAG = "MediaplayerActivity";
|
||||
|
||||
|
|
|
@ -5,12 +5,11 @@ import android.support.v4.app.Fragment;
|
|||
import android.support.v4.app.FragmentManager;
|
||||
import android.support.v4.app.FragmentStatePagerAdapter;
|
||||
import android.support.v4.view.ViewPager;
|
||||
import android.support.v7.app.ActionBarActivity;
|
||||
import android.util.Log;
|
||||
|
||||
import com.actionbarsherlock.app.SherlockFragmentActivity;
|
||||
import com.actionbarsherlock.view.Menu;
|
||||
import com.actionbarsherlock.view.MenuItem;
|
||||
|
||||
import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
import de.danoeh.antennapod.R;
|
||||
import de.danoeh.antennapod.fragment.MiroGuideChannellistFragment;
|
||||
import de.danoeh.antennapod.preferences.UserPreferences;
|
||||
|
@ -20,7 +19,7 @@ import de.danoeh.antennapod.preferences.UserPreferences;
|
|||
* activity uses MiroGuideChannelListFragments for these lists. If the user
|
||||
* selects a channel, the MiroGuideChannelViewActivity is started.
|
||||
*/
|
||||
public class MiroGuideCategoryActivity extends SherlockFragmentActivity {
|
||||
public class MiroGuideCategoryActivity extends ActionBarActivity {
|
||||
private static final String TAG = "MiroGuideCategoryActivity";
|
||||
|
||||
public static String EXTRA_CATEGORY = "category";
|
||||
|
|
|
@ -7,7 +7,11 @@ import android.content.Intent;
|
|||
import android.net.Uri;
|
||||
import android.os.AsyncTask;
|
||||
import android.os.Bundle;
|
||||
import android.support.v7.app.ActionBarActivity;
|
||||
import android.util.Log;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuInflater;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.widget.ListView;
|
||||
import android.widget.ProgressBar;
|
||||
|
@ -15,11 +19,6 @@ import android.widget.RelativeLayout;
|
|||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.actionbarsherlock.app.SherlockActivity;
|
||||
import com.actionbarsherlock.view.Menu;
|
||||
import com.actionbarsherlock.view.MenuInflater;
|
||||
import com.actionbarsherlock.view.MenuItem;
|
||||
|
||||
import de.danoeh.antennapod.AppConfig;
|
||||
import de.danoeh.antennapod.R;
|
||||
import de.danoeh.antennapod.adapter.MiroGuideItemlistAdapter;
|
||||
|
@ -37,7 +36,7 @@ import de.danoeh.antennapod.storage.DownloadRequester;
|
|||
* Displays information about one channel and lets the user add this channel to
|
||||
* his library.
|
||||
*/
|
||||
public class MiroGuideChannelViewActivity extends SherlockActivity {
|
||||
public class MiroGuideChannelViewActivity extends ActionBarActivity {
|
||||
private static final String TAG = "MiroGuideChannelViewActivity";
|
||||
|
||||
public static final String EXTRA_CHANNEL_ID = "id";
|
||||
|
|
|
@ -4,16 +4,16 @@ import android.annotation.SuppressLint;
|
|||
import android.content.Intent;
|
||||
import android.os.AsyncTask;
|
||||
import android.os.Bundle;
|
||||
import android.support.v7.app.ActionBarActivity;
|
||||
import android.util.Log;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.widget.AdapterView;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.ListView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.actionbarsherlock.app.SherlockListActivity;
|
||||
import com.actionbarsherlock.view.Menu;
|
||||
import com.actionbarsherlock.view.MenuItem;
|
||||
|
||||
import de.danoeh.antennapod.AppConfig;
|
||||
import de.danoeh.antennapod.R;
|
||||
import de.danoeh.antennapod.miroguide.conn.MiroGuideException;
|
||||
|
@ -24,13 +24,14 @@ import de.danoeh.antennapod.preferences.UserPreferences;
|
|||
* Shows a list of available categories and offers a search button. If the user
|
||||
* selects a category, the MiroGuideCategoryActivity is started.
|
||||
*/
|
||||
public class MiroGuideMainActivity extends SherlockListActivity {
|
||||
public class MiroGuideMainActivity extends ActionBarActivity implements AdapterView.OnItemClickListener{
|
||||
private static final String TAG = "MiroGuideMainActivity";
|
||||
|
||||
private static String[] categories;
|
||||
private ArrayAdapter<String> listAdapter;
|
||||
|
||||
private TextView txtvStatus;
|
||||
private ListView listView;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
|
@ -40,6 +41,8 @@ public class MiroGuideMainActivity extends SherlockListActivity {
|
|||
setContentView(R.layout.miroguide_categorylist);
|
||||
|
||||
txtvStatus = (TextView) findViewById(android.R.id.empty);
|
||||
listView = (ListView) findViewById(android.R.id.list);
|
||||
listView.setOnItemClickListener(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -57,22 +60,12 @@ public class MiroGuideMainActivity extends SherlockListActivity {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onListItemClick(ListView l, View v, int position, long id) {
|
||||
super.onListItemClick(l, v, position, id);
|
||||
String selection = listAdapter.getItem(position);
|
||||
Intent launchIntent = new Intent(this, MiroGuideCategoryActivity.class);
|
||||
launchIntent.putExtra(MiroGuideCategoryActivity.EXTRA_CATEGORY,
|
||||
selection);
|
||||
startActivity(launchIntent);
|
||||
}
|
||||
|
||||
private void createAdapter() {
|
||||
if (categories != null) {
|
||||
listAdapter = new ArrayAdapter<String>(this,
|
||||
android.R.layout.simple_list_item_1, categories);
|
||||
txtvStatus.setText(R.string.no_items_label);
|
||||
setListAdapter(listAdapter);
|
||||
listView.setAdapter(listAdapter);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -152,4 +145,12 @@ public class MiroGuideMainActivity extends SherlockListActivity {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onItemClick(AdapterView<?> adapterView, View view, int position, long l) {
|
||||
String selection = listAdapter.getItem(position);
|
||||
Intent launchIntent = new Intent(this, MiroGuideCategoryActivity.class);
|
||||
launchIntent.putExtra(MiroGuideCategoryActivity.EXTRA_CATEGORY,
|
||||
selection);
|
||||
startActivity(launchIntent);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,12 +4,11 @@ import android.app.SearchManager;
|
|||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.app.FragmentTransaction;
|
||||
import android.support.v7.app.ActionBarActivity;
|
||||
import android.util.Log;
|
||||
|
||||
import com.actionbarsherlock.app.SherlockFragmentActivity;
|
||||
import com.actionbarsherlock.view.Menu;
|
||||
import com.actionbarsherlock.view.MenuItem;
|
||||
|
||||
import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
import de.danoeh.antennapod.AppConfig;
|
||||
import de.danoeh.antennapod.R;
|
||||
import de.danoeh.antennapod.fragment.MiroGuideChannellistFragment;
|
||||
|
@ -19,7 +18,7 @@ import de.danoeh.antennapod.preferences.UserPreferences;
|
|||
* Displays results when a search for miroguide channels has been performed. It
|
||||
* uses a MiroGuideChannelListFragment to display the results.
|
||||
*/
|
||||
public class MiroGuideSearchActivity extends SherlockFragmentActivity {
|
||||
public class MiroGuideSearchActivity extends ActionBarActivity {
|
||||
private static final String TAG = "MiroGuideSearchActivity";
|
||||
|
||||
private MiroGuideChannellistFragment listFragment;
|
||||
|
|
|
@ -6,6 +6,7 @@ import java.util.Date;
|
|||
|
||||
import javax.xml.parsers.ParserConfigurationException;
|
||||
|
||||
import android.support.v7.app.ActionBarActivity;
|
||||
import org.xml.sax.SAXException;
|
||||
|
||||
import android.app.AlertDialog;
|
||||
|
@ -17,8 +18,6 @@ import android.view.Gravity;
|
|||
import android.widget.LinearLayout;
|
||||
import android.widget.ProgressBar;
|
||||
|
||||
import com.actionbarsherlock.app.SherlockFragmentActivity;
|
||||
|
||||
import de.danoeh.antennapod.AppConfig;
|
||||
import de.danoeh.antennapod.R;
|
||||
import de.danoeh.antennapod.asynctask.DownloadStatus;
|
||||
|
@ -42,7 +41,7 @@ import de.danoeh.antennapod.util.URLChecker;
|
|||
* If the feed cannot be downloaded or parsed, an error dialog will be displayed
|
||||
* and the activity will finish as soon as the error dialog is closed.
|
||||
*/
|
||||
public abstract class OnlineFeedViewActivity extends SherlockFragmentActivity {
|
||||
public abstract class OnlineFeedViewActivity extends ActionBarActivity {
|
||||
private static final String TAG = "OnlineFeedViewActivity";
|
||||
private static final String ARG_FEEDURL = "arg.feedurl";
|
||||
|
||||
|
|
|
@ -5,17 +5,17 @@ import java.util.List;
|
|||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.view.MenuItemCompat;
|
||||
import android.support.v7.app.ActionBarActivity;
|
||||
import android.util.SparseBooleanArray;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.view.View.OnClickListener;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.Button;
|
||||
import android.widget.ListView;
|
||||
|
||||
import com.actionbarsherlock.app.SherlockActivity;
|
||||
import com.actionbarsherlock.view.Menu;
|
||||
import com.actionbarsherlock.view.MenuItem;
|
||||
|
||||
import de.danoeh.antennapod.R;
|
||||
import de.danoeh.antennapod.opml.OpmlElement;
|
||||
import de.danoeh.antennapod.preferences.UserPreferences;
|
||||
|
@ -24,110 +24,111 @@ import de.danoeh.antennapod.preferences.UserPreferences;
|
|||
* Displays the feeds that the OPML-Importer has read and lets the user choose
|
||||
* which feeds he wants to import.
|
||||
*/
|
||||
public class OpmlFeedChooserActivity extends SherlockActivity {
|
||||
private static final String TAG = "OpmlFeedChooserActivity";
|
||||
public class OpmlFeedChooserActivity extends ActionBarActivity {
|
||||
private static final String TAG = "OpmlFeedChooserActivity";
|
||||
|
||||
public static final String EXTRA_SELECTED_ITEMS = "de.danoeh.antennapod.selectedItems";
|
||||
public static final String EXTRA_SELECTED_ITEMS = "de.danoeh.antennapod.selectedItems";
|
||||
|
||||
private Button butConfirm;
|
||||
private Button butCancel;
|
||||
private ListView feedlist;
|
||||
private ArrayAdapter<String> listAdapter;
|
||||
private Button butConfirm;
|
||||
private Button butCancel;
|
||||
private ListView feedlist;
|
||||
private ArrayAdapter<String> listAdapter;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
setTheme(UserPreferences.getTheme());
|
||||
super.onCreate(savedInstanceState);
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
setTheme(UserPreferences.getTheme());
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
setContentView(R.layout.opml_selection);
|
||||
butConfirm = (Button) findViewById(R.id.butConfirm);
|
||||
butCancel = (Button) findViewById(R.id.butCancel);
|
||||
feedlist = (ListView) findViewById(R.id.feedlist);
|
||||
setContentView(R.layout.opml_selection);
|
||||
butConfirm = (Button) findViewById(R.id.butConfirm);
|
||||
butCancel = (Button) findViewById(R.id.butCancel);
|
||||
feedlist = (ListView) findViewById(R.id.feedlist);
|
||||
|
||||
feedlist.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE);
|
||||
listAdapter = new ArrayAdapter<String>(this,
|
||||
android.R.layout.simple_list_item_multiple_choice,
|
||||
getTitleList());
|
||||
feedlist.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE);
|
||||
listAdapter = new ArrayAdapter<String>(this,
|
||||
android.R.layout.simple_list_item_multiple_choice,
|
||||
getTitleList());
|
||||
|
||||
feedlist.setAdapter(listAdapter);
|
||||
feedlist.setAdapter(listAdapter);
|
||||
|
||||
butCancel.setOnClickListener(new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
setResult(RESULT_CANCELED);
|
||||
finish();
|
||||
}
|
||||
});
|
||||
butCancel.setOnClickListener(new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
setResult(RESULT_CANCELED);
|
||||
finish();
|
||||
}
|
||||
});
|
||||
|
||||
butConfirm.setOnClickListener(new OnClickListener() {
|
||||
butConfirm.setOnClickListener(new OnClickListener() {
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent();
|
||||
SparseBooleanArray checked = feedlist.getCheckedItemPositions();
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent();
|
||||
SparseBooleanArray checked = feedlist.getCheckedItemPositions();
|
||||
|
||||
int checkedCount = 0;
|
||||
// Get number of checked items
|
||||
for (int i = 0; i < checked.size(); i++) {
|
||||
if (checked.valueAt(i)) {
|
||||
checkedCount++;
|
||||
}
|
||||
}
|
||||
int[] selection = new int[checkedCount];
|
||||
for (int i = 0, collected = 0; collected < checkedCount; i++) {
|
||||
if (checked.valueAt(i)) {
|
||||
selection[collected] = checked.keyAt(i);
|
||||
collected++;
|
||||
}
|
||||
}
|
||||
intent.putExtra(EXTRA_SELECTED_ITEMS, selection);
|
||||
setResult(RESULT_OK, intent);
|
||||
finish();
|
||||
}
|
||||
});
|
||||
int checkedCount = 0;
|
||||
// Get number of checked items
|
||||
for (int i = 0; i < checked.size(); i++) {
|
||||
if (checked.valueAt(i)) {
|
||||
checkedCount++;
|
||||
}
|
||||
}
|
||||
int[] selection = new int[checkedCount];
|
||||
for (int i = 0, collected = 0; collected < checkedCount; i++) {
|
||||
if (checked.valueAt(i)) {
|
||||
selection[collected] = checked.keyAt(i);
|
||||
collected++;
|
||||
}
|
||||
}
|
||||
intent.putExtra(EXTRA_SELECTED_ITEMS, selection);
|
||||
setResult(RESULT_OK, intent);
|
||||
finish();
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private List<String> getTitleList() {
|
||||
List<String> result = new ArrayList<String>();
|
||||
if (OpmlImportHolder.getReadElements() != null) {
|
||||
for (OpmlElement element : OpmlImportHolder.getReadElements()) {
|
||||
result.add(element.getText());
|
||||
}
|
||||
private List<String> getTitleList() {
|
||||
List<String> result = new ArrayList<String>();
|
||||
if (OpmlImportHolder.getReadElements() != null) {
|
||||
for (OpmlElement element : OpmlImportHolder.getReadElements()) {
|
||||
result.add(element.getText());
|
||||
}
|
||||
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onCreateOptionsMenu(Menu menu) {
|
||||
menu.add(Menu.NONE, R.id.select_all_item, Menu.NONE,
|
||||
R.string.select_all_label).setShowAsAction(
|
||||
MenuItem.SHOW_AS_ACTION_IF_ROOM);
|
||||
menu.add(Menu.NONE, R.id.deselect_all_item, Menu.NONE,
|
||||
R.string.deselect_all_label).setShowAsAction(
|
||||
MenuItem.SHOW_AS_ACTION_IF_ROOM);
|
||||
return true;
|
||||
}
|
||||
@Override
|
||||
public boolean onCreateOptionsMenu(Menu menu) {
|
||||
MenuItemCompat.setShowAsAction(menu.add(Menu.NONE, R.id.select_all_item, Menu.NONE,
|
||||
R.string.select_all_label),
|
||||
MenuItem.SHOW_AS_ACTION_IF_ROOM);
|
||||
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
switch (item.getItemId()) {
|
||||
case R.id.select_all_item:
|
||||
selectAllItems(true);
|
||||
return true;
|
||||
case R.id.deselect_all_item:
|
||||
selectAllItems(false);
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
MenuItemCompat.setShowAsAction(menu.add(Menu.NONE, R.id.deselect_all_item, Menu.NONE,
|
||||
R.string.deselect_all_label),
|
||||
MenuItem.SHOW_AS_ACTION_IF_ROOM);
|
||||
return true;
|
||||
}
|
||||
|
||||
private void selectAllItems(boolean b) {
|
||||
for (int i = 0; i < feedlist.getCount(); i++) {
|
||||
feedlist.setItemChecked(i, b);
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
switch (item.getItemId()) {
|
||||
case R.id.select_all_item:
|
||||
selectAllItems(true);
|
||||
return true;
|
||||
case R.id.deselect_all_item:
|
||||
selectAllItems(false);
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private void selectAllItems(boolean b) {
|
||||
for (int i = 0; i < feedlist.getCount(); i++) {
|
||||
feedlist.setItemChecked(i, b);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -4,10 +4,9 @@ import java.io.Reader;
|
|||
import java.util.ArrayList;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.support.v7.app.ActionBarActivity;
|
||||
import android.util.Log;
|
||||
|
||||
import com.actionbarsherlock.app.SherlockActivity;
|
||||
|
||||
import de.danoeh.antennapod.AppConfig;
|
||||
import de.danoeh.antennapod.asynctask.OpmlFeedQueuer;
|
||||
import de.danoeh.antennapod.asynctask.OpmlImportWorker;
|
||||
|
@ -16,7 +15,7 @@ import de.danoeh.antennapod.opml.OpmlElement;
|
|||
/**
|
||||
* Base activity for Opml Import - e.g. with code what to do afterwards
|
||||
* */
|
||||
public class OpmlImportBaseActivity extends SherlockActivity {
|
||||
public class OpmlImportBaseActivity extends ActionBarActivity {
|
||||
|
||||
private static final String TAG = "OpmlImportBaseActivity";
|
||||
private OpmlImportWorker importWorker;
|
||||
|
|
|
@ -9,15 +9,14 @@ import android.app.AlertDialog;
|
|||
import android.content.DialogInterface;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.view.View.OnClickListener;
|
||||
import android.widget.Button;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.actionbarsherlock.view.Menu;
|
||||
import com.actionbarsherlock.view.MenuItem;
|
||||
|
||||
import de.danoeh.antennapod.AppConfig;
|
||||
import de.danoeh.antennapod.R;
|
||||
import de.danoeh.antennapod.preferences.UserPreferences;
|
||||
|
|
|
@ -1,20 +1,15 @@
|
|||
package de.danoeh.antennapod.activity;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.res.TypedArray;
|
||||
import android.os.Bundle;
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.support.v7.app.ActionBarActivity;
|
||||
import android.view.*;
|
||||
import android.widget.BaseAdapter;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.actionbarsherlock.app.SherlockListActivity;
|
||||
import com.actionbarsherlock.view.Menu;
|
||||
import com.actionbarsherlock.view.MenuItem;
|
||||
import com.mobeta.android.dslv.DragSortListView;
|
||||
|
||||
import de.danoeh.antennapod.R;
|
||||
|
@ -25,7 +20,7 @@ import de.danoeh.antennapod.feed.FeedManager;
|
|||
import de.danoeh.antennapod.preferences.UserPreferences;
|
||||
import de.danoeh.antennapod.util.UndoBarController;
|
||||
|
||||
public class OrganizeQueueActivity extends SherlockListActivity implements
|
||||
public class OrganizeQueueActivity extends ActionBarActivity implements
|
||||
UndoBarController.UndoListener {
|
||||
private static final String TAG = "OrganizeQueueActivity";
|
||||
|
||||
|
@ -34,6 +29,8 @@ public class OrganizeQueueActivity extends SherlockListActivity implements
|
|||
private OrganizeAdapter adapter;
|
||||
private UndoBarController undoBarController;
|
||||
|
||||
private DragSortListView listView;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
setTheme(UserPreferences.getTheme());
|
||||
|
@ -41,12 +38,12 @@ public class OrganizeQueueActivity extends SherlockListActivity implements
|
|||
setContentView(R.layout.organize_queue);
|
||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
|
||||
DragSortListView listView = (DragSortListView) getListView();
|
||||
listView = (DragSortListView) findViewById(android.R.id.list);
|
||||
listView.setDropListener(dropListener);
|
||||
listView.setRemoveListener(removeListener);
|
||||
|
||||
adapter = new OrganizeAdapter(this);
|
||||
setListAdapter(adapter);
|
||||
listView.setAdapter(adapter);
|
||||
|
||||
undoBarController = new UndoBarController(findViewById(R.id.undobar),
|
||||
this);
|
||||
|
@ -98,7 +95,7 @@ public class OrganizeQueueActivity extends SherlockListActivity implements
|
|||
@Override
|
||||
public void remove(int which) {
|
||||
FeedManager manager = FeedManager.getInstance();
|
||||
FeedItem item = (FeedItem) getListAdapter().getItem(which);
|
||||
FeedItem item = (FeedItem) listView.getAdapter().getItem(which);
|
||||
manager.removeQueueItem(OrganizeQueueActivity.this, item, false);
|
||||
undoBarController.showUndoBar(false,
|
||||
getString(R.string.removed_from_queue), new UndoToken(item,
|
||||
|
|
|
@ -3,25 +3,25 @@ package de.danoeh.antennapod.activity;
|
|||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.app.FragmentTransaction;
|
||||
import android.support.v4.view.MenuItemCompat;
|
||||
import android.support.v7.app.ActionBarActivity;
|
||||
import android.util.Log;
|
||||
|
||||
import com.actionbarsherlock.app.SherlockFragmentActivity;
|
||||
import com.actionbarsherlock.view.Menu;
|
||||
import com.actionbarsherlock.view.MenuItem;
|
||||
|
||||
import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
import de.danoeh.antennapod.AppConfig;
|
||||
import de.danoeh.antennapod.R;
|
||||
import de.danoeh.antennapod.feed.FeedManager;
|
||||
import de.danoeh.antennapod.fragment.PlaybackHistoryFragment;
|
||||
import de.danoeh.antennapod.preferences.UserPreferences;
|
||||
|
||||
public class PlaybackHistoryActivity extends SherlockFragmentActivity {
|
||||
public class PlaybackHistoryActivity extends ActionBarActivity {
|
||||
private static final String TAG = "PlaybackHistoryActivity";
|
||||
|
||||
@Override
|
||||
public boolean onCreateOptionsMenu(Menu menu) {
|
||||
menu.add(Menu.NONE, R.id.clear_history_item, Menu.NONE,
|
||||
R.string.clear_history_label).setShowAsAction(
|
||||
MenuItemCompat.setShowAsAction(menu.add(Menu.NONE, R.id.clear_history_item, Menu.NONE,
|
||||
R.string.clear_history_label),
|
||||
MenuItem.SHOW_AS_ACTION_IF_ROOM);
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -19,10 +19,8 @@ import android.preference.Preference.OnPreferenceClickListener;
|
|||
import android.preference.PreferenceScreen;
|
||||
import android.util.Log;
|
||||
|
||||
import com.actionbarsherlock.app.SherlockPreferenceActivity;
|
||||
import com.actionbarsherlock.view.Menu;
|
||||
import com.actionbarsherlock.view.MenuItem;
|
||||
|
||||
import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
import de.danoeh.antennapod.AppConfig;
|
||||
import de.danoeh.antennapod.R;
|
||||
import de.danoeh.antennapod.asynctask.FlattrClickWorker;
|
||||
|
@ -32,7 +30,7 @@ import de.danoeh.antennapod.preferences.UserPreferences;
|
|||
import de.danoeh.antennapod.util.flattr.FlattrUtils;
|
||||
|
||||
/** The main preference activity */
|
||||
public class PreferenceActivity extends SherlockPreferenceActivity {
|
||||
public class PreferenceActivity extends android.preference.PreferenceActivity {
|
||||
private static final String TAG = "PreferenceActivity";
|
||||
|
||||
private static final String PREF_FLATTR_THIS_APP = "prefFlattrThisApp";
|
||||
|
@ -51,7 +49,10 @@ public class PreferenceActivity extends SherlockPreferenceActivity {
|
|||
setTheme(UserPreferences.getTheme());
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
if (android.os.Build.VERSION.SDK_INT >= 11) {
|
||||
getActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
}
|
||||
|
||||
addPreferencesFromResource(R.xml.preferences);
|
||||
findPreference(PREF_FLATTR_THIS_APP).setOnPreferenceClickListener(
|
||||
new OnPreferenceClickListener() {
|
||||
|
|
|
@ -6,15 +6,15 @@ import android.annotation.SuppressLint;
|
|||
import android.app.SearchManager;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.support.v7.app.ActionBarActivity;
|
||||
import android.util.Log;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.widget.AdapterView;
|
||||
import android.widget.ListView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.actionbarsherlock.app.SherlockListActivity;
|
||||
import com.actionbarsherlock.view.Menu;
|
||||
import com.actionbarsherlock.view.MenuItem;
|
||||
|
||||
import de.danoeh.antennapod.AppConfig;
|
||||
import de.danoeh.antennapod.R;
|
||||
import de.danoeh.antennapod.adapter.SearchlistAdapter;
|
||||
|
@ -28,7 +28,7 @@ import de.danoeh.antennapod.fragment.ItemlistFragment;
|
|||
import de.danoeh.antennapod.preferences.UserPreferences;
|
||||
|
||||
/** Displays the results when the user searches for FeedItems or Feeds. */
|
||||
public class SearchActivity extends SherlockListActivity {
|
||||
public class SearchActivity extends ActionBarActivity implements AdapterView.OnItemClickListener{
|
||||
private static final String TAG = "SearchActivity";
|
||||
|
||||
public static final String EXTRA_FEED_ID = "de.danoeh.antennapod.searchactivity.extra.feedId";
|
||||
|
@ -39,6 +39,7 @@ public class SearchActivity extends SherlockListActivity {
|
|||
/** Feed that is being searched or null if the search is global. */
|
||||
private Feed selectedFeed;
|
||||
|
||||
private ListView listView;
|
||||
private TextView txtvStatus;
|
||||
|
||||
@Override
|
||||
|
@ -48,8 +49,11 @@ public class SearchActivity extends SherlockListActivity {
|
|||
|
||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
setContentView(R.layout.searchlist);
|
||||
listView = (ListView) findViewById(android.R.id.list);
|
||||
txtvStatus = (TextView) findViewById(android.R.id.empty);
|
||||
}
|
||||
|
||||
listView.setOnItemClickListener(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onNewIntent(Intent intent) {
|
||||
|
@ -117,28 +121,6 @@ public class SearchActivity extends SherlockListActivity {
|
|||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onListItemClick(ListView l, View v, int position, long id) {
|
||||
super.onListItemClick(l, v, position, id);
|
||||
SearchResult selection = searchAdapter.getItem(position);
|
||||
if (selection.getComponent().getClass() == Feed.class) {
|
||||
Feed feed = (Feed) selection.getComponent();
|
||||
Intent launchIntent = new Intent(this, FeedItemlistActivity.class);
|
||||
launchIntent.putExtra(FeedlistFragment.EXTRA_SELECTED_FEED,
|
||||
feed.getId());
|
||||
startActivity(launchIntent);
|
||||
|
||||
} else if (selection.getComponent().getClass() == FeedItem.class) {
|
||||
FeedItem item = (FeedItem) selection.getComponent();
|
||||
Intent launchIntent = new Intent(this, ItemviewActivity.class);
|
||||
launchIntent.putExtra(FeedlistFragment.EXTRA_SELECTED_FEED, item
|
||||
.getFeed().getId());
|
||||
launchIntent.putExtra(ItemlistFragment.EXTRA_SELECTED_FEEDITEM,
|
||||
item.getId());
|
||||
startActivity(launchIntent);
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressLint({ "NewApi", "NewApi" })
|
||||
private void handleSearchRequest(final String query) {
|
||||
if (searchAdapter != null) {
|
||||
|
@ -168,7 +150,7 @@ public class SearchActivity extends SherlockListActivity {
|
|||
|
||||
searchAdapter = new SearchlistAdapter(
|
||||
SearchActivity.this, 0, content);
|
||||
getListView().setAdapter(searchAdapter);
|
||||
listView.setAdapter(searchAdapter);
|
||||
searchAdapter.notifyDataSetChanged();
|
||||
if (content.isEmpty()) {
|
||||
txtvStatus
|
||||
|
@ -182,4 +164,25 @@ public class SearchActivity extends SherlockListActivity {
|
|||
thread.start();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onItemClick(AdapterView<?> adapterView, View view, int position, long l) {
|
||||
SearchResult selection = searchAdapter.getItem(position);
|
||||
if (selection.getComponent().getClass() == Feed.class) {
|
||||
Feed feed = (Feed) selection.getComponent();
|
||||
Intent launchIntent = new Intent(this, FeedItemlistActivity.class);
|
||||
launchIntent.putExtra(FeedlistFragment.EXTRA_SELECTED_FEED,
|
||||
feed.getId());
|
||||
startActivity(launchIntent);
|
||||
|
||||
} else if (selection.getComponent().getClass() == FeedItem.class) {
|
||||
FeedItem item = (FeedItem) selection.getComponent();
|
||||
Intent launchIntent = new Intent(this, ItemviewActivity.class);
|
||||
launchIntent.putExtra(FeedlistFragment.EXTRA_SELECTED_FEED, item
|
||||
.getFeed().getId());
|
||||
launchIntent.putExtra(ItemlistFragment.EXTRA_SELECTED_FEEDITEM,
|
||||
item.getId());
|
||||
startActivity(launchIntent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,17 +5,16 @@ import android.content.Context;
|
|||
import android.content.Intent;
|
||||
import android.content.IntentFilter;
|
||||
import android.os.Bundle;
|
||||
import android.support.v7.app.ActionBarActivity;
|
||||
import android.util.Log;
|
||||
|
||||
import com.actionbarsherlock.app.SherlockActivity;
|
||||
|
||||
import de.danoeh.antennapod.AppConfig;
|
||||
import de.danoeh.antennapod.R;
|
||||
import de.danoeh.antennapod.preferences.UserPreferences;
|
||||
import de.danoeh.antennapod.util.StorageUtils;
|
||||
|
||||
/** Is show if there is now external storage available. */
|
||||
public class StorageErrorActivity extends SherlockActivity {
|
||||
public class StorageErrorActivity extends ActionBarActivity {
|
||||
private static final String TAG = "StorageErrorActivity";
|
||||
|
||||
@Override
|
||||
|
|
|
@ -5,18 +5,13 @@ import android.content.Intent;
|
|||
import android.os.AsyncTask;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.SurfaceHolder;
|
||||
import android.view.View;
|
||||
import android.view.WindowManager;
|
||||
import android.view.*;
|
||||
import android.view.animation.AnimationUtils;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.ProgressBar;
|
||||
import android.widget.SeekBar;
|
||||
import android.widget.VideoView;
|
||||
|
||||
import com.actionbarsherlock.view.Window;
|
||||
|
||||
import de.danoeh.antennapod.AppConfig;
|
||||
import de.danoeh.antennapod.R;
|
||||
import de.danoeh.antennapod.feed.MediaType;
|
||||
|
|
|
@ -1,14 +1,13 @@
|
|||
package de.danoeh.antennapod.fragment;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.app.Fragment;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
|
||||
import com.actionbarsherlock.app.SherlockFragment;
|
||||
|
||||
import de.danoeh.antennapod.AppConfig;
|
||||
import de.danoeh.antennapod.R;
|
||||
import de.danoeh.antennapod.activity.AudioplayerActivity.AudioplayerContentFragment;
|
||||
|
@ -16,7 +15,7 @@ import de.danoeh.antennapod.asynctask.ImageLoader;
|
|||
import de.danoeh.antennapod.util.playback.Playable;
|
||||
|
||||
/** Displays the cover and the title of a FeedItem. */
|
||||
public class CoverFragment extends SherlockFragment implements
|
||||
public class CoverFragment extends Fragment implements
|
||||
AudioplayerContentFragment {
|
||||
private static final String TAG = "CoverFragment";
|
||||
private static final String ARG_PLAYABLE = "arg.playable";
|
||||
|
|
|
@ -2,19 +2,13 @@ package de.danoeh.antennapod.fragment;
|
|||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.app.Fragment;
|
||||
import android.util.Log;
|
||||
import android.view.ContextMenu;
|
||||
import android.view.*;
|
||||
import android.view.ContextMenu.ContextMenuInfo;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.MenuInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ExpandableListView;
|
||||
import android.widget.ExpandableListView.OnChildClickListener;
|
||||
|
||||
import com.actionbarsherlock.app.SherlockFragment;
|
||||
import com.actionbarsherlock.view.Menu;
|
||||
|
||||
import de.danoeh.antennapod.AppConfig;
|
||||
import de.danoeh.antennapod.R;
|
||||
import de.danoeh.antennapod.activity.ItemviewActivity;
|
||||
|
@ -28,7 +22,7 @@ import de.danoeh.antennapod.feed.FeedManager;
|
|||
import de.danoeh.antennapod.storage.DownloadRequestException;
|
||||
import de.danoeh.antennapod.util.menuhandler.FeedItemMenuHandler;
|
||||
|
||||
public class EpisodesFragment extends SherlockFragment {
|
||||
public class EpisodesFragment extends Fragment {
|
||||
private static final String TAG = "EpisodesFragment";
|
||||
|
||||
private static final int EVENTS = EventDistributor.QUEUE_UPDATE
|
||||
|
@ -176,7 +170,7 @@ public class EpisodesFragment extends SherlockFragment {
|
|||
if (selectedItem != null) {
|
||||
try {
|
||||
handled = FeedItemMenuHandler.onMenuItemClicked(
|
||||
getSherlockActivity(), item.getItemId(), selectedItem);
|
||||
getActivity(), item.getItemId(), selectedItem);
|
||||
} catch (DownloadRequestException e) {
|
||||
e.printStackTrace();
|
||||
DownloadRequestErrorDialogCreator.newRequestErrorDialog(
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package de.danoeh.antennapod.fragment;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.app.Fragment;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
|
@ -10,8 +11,6 @@ import android.widget.ImageButton;
|
|||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.actionbarsherlock.app.SherlockFragment;
|
||||
|
||||
import de.danoeh.antennapod.AppConfig;
|
||||
import de.danoeh.antennapod.R;
|
||||
import de.danoeh.antennapod.asynctask.ImageLoader;
|
||||
|
@ -24,7 +23,7 @@ import de.danoeh.antennapod.util.playback.PlaybackController;
|
|||
* Fragment which is supposed to be displayed outside of the MediaplayerActivity
|
||||
* if the PlaybackService is running
|
||||
*/
|
||||
public class ExternalPlayerFragment extends SherlockFragment {
|
||||
public class ExternalPlayerFragment extends Fragment {
|
||||
private static final String TAG = "ExternalPlayerFragment";
|
||||
|
||||
private ViewGroup fragmentLayout;
|
||||
|
|
|
@ -5,20 +5,16 @@ import android.app.Activity;
|
|||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.app.Fragment;
|
||||
import android.support.v7.app.ActionBarActivity;
|
||||
import android.support.v7.view.ActionMode;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.*;
|
||||
import android.widget.AdapterView;
|
||||
import android.widget.GridView;
|
||||
import android.widget.ListView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.actionbarsherlock.app.SherlockFragment;
|
||||
import com.actionbarsherlock.view.ActionMode;
|
||||
import com.actionbarsherlock.view.Menu;
|
||||
import com.actionbarsherlock.view.MenuItem;
|
||||
|
||||
import de.danoeh.antennapod.AppConfig;
|
||||
import de.danoeh.antennapod.R;
|
||||
import de.danoeh.antennapod.activity.FeedItemlistActivity;
|
||||
|
@ -32,7 +28,7 @@ import de.danoeh.antennapod.feed.FeedManager;
|
|||
import de.danoeh.antennapod.storage.DownloadRequestException;
|
||||
import de.danoeh.antennapod.util.menuhandler.FeedMenuHandler;
|
||||
|
||||
public class FeedlistFragment extends SherlockFragment implements
|
||||
public class FeedlistFragment extends Fragment implements
|
||||
ActionMode.Callback, AdapterView.OnItemClickListener,
|
||||
AdapterView.OnItemLongClickListener {
|
||||
private static final String TAG = "FeedlistFragment";
|
||||
|
@ -152,14 +148,14 @@ public class FeedlistFragment extends SherlockFragment implements
|
|||
@Override
|
||||
public boolean onActionItemClicked(ActionMode mode, MenuItem item) {
|
||||
try {
|
||||
if (FeedMenuHandler.onOptionsItemClicked(getSherlockActivity(),
|
||||
if (FeedMenuHandler.onOptionsItemClicked(getActivity(),
|
||||
item, selectedFeed)) {
|
||||
fla.notifyDataSetChanged();
|
||||
} else {
|
||||
switch (item.getItemId()) {
|
||||
case R.id.remove_item:
|
||||
final FeedRemover remover = new FeedRemover(
|
||||
getSherlockActivity(), selectedFeed) {
|
||||
getActivity(), selectedFeed) {
|
||||
@Override
|
||||
protected void onPostExecute(Void result) {
|
||||
super.onPostExecute(result);
|
||||
|
@ -219,8 +215,7 @@ public class FeedlistFragment extends SherlockFragment implements
|
|||
}
|
||||
fla.setSelectedItemIndex(position);
|
||||
selectedFeed = selection;
|
||||
mActionMode = getSherlockActivity().startActionMode(
|
||||
FeedlistFragment.this);
|
||||
mActionMode = ((ActionBarActivity) getActivity()).startSupportActionMode(FeedlistFragment.this);
|
||||
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
package de.danoeh.antennapod.fragment;
|
||||
|
||||
import android.support.v4.app.Fragment;
|
||||
import android.support.v7.app.ActionBarActivity;
|
||||
import org.apache.commons.lang3.StringEscapeUtils;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
|
@ -27,8 +29,6 @@ import android.webkit.WebView;
|
|||
import android.webkit.WebViewClient;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.actionbarsherlock.app.SherlockFragment;
|
||||
|
||||
import de.danoeh.antennapod.AppConfig;
|
||||
import de.danoeh.antennapod.PodcastApp;
|
||||
import de.danoeh.antennapod.R;
|
||||
|
@ -39,7 +39,7 @@ import de.danoeh.antennapod.util.ShareUtils;
|
|||
import de.danoeh.antennapod.util.playback.Playable;
|
||||
|
||||
/** Displays the description of a Playable object in a Webview. */
|
||||
public class ItemDescriptionFragment extends SherlockFragment {
|
||||
public class ItemDescriptionFragment extends Fragment {
|
||||
|
||||
private static final String TAG = "ItemDescriptionFragment";
|
||||
|
||||
|
@ -350,8 +350,8 @@ public class ItemDescriptionFragment extends SherlockFragment {
|
|||
@Override
|
||||
protected void onCancelled() {
|
||||
super.onCancelled();
|
||||
if (getSherlockActivity() != null) {
|
||||
getSherlockActivity()
|
||||
if (getActivity() != null) {
|
||||
((ActionBarActivity) getActivity())
|
||||
.setSupportProgressBarIndeterminateVisibility(false);
|
||||
}
|
||||
webViewLoader = null;
|
||||
|
@ -365,8 +365,8 @@ public class ItemDescriptionFragment extends SherlockFragment {
|
|||
// /webvDescription.loadData(url, "text/html", "utf-8");
|
||||
webvDescription.loadDataWithBaseURL(null, data, "text/html",
|
||||
"utf-8", "about:blank");
|
||||
if (getSherlockActivity() != null) {
|
||||
getSherlockActivity()
|
||||
if (getActivity() != null) {
|
||||
((ActionBarActivity) getActivity())
|
||||
.setSupportProgressBarIndeterminateVisibility(false);
|
||||
}
|
||||
if (AppConfig.DEBUG)
|
||||
|
@ -377,8 +377,8 @@ public class ItemDescriptionFragment extends SherlockFragment {
|
|||
@Override
|
||||
protected void onPreExecute() {
|
||||
super.onPreExecute();
|
||||
if (getSherlockActivity() != null) {
|
||||
getSherlockActivity()
|
||||
if (getActivity() != null) {
|
||||
((ActionBarActivity) getActivity())
|
||||
.setSupportProgressBarIndeterminateVisibility(true);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,6 +3,8 @@ package de.danoeh.antennapod.fragment;
|
|||
import android.annotation.SuppressLint;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.app.ListFragment;
|
||||
import android.support.v7.app.ActionBarActivity;
|
||||
import android.util.Log;
|
||||
import android.view.ContextMenu;
|
||||
import android.view.ContextMenu.ContextMenuInfo;
|
||||
|
@ -12,8 +14,6 @@ import android.view.View;
|
|||
import android.view.ViewGroup;
|
||||
import android.widget.ListView;
|
||||
|
||||
import com.actionbarsherlock.app.SherlockListFragment;
|
||||
|
||||
import de.danoeh.antennapod.AppConfig;
|
||||
import de.danoeh.antennapod.R;
|
||||
import de.danoeh.antennapod.activity.ItemviewActivity;
|
||||
|
@ -32,7 +32,7 @@ import de.danoeh.antennapod.util.menuhandler.FeedItemMenuHandler;
|
|||
|
||||
/** Displays a list of FeedItems. */
|
||||
@SuppressLint("ValidFragment")
|
||||
public class ItemlistFragment extends SherlockListFragment {
|
||||
public class ItemlistFragment extends ListFragment {
|
||||
private static final String TAG = "ItemlistFragment";
|
||||
|
||||
private static final int EVENTS = EventDistributor.DOWNLOAD_HANDLED
|
||||
|
@ -173,13 +173,13 @@ public class ItemlistFragment extends SherlockListFragment {
|
|||
if (feed != null) {
|
||||
if (DownloadService.isRunning
|
||||
&& DownloadRequester.getInstance().isDownloadingFile(feed)) {
|
||||
getSherlockActivity()
|
||||
((ActionBarActivity) getActivity())
|
||||
.setSupportProgressBarIndeterminateVisibility(true);
|
||||
} else {
|
||||
getSherlockActivity()
|
||||
((ActionBarActivity) getActivity())
|
||||
.setSupportProgressBarIndeterminateVisibility(false);
|
||||
}
|
||||
getSherlockActivity().supportInvalidateOptionsMenu();
|
||||
getActivity().supportInvalidateOptionsMenu();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -237,7 +237,7 @@ public class ItemlistFragment extends SherlockListFragment {
|
|||
|
||||
try {
|
||||
handled = FeedItemMenuHandler.onMenuItemClicked(
|
||||
getSherlockActivity(), item.getItemId(), selectedItem);
|
||||
getActivity(), item.getItemId(), selectedItem);
|
||||
} catch (DownloadRequestException e) {
|
||||
e.printStackTrace();
|
||||
DownloadRequestErrorDialogCreator.newRequestErrorDialog(
|
||||
|
|
|
@ -10,6 +10,7 @@ import android.content.DialogInterface;
|
|||
import android.content.Intent;
|
||||
import android.os.AsyncTask;
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.app.ListFragment;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
|
@ -17,8 +18,6 @@ import android.widget.AbsListView;
|
|||
import android.widget.AbsListView.OnScrollListener;
|
||||
import android.widget.ListView;
|
||||
|
||||
import com.actionbarsherlock.app.SherlockListFragment;
|
||||
|
||||
import de.danoeh.antennapod.AppConfig;
|
||||
import de.danoeh.antennapod.R;
|
||||
import de.danoeh.antennapod.activity.MiroGuideChannelViewActivity;
|
||||
|
@ -33,7 +32,7 @@ import de.danoeh.antennapod.miroguide.model.MiroGuideChannel;
|
|||
* entries will be loaded until all entries have been loaded or the maximum
|
||||
* number of channels has been reached.
|
||||
* */
|
||||
public class MiroGuideChannellistFragment extends SherlockListFragment {
|
||||
public class MiroGuideChannellistFragment extends ListFragment {
|
||||
private static final String TAG = "MiroGuideChannellistFragment";
|
||||
|
||||
private static final String ARG_FILTER = "filter";
|
||||
|
|
|
@ -21,7 +21,7 @@ public class FeedItemMenuHandler {
|
|||
|
||||
/**
|
||||
* Used by the MenuHandler to access different types of menus through one
|
||||
* interface (for example android.view.Menu and com.actionbarsherlock.Menu)
|
||||
* interface
|
||||
*/
|
||||
public interface MenuInterface {
|
||||
/**
|
||||
|
|
|
@ -5,10 +5,9 @@ import android.content.Intent;
|
|||
import android.net.Uri;
|
||||
import android.util.Log;
|
||||
|
||||
import com.actionbarsherlock.view.Menu;
|
||||
import com.actionbarsherlock.view.MenuInflater;
|
||||
import com.actionbarsherlock.view.MenuItem;
|
||||
|
||||
import android.view.Menu;
|
||||
import android.view.MenuInflater;
|
||||
import android.view.MenuItem;
|
||||
import de.danoeh.antennapod.AppConfig;
|
||||
import de.danoeh.antennapod.R;
|
||||
import de.danoeh.antennapod.activity.FeedInfoActivity;
|
||||
|
|
Loading…
Reference in New Issue