Organized imports, added drawables to navigation buttons
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 1.8 KiB |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 2.5 KiB |
After Width: | Height: | Size: 2.3 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 1.4 KiB |
|
@ -17,6 +17,7 @@
|
|||
android:layout_height="match_parent"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:background="?attr/borderless_button"
|
||||
android:padding="4dp"
|
||||
android:src="?attr/default_cover" />
|
||||
|
||||
<ImageButton
|
||||
|
@ -25,6 +26,7 @@
|
|||
android:layout_height="match_parent"
|
||||
android:layout_alignParentRight="true"
|
||||
android:background="?attr/borderless_button"
|
||||
android:padding="4dp"
|
||||
android:src="?attr/default_cover" />
|
||||
|
||||
<TextView
|
||||
|
|
|
@ -21,6 +21,8 @@
|
|||
<attr name="navigation_collapse" format="reference" />
|
||||
<attr name="navigation_refresh" format="reference" />
|
||||
<attr name="navigation_up" format="reference" />
|
||||
<attr name="navigation_shownotes" format="reference" />
|
||||
<attr name="navigation_chapters" format="reference" />
|
||||
<attr name="social_share" format="reference" />
|
||||
<attr name="stat_playlist" format="reference" />
|
||||
<attr name="type_audio" format="reference" />
|
||||
|
|
|
@ -23,6 +23,8 @@
|
|||
<item name="attr/navigation_collapse">@drawable/navigation_collapse</item>
|
||||
<item name="attr/navigation_refresh">@drawable/navigation_refresh</item>
|
||||
<item name="attr/navigation_up">@drawable/navigation_up</item>
|
||||
<item name="attr/navigation_shownotes">@drawable/navigation_shownotes</item>
|
||||
<item name="attr/navigation_chapters">@drawable/navigation_chapters</item>
|
||||
<item name="attr/social_share">@drawable/social_share</item>
|
||||
<item name="attr/stat_playlist">@drawable/stat_playlist</item>
|
||||
<item name="attr/type_audio">@drawable/type_audio</item>
|
||||
|
@ -71,6 +73,8 @@
|
|||
<item name="attr/navigation_collapse">@drawable/navigation_collapse_dark</item>
|
||||
<item name="attr/navigation_refresh">@drawable/navigation_refresh_dark</item>
|
||||
<item name="attr/navigation_up">@drawable/navigation_up_dark</item>
|
||||
<item name="attr/navigation_shownotes">@drawable/navigation_shownotes_dark</item>
|
||||
<item name="attr/navigation_chapters">@drawable/navigation_chapters_dark</item>
|
||||
<item name="attr/social_share">@drawable/social_share_dark</item>
|
||||
<item name="attr/stat_playlist">@drawable/stat_playlist_dark</item>
|
||||
<item name="attr/type_audio">@drawable/type_audio_dark</item>
|
||||
|
|
|
@ -11,7 +11,6 @@ import android.content.Context;
|
|||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.content.res.Configuration;
|
||||
import android.preference.PreferenceActivity;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.util.Log;
|
||||
import de.danoeh.antennapod.activity.OpmlImportActivity;
|
||||
|
|
|
@ -1,26 +1,24 @@
|
|||
package de.danoeh.antennapod.activity;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.content.res.TypedArray;
|
||||
import android.support.v4.app.Fragment;
|
||||
import android.support.v4.app.FragmentManager;
|
||||
import android.support.v4.app.FragmentStatePagerAdapter;
|
||||
import android.support.v4.app.FragmentTransaction;
|
||||
import android.support.v4.view.ViewPager;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.view.View.OnClickListener;
|
||||
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.SherlockFragment;
|
||||
import com.actionbarsherlock.app.SherlockListFragment;
|
||||
import com.viewpagerindicator.TabPageIndicator;
|
||||
|
||||
import de.danoeh.antennapod.AppConfig;
|
||||
import de.danoeh.antennapod.R;
|
||||
import de.danoeh.antennapod.adapter.ChapterListAdapter;
|
||||
import de.danoeh.antennapod.asynctask.FeedImageLoader;
|
||||
import de.danoeh.antennapod.feed.Chapter;
|
||||
import de.danoeh.antennapod.feed.FeedMedia;
|
||||
import de.danoeh.antennapod.feed.SimpleChapter;
|
||||
|
@ -44,8 +42,6 @@ public class AudioplayerActivity extends MediaplayerActivity {
|
|||
private SherlockListFragment chapterFragment;
|
||||
|
||||
private Fragment currentlyShownFragment;
|
||||
/** Fragment that was shown before the chapter fragment was displayed. */
|
||||
private int leftFragmentPosition = -1;
|
||||
private int currentlyShownPosition = -1;
|
||||
|
||||
private TextView txtvTitle;
|
||||
|
@ -57,7 +53,7 @@ public class AudioplayerActivity extends MediaplayerActivity {
|
|||
super();
|
||||
detachedFragments = new Fragment[NUM_CONTENT_FRAGMENTS];
|
||||
}
|
||||
|
||||
|
||||
private void resetFragmentView() {
|
||||
currentlyShownFragment = null;
|
||||
coverFragment = null;
|
||||
|
@ -155,11 +151,53 @@ public class AudioplayerActivity extends MediaplayerActivity {
|
|||
}
|
||||
ft.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN);
|
||||
ft.commit();
|
||||
updateNavButtonDrawable();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void updateNavButtonDrawable() {
|
||||
TypedArray drawables = obtainStyledAttributes(new int[] {
|
||||
R.attr.navigation_shownotes, R.attr.navigation_chapters });
|
||||
final FeedMedia media = controller.getMedia();
|
||||
if (butNavLeft != null && butNavRight != null && media != null) {
|
||||
switch (currentlyShownPosition) {
|
||||
case POS_COVER:
|
||||
butNavLeft.setScaleType(ScaleType.CENTER);
|
||||
butNavLeft.setImageDrawable(drawables.getDrawable(0));
|
||||
butNavRight.setImageDrawable(drawables.getDrawable(1));
|
||||
break;
|
||||
case POS_DESCR:
|
||||
butNavLeft.setScaleType(ScaleType.CENTER_CROP);
|
||||
butNavLeft.post(new Runnable() {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
FeedImageLoader.getInstance().loadThumbnailBitmap(
|
||||
media.getItem().getFeed().getImage(),
|
||||
butNavLeft);
|
||||
}
|
||||
});
|
||||
butNavRight.setImageDrawable(drawables.getDrawable(1));
|
||||
break;
|
||||
case POS_CHAPTERS:
|
||||
butNavLeft.setScaleType(ScaleType.CENTER_CROP);
|
||||
butNavLeft.post(new Runnable() {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
FeedImageLoader.getInstance().loadThumbnailBitmap(
|
||||
media.getItem().getFeed().getImage(),
|
||||
butNavLeft);
|
||||
}
|
||||
});
|
||||
butNavRight.setImageDrawable(drawables.getDrawable(0));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void setupGUI() {
|
||||
super.setupGUI();
|
||||
|
@ -176,27 +214,25 @@ public class AudioplayerActivity extends MediaplayerActivity {
|
|||
if (currentlyShownFragment == null
|
||||
|| currentlyShownPosition == POS_DESCR) {
|
||||
switchToFragment(POS_COVER);
|
||||
} else if (currentlyShownPosition == POS_COVER){
|
||||
} else if (currentlyShownPosition == POS_COVER) {
|
||||
switchToFragment(POS_DESCR);
|
||||
} else if (currentlyShownPosition == POS_CHAPTERS) {
|
||||
switchToFragment(leftFragmentPosition);
|
||||
leftFragmentPosition = -1;
|
||||
switchToFragment(POS_COVER);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
butNavRight.setOnClickListener(new OnClickListener() {
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (currentlyShownPosition == POS_CHAPTERS) {
|
||||
switchToFragment(leftFragmentPosition);
|
||||
leftFragmentPosition = -1;
|
||||
switchToFragment(POS_DESCR);
|
||||
} else {
|
||||
leftFragmentPosition = currentlyShownPosition;
|
||||
switchToFragment(POS_CHAPTERS);
|
||||
}
|
||||
}});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -5,11 +5,8 @@ import java.util.ArrayList;
|
|||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
|
||||
import org.apache.commons.io.FileUtils;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.AlertDialog.Builder;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
|
|
|
@ -6,7 +6,6 @@ import android.annotation.SuppressLint;
|
|||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
import android.os.AsyncTask;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
|
|
|
@ -2,15 +2,12 @@ package de.danoeh.antennapod.activity;
|
|||
|
||||
import java.io.File;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.content.res.Resources.Theme;
|
||||
import android.os.Bundle;
|
||||
import android.preference.Preference;
|
||||
import android.preference.Preference.OnPreferenceChangeListener;
|
||||
import android.preference.Preference.OnPreferenceClickListener;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.util.Log;
|
||||
|
||||
import com.actionbarsherlock.app.SherlockPreferenceActivity;
|
||||
|
|
|
@ -2,11 +2,11 @@ package de.danoeh.antennapod.adapter;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import android.content.Context;
|
||||
import android.widget.ArrayAdapter;
|
||||
import de.danoeh.antennapod.PodcastApp;
|
||||
import de.danoeh.antennapod.feed.FeedItem;
|
||||
import de.danoeh.antennapod.util.EpisodeFilter;
|
||||
import android.content.Context;
|
||||
import android.widget.ArrayAdapter;
|
||||
|
||||
public abstract class AbstractFeedItemlistAdapter extends
|
||||
ArrayAdapter<FeedItem> {
|
||||
|
|
|
@ -3,7 +3,6 @@ package de.danoeh.antennapod.adapter;
|
|||
import java.util.List;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Color;
|
||||
import android.text.Layout;
|
||||
import android.text.Selection;
|
||||
import android.text.Spannable;
|
||||
|
|
|
@ -7,28 +7,20 @@ import android.content.Context;
|
|||
import android.content.res.TypedArray;
|
||||
import android.graphics.Typeface;
|
||||
import android.text.format.DateUtils;
|
||||
import android.util.Log;
|
||||
import android.view.ContextMenu;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.MenuInflater;
|
||||
import android.view.View;
|
||||
import android.view.ContextMenu.ContextMenuInfo;
|
||||
import android.view.View.OnClickListener;
|
||||
import android.view.View.OnCreateContextMenuListener;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.Adapter;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.ImageButton;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
import de.danoeh.antennapod.PodcastApp;
|
||||
import de.danoeh.antennapod.R;
|
||||
import de.danoeh.antennapod.feed.FeedItem;
|
||||
import de.danoeh.antennapod.feed.FeedManager;
|
||||
import de.danoeh.antennapod.feed.MediaType;
|
||||
import de.danoeh.antennapod.storage.DownloadRequester;
|
||||
import de.danoeh.antennapod.util.Converter;
|
||||
import de.danoeh.antennapod.util.EpisodeFilter;
|
||||
import de.danoeh.antennapod.util.ThemeUtils;
|
||||
|
||||
public class FeedItemlistAdapter extends AbstractFeedItemlistAdapter {
|
||||
|
|
|
@ -1,13 +1,11 @@
|
|||
package de.danoeh.antennapod.fragment;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.provider.MediaStore.Audio.AudioColumns;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.actionbarsherlock.app.SherlockFragment;
|
||||
|
||||
|
|
|
@ -5,12 +5,10 @@ import org.apache.commons.lang3.StringEscapeUtils;
|
|||
import android.annotation.SuppressLint;
|
||||
import android.app.Activity;
|
||||
import android.content.res.TypedArray;
|
||||
import android.database.Cursor;
|
||||
import android.os.AsyncTask;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.util.TypedValue;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
|
|
@ -9,22 +9,14 @@ import android.content.IntentFilter;
|
|||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.view.ContextMenu;
|
||||
import android.view.ContextMenu.ContextMenuInfo;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.MenuInflater;
|
||||
import android.view.View;
|
||||
import android.view.ContextMenu.ContextMenuInfo;
|
||||
import android.view.View.OnClickListener;
|
||||
import android.view.View.OnCreateContextMenuListener;
|
||||
import android.view.View.OnLongClickListener;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.AdapterView;
|
||||
import android.widget.AdapterView.OnItemLongClickListener;
|
||||
import android.widget.ListView;
|
||||
|
||||
import com.actionbarsherlock.app.SherlockListFragment;
|
||||
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;
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package de.danoeh.antennapod.service.download;
|
||||
|
||||
import android.os.Handler;
|
||||
import de.danoeh.antennapod.R;
|
||||
import de.danoeh.antennapod.asynctask.DownloadStatus;
|
||||
|
||||
|
|
|
@ -5,7 +5,6 @@ import java.util.concurrent.TimeUnit;
|
|||
import org.xml.sax.Attributes;
|
||||
|
||||
import android.util.Log;
|
||||
|
||||
import de.danoeh.antennapod.AppConfig;
|
||||
import de.danoeh.antennapod.feed.FeedMedia;
|
||||
import de.danoeh.antennapod.syndication.handler.HandlerState;
|
||||
|
|
|
@ -5,7 +5,6 @@ import java.io.File;
|
|||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Environment;
|
||||
import android.os.StatFs;
|
||||
import android.util.Log;
|
||||
import de.danoeh.antennapod.AppConfig;
|
||||
|
|
|
@ -2,7 +2,6 @@ package de.danoeh.antennapod.util.id3reader;
|
|||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.PushbackInputStream;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.charset.Charset;
|
||||
|
||||
|
|
|
@ -3,16 +3,9 @@ package de.danoeh.antennapod.util.menuhandler;
|
|||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
import android.os.Debug;
|
||||
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.asynctask.FlattrClickWorker;
|
||||
import de.danoeh.antennapod.feed.FeedItem;
|
||||
import de.danoeh.antennapod.feed.FeedItem.State;
|
||||
import de.danoeh.antennapod.feed.FeedManager;
|
||||
import de.danoeh.antennapod.storage.DownloadRequestException;
|
||||
import de.danoeh.antennapod.storage.DownloadRequester;
|
||||
|
|