Merge branch 'develop' into rxjava2

This commit is contained in:
ByteHamster 2018-12-26 08:40:40 +01:00
commit bb4b4655d2
278 changed files with 2209 additions and 977 deletions

View File

@ -33,6 +33,7 @@ trans.kn_IN = core/src/main/res/values-kn-rIN/strings.xml
trans.ko = core/src/main/res/values-ko/strings.xml
trans.ko_KR = core/src/main/res/values-ko-rKR/strings.xml
trans.lt = core/src/main/res/values-lt/strings.xml
trans.mk = core/src/main/res/values-mk/strings.xml
trans.nb = core/src/main/res/values-nb/strings.xml
trans.no = core/src/main/res/values-no/strings.xml
trans.nl = core/src/main/res/values-nl/strings.xml

View File

@ -1,10 +1,16 @@
Change Log
==========
Version 1.6.6
Version 1.7.1
-------------
* Experimental new media player (ExoPlayer)
* Fix for database corruption
Version 1.7.0
-------------
* NEW ExoPlayer (experimental)
* Fix for Bluetooth Forward (Oreo)
* Preference redesign + search
* Notification improvements

View File

@ -1,107 +1,168 @@
DEVELOPERS
==========
Alan Orth
Alexander Terczka
alifeflow
amhokies
Anders Bo Rasmussen
Andrew Gaul
Andrey Krutov
Anthony Lieuallen
axq
brad
ByteHamster
Cameron Banga
Christian Ludwig
Christopher Szucko
Cj Malone
Colin Willson
Cédric Cabessa
Danial Klimkin
Daniel Oeh
David Carver
David Reiss
Dean Brettle
dethstar
Dirk Mueller
Domingos Lopes
drabux
egsavage
EirikV
Eoin Mcloughlin
eraymond
Ercan Erden
Falko Lehmann
Hannes Achleitner
hannesa2
Hanno Zulla
heckler01
Holger Jeromin
Humberto Fraga
InsidE
James Falcon
Jan Niehusmann
Jens Klingenberg
Jens Müller
Johan Liesén
Kaligule
Katrin Leinweber
keunes
Kevin Dalley
Koen Glotzbach
kroegerama
Kurian Vithayathil
LatinSuD
Lee Yeong Khang
lightonflux
ligi
Luis Cruz
Marc Lasson
Martin Fietz
Martin Olsson
mat tso
mateoeh
Matthew Gaffen
Matthias Schütz
Maurice Gilden
Meir Schwarz
Michael Kaiser
Michael Scarito
Mike Chelen
minusf
MolarAmbiguity
Mounir Lamouri
mr-intj
Nis Wechselberg
Oliver Crow
orelogo
Paul Ortyl
Raghul
Raghul Jagannathan
recalculated
Ross Harrison
Sam Lee
Sam Whited
saqura
Selivanov Pavel
Serge
Seth Golub
sevenmaster
Shantana Hardy
Simon Danner
Simon Rutishauser
Simon Schubert
Soso Tughushi
Spencer Visick
Stefan Mitrik
Terence Eden
Tim Butram
Tobias Preuss
Tom Hennen
Tom Tom
tommy watson
tuxayo
twiceyuan
Udi Finkelstein
VarunBarad
volhol
Volker Hollich
WangYun
William Seemann
ydinath
TRANSLATORS
===========
Arabic: abuzar3.khalid, iDemo
Azerbaijani: phoenixar
Catalan: dvd1985, javiercoll, xc70
Catalan (Spain): javiercoll
Chinese (China): bebeauties38, dudeG, Felix2yu, gaohongyuan, Guaidaodl, linxiangyu, molisiye, tupunco, wongsyrone, yangyang, YogaGuru
Arabic: abdelrahman.fahem93, abdunnasir, abuzar3.khalid, desha, iDemo, mohamedagamy, msahouli, nabilMaghura
Asturian (Spain): enolp
Azerbaijani: danieloeh, kotfenix
Bulgarian: solusitor
Catalan: dvd1985, exort12, javiercoll, lambdani, marcmetallextrem, xc70
Catalan (Spain): 00c0c0, javiercoll
Chinese: dillonbecker, RainSlide, xukeek, yangyang
Chinese (China): bebeauties38, domingos86, dudeG, ErlichLiu, Felix2yu, gaohongyuan, Guaidaodl, Huck0, iconteral, jhxie, kavdx, kyleehee, linxiangyu, molisiye, owen8877, RainSlide, stellaxuyi, tupunco, wi24rd, wongsyrone, xukeek, yangyang, yiqiok, YogaGuru
Chinese (Taiwan): gugod, nigelinux, pggdt, ymhuang0808
Czech (Czech Republic): elich, Hanzmeister, mcepl, petnek, svetlemodry
Danish: CasperHN
Dutch: e2jk, glotzbach, rwv
Danish: CasperHN, jhertel
Dutch: e2jk, glotzbach, rwv, Vistaus
English: mfietz, sterylmreep
Estonian: Eraser
Finnish: danieloeh
French: cactux, ChaoticMind, clombion, e2jk, lacouture, Matth78, mfietz, repat, sterylmreep, vcariven
German: 112358, altegedanken, bitsunited, ChaoticMind, Chaquotay, dab0015, DJaeger, HolgerJeromin, kalei, lohmann, mfietz, nilso, picsel2, repat, SAPlayer, schafia, ypid
Greek: AlexanderKanetakis
Hebrew (Israel): amir.dafnyman
Hindi (India): purple.coder, siddhusengar
Hungarian: glatz.balazs, naren93
Indonesian: luke137, silvanael16
Italian: aalex70, apanontin, Guybrush88, theloca95
Italian (Italy): aalex70, apanontin, Guybrush88, m.chinni, theloca95
French: cactux, ChaoticMind, clombion, e2jk, lacouture, Matth78, mfietz, Poussinou, PRIMOKORN, repat, sterylmreep, TacoTheDank, Tilwa, vcariven, whenrow
Galician: antiparvos, pikamoku, Raichely
German: 112358, altegedanken, barilla, bitsunited, Buggi, ceving, ChaoticMind, Chaquotay, dab0015, dadosch, DerSilly, DJaeger, elkangaroo, enz, fidel, finsterwalder, Foso, GNi33, HolgerJeromin, kalei, lohmann, LostInWeb, mfietz, nilso, repat, SAPlayer, schafia, Schroedingberg, sevenmaster, sucaml, Teaspoon, theonlytruth, weltenwort, Wyrrrd, ypid
Greek: antonist, danieloeh, hua2016s, MSavoritias, pavlosv
Hebrew (Israel): amir.dafnyman, E1i9, mongoose4004, pinkasey, rellieberman, Yaron, הלוי11
Hindi (India): nmabhinandan, purple.coder, siddhusengar
Hungarian: glatz.balazs, lna91, naren93, tszauer, ttyborg42
Icelandic: marthjod
Indonesian: jff, luke137, rezafaiza, silvanael16
Italian: aalex70, allin, apanontin, Bonnee, giuseppep, Guybrush88, marco_pag, neonsoftware, sevenmaster, theloca95
Italian (Italy): aalex70, allin, apanontin, Bonnee, buongiorgio, giuseppep, Guybrush88, m.chinni, neonsoftware, nixxo, sevenmaster, theloca95
Japanese: Naofumi, RACER1, sh3llc4t, TranslatorG
Kannada (India): thejeshgn
Korean: changwoo, halcyonest, seungrye, skcha
Korean: changwoo, seungrye, skcha
Korean (South Korea): changwoo, seungrye
Lithuanian: naglis
Macedonian: krisfremen
Norwegian: hakonanes, timbast
Norwegian Bokmål: hakonanes
Norwegian Bokmål (Norway): hakonanes, kongk, swordfighter, timbast
Polish: Iwangelion, maniexx, thedead4fun
Polish (Poland): Iwangelion, lomapur, maniexx, Mephistofeles, shark103, tyle
Portuguese: emansije, smarquespt
Portuguese (Brazil): alexupits, edman, Firmino, lipefire, lucasmotacr, mbaltar, rogervezaro, SamWilliam, silvanael16
Romanian (Romania): corneliu.e, fuzzmz
Russian (Russia): astra1, Duke_Raven, mercutiy, null, overmind88, phoenixar, s.chebotar, skvheadless, whereisthetea, zhenya97
Spanish: coperfix, dvd1985, Fitoschido, frandavid100, javiercoll, LatinSuD, tres.14159
Spanish (Spain): dvd1985, e2jk, frandavid100
Swedish (Sweden): albin.brantin, Bio, bpnilsson, ChaoticMind, Lumen, nilso, SharpMelon, TwoD
Turkish: basarancaner, brsata, overbite
Ukrainian (Ukraine): older, zhenya97
Vietnamese: ppanhh, vietnamesel10n
Norwegian Bokmål: corkie, hakonanes
Norwegian Bokmål (Norway): corkie, hakonanes, kongk, timbast
Persian: ahangarha, F7D
Polish: Iwangelion, maniexx, mfloryan, thedead4fun
Polish (Poland): d6210809, Iwangelion, lomapur, mandlus, maniexx, Mephistofeles, shark103, tyle
Portuguese: domingos86, emansije, smarquespt
Portuguese (Brazil): alexupits, alysonborges, arua, caioau, carlo_valente, castrors, deandreamatias, edman, Firmino, jackmiras, Junin, lipefire, lluccia, lucasmotacr, mbaltar, rogervezaro, RubeensVinicius, SamWilliam, silvanael16
Romanian (Romania): corneliu.e, fuzzmz, ralienpp
Russian (Russia): astra1, btimofeev, Duke_Raven, GaynullinDima, MegMasters98, mercutiy, null, overmind88, s.chebotar, shams4real, skvheadless, un_logic, whereisthetea, zhenya97
Slovenian (Slovenia): panter23
Spanish: AleksSyntek, coperfix, deandreamatias, domingos86, dvd1985, Fitoschido, frandavid100, hard_ware, javiercoll, Juanmuto, lambdani, LatinSuD, leogrignafini, palopezv, TacoTheDank, tres.14159, wakutiteo
Spanish (Spain): dvd1985, e2jk, frandavid100, hard_ware, palopezv, Raichely, TacoTheDank
Swahili (Kenya): BonfaceKilz
Swedish (Sweden): albin.brantin, Bio, bpnilsson, ChaoticMind, jony08, nilso, SharpMelon, TwoD
Telugu: veeven
Turkish: basarancaner, brsata, Erdy, golcuk, overbite
Ukrainian (Ukraine): older, sergiyr, zhenya97
Vietnamese: abnvolk, nguyenvui, ppanhh, vietnamesel10n
Vietnamese (Vietnam): bizover

View File

@ -43,7 +43,7 @@ android {
versionCode getMyVersionCode()
versionName "${getMyVersionName()}"
testApplicationId "de.test.antennapod"
testInstrumentationRunner "de.test.antennapod.AntennaPodTestRunner"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
generatedDensities = []
}
@ -120,6 +120,10 @@ android {
additionalParameters "--no-version-vectors"
}
testOptions {
animationsDisabled = true
}
flavorDimensions "market"
productFlavors {
free {
@ -150,6 +154,7 @@ dependencies {
implementation "com.android.support:gridlayout-v7:$supportVersion"
implementation "com.android.support:percent:$supportVersion"
implementation "com.android.support:recyclerview-v7:$supportVersion"
compileOnly 'com.google.android.wearable:wearable:2.2.0'
implementation "org.apache.commons:commons-lang3:$commonslangVersion"
implementation("org.shredzone.flattr4j:flattr4j-core:$flattr4jVersion") {
exclude group: "org.json", module: "json"
@ -182,6 +187,11 @@ dependencies {
implementation 'com.github.ByteHamster:SearchPreference:v1.0.8'
androidTestImplementation "com.jayway.android.robotium:robotium-solo:$robotiumSoloVersion"
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-contrib:3.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-intents:3.0.2'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test:rules:1.0.2'
}
play {

View File

@ -71,8 +71,6 @@
-dontwarn android.support.v7.**
-dontwarn com.google.android.wearable.**
-keepattributes *Annotation*
-keep class org.shredzone.flattr4j.** { *; }
-dontwarn org.shredzone.flattr4j.**
@ -94,6 +92,7 @@
-keepclassmembers class ** {
public void onEvent*(**);
}
-keep class de.danoeh.antennapod.core.event.*
# android-iconify
-keep class com.joanzapata.** { *; }
@ -125,3 +124,13 @@
-keep class com.squareup.moshi.** { *; }
-keep interface com.squareup.moshi.** { *; }
-keep public class retrofit2.adapter.rxjava.RxJavaCallAdapterFactory { *; }
# awaitility
-dontwarn java.beans.BeanInfo
-dontwarn java.beans.Introspector
-dontwarn java.beans.IntrospectionException
-dontwarn java.beans.PropertyDescriptor
-dontwarn java.lang.management.ManagementFactory
-dontwarn java.lang.management.ThreadInfo
-dontwarn java.lang.management.ThreadMXBean

View File

@ -1,18 +0,0 @@
package de.test.antennapod;
import android.test.InstrumentationTestRunner;
import android.test.suitebuilder.TestSuiteBuilder;
import junit.framework.TestSuite;
public class AntennaPodTestRunner extends InstrumentationTestRunner {
@Override
public TestSuite getAllTests() {
return new TestSuiteBuilder(AntennaPodTestRunner.class)
.includeAllPackagesUnderHere()
.excludePackages("de.test.antennapod.gpodnet")
.build();
}
}

View File

@ -0,0 +1,38 @@
package de.test.antennapod;
import org.hamcrest.BaseMatcher;
import org.hamcrest.Description;
import org.hamcrest.Matcher;
import java.util.concurrent.atomic.AtomicInteger;
public class NthMatcher {
public static <T> Matcher<T> first(final Matcher<T> matcher) {
return nth(matcher, 1);
}
public static <T> Matcher<T> second(final Matcher<T> matcher) {
return nth(matcher, 2);
}
private static <T> Matcher<T> nth(final Matcher<T> matcher, final int index) {
return new BaseMatcher<T>() {
AtomicInteger count = new AtomicInteger(0);
@Override
public boolean matches(final Object item) {
if (matcher.matches(item)) {
if (count.incrementAndGet() == index) {
return true;
}
}
return false;
}
@Override
public void describeTo(final Description description) {
description.appendText("should return first matching item");
}
};
}
}

View File

@ -1,6 +1,7 @@
package de.test.antennapod.feed;
import android.test.AndroidTestCase;
import de.danoeh.antennapod.core.feed.FeedItem;
public class FeedItemTest extends AndroidTestCase {

View File

@ -1,43 +1,43 @@
package de.test.antennapod.gpodnet;
import android.test.AndroidTestCase;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import android.support.test.runner.AndroidJUnit4;
import de.danoeh.antennapod.core.gpoddernet.GpodnetService;
import de.danoeh.antennapod.core.gpoddernet.GpodnetServiceException;
import de.danoeh.antennapod.core.gpoddernet.model.GpodnetDevice;
import de.danoeh.antennapod.core.gpoddernet.model.GpodnetTag;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import static java.util.Collections.singletonList;
/**
* Test class for GpodnetService
*/
public class GPodnetServiceTest extends AndroidTestCase {
@Ignore
@RunWith(AndroidJUnit4.class)
public class GPodnetServiceTest {
private GpodnetService service;
private static final String USER = "";
private static final String PW = "";
@Override
protected void setUp() throws Exception {
super.setUp();
@Before
protected void setUp() {
service = new GpodnetService();
}
@Override
protected void tearDown() throws Exception {
super.tearDown();
}
private void authenticate() throws GpodnetServiceException {
service.authenticate(USER, PW);
}
@Test
public void testUploadSubscription() throws GpodnetServiceException {
authenticate();
ArrayList<String> l = new ArrayList<>();
@ -45,6 +45,7 @@ public class GPodnetServiceTest extends AndroidTestCase {
service.uploadSubscriptions(USER, "radio", l);
}
@Test
public void testUploadSubscription2() throws GpodnetServiceException {
authenticate();
ArrayList<String> l = new ArrayList<>();
@ -53,6 +54,7 @@ public class GPodnetServiceTest extends AndroidTestCase {
service.uploadSubscriptions(USER, "radio", l);
}
@Test
public void testUploadChanges() throws GpodnetServiceException {
authenticate();
String[] URLS = {"http://bitsundso.de/feed", "http://gamesundso.de/feed", "http://cre.fm/feed/mp3/", "http://freakshow.fm/feed/m4a/"};
@ -63,53 +65,63 @@ public class GPodnetServiceTest extends AndroidTestCase {
service.uploadChanges(USER, "radio", added, removed);
}
@Test
public void testGetSubscriptionChanges() throws GpodnetServiceException {
authenticate();
service.getSubscriptionChanges(USER, "radio", 1362322610L);
}
@Test
public void testGetSubscriptionsOfUser()
throws GpodnetServiceException {
authenticate();
service.getSubscriptionsOfUser(USER);
}
@Test
public void testGetSubscriptionsOfDevice()
throws GpodnetServiceException {
authenticate();
service.getSubscriptionsOfDevice(USER, "radio");
}
@Test
public void testConfigureDevices() throws GpodnetServiceException {
authenticate();
service.configureDevice(USER, "foo", "This is an updated caption",
GpodnetDevice.DeviceType.LAPTOP);
}
@Test
public void testGetDevices() throws GpodnetServiceException {
authenticate();
service.getDevices(USER);
}
@Test
public void testGetSuggestions() throws GpodnetServiceException {
authenticate();
service.getSuggestions(10);
}
@Test
public void testTags() throws GpodnetServiceException {
service.getTopTags(20);
}
@Test
public void testPodcastForTags() throws GpodnetServiceException {
List<GpodnetTag> tags = service.getTopTags(20);
service.getPodcastsForTag(tags.get(1),
10);
}
@Test
public void testSearch() throws GpodnetServiceException {
service.searchPodcasts("linux", 64);
}
@Test
public void testToplist() throws GpodnetServiceException {
service.getPodcastToplist(10);
}

View File

@ -5,7 +5,6 @@ import android.test.FlakyTest;
import android.test.InstrumentationTestCase;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Date;
import java.util.List;

View File

@ -21,6 +21,7 @@ import de.danoeh.antennapod.core.util.flattr.FlattrStatus;
*/
class DBTestUtils {
private DBTestUtils(){}
/**
* Use this method when tests don't involve chapters.
*/

View File

@ -18,7 +18,6 @@ import java.util.concurrent.TimeoutException;
import de.danoeh.antennapod.core.feed.Feed;
import de.danoeh.antennapod.core.feed.FeedItem;
import de.danoeh.antennapod.core.feed.FeedMedia;
import de.danoeh.antennapod.core.feed.SimpleChapter;
import de.danoeh.antennapod.core.storage.DBReader;
import de.danoeh.antennapod.core.storage.DBWriter;
import de.danoeh.antennapod.core.storage.PodDBAdapter;

View File

@ -2,16 +2,14 @@ package de.test.antennapod.ui;
import android.content.Context;
import android.content.SharedPreferences;
import android.test.ActivityInstrumentationTestCase2;
import android.test.FlakyTest;
import android.support.test.espresso.contrib.DrawerActions;
import android.support.test.espresso.intent.Intents;
import android.support.test.filters.FlakyTest;
import android.support.test.rule.ActivityTestRule;
import android.support.test.runner.AndroidJUnit4;
import android.widget.ListView;
import com.robotium.solo.Solo;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import com.robotium.solo.Timeout;
import de.danoeh.antennapod.R;
import de.danoeh.antennapod.activity.MainActivity;
import de.danoeh.antennapod.activity.OnlineFeedViewActivity;
@ -23,25 +21,46 @@ import de.danoeh.antennapod.fragment.DownloadsFragment;
import de.danoeh.antennapod.fragment.EpisodesFragment;
import de.danoeh.antennapod.fragment.PlaybackHistoryFragment;
import de.danoeh.antennapod.fragment.QueueFragment;
import org.junit.After;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import static android.support.test.InstrumentationRegistry.getInstrumentation;
import static android.support.test.espresso.Espresso.onView;
import static android.support.test.espresso.action.ViewActions.click;
import static android.support.test.espresso.action.ViewActions.longClick;
import static android.support.test.espresso.intent.Intents.intended;
import static android.support.test.espresso.intent.matcher.IntentMatchers.hasComponent;
import static android.support.test.espresso.matcher.ViewMatchers.withId;
import static android.support.test.espresso.matcher.ViewMatchers.withText;
import static de.test.antennapod.NthMatcher.first;
import static junit.framework.TestCase.assertTrue;
import static org.junit.Assert.assertEquals;
/**
* User interface tests for MainActivity
*/
public class MainActivityTest extends ActivityInstrumentationTestCase2<MainActivity> {
@RunWith(AndroidJUnit4.class)
public class MainActivityTest {
private Solo solo;
private UITestUtils uiTestUtils;
private SharedPreferences prefs;
public MainActivityTest() {
super(MainActivity.class);
}
@Rule
public ActivityTestRule<MainActivity> mActivityRule = new ActivityTestRule<>(MainActivity.class);
@Override
protected void setUp() throws Exception {
super.setUp();
Context context = getInstrumentation().getTargetContext();
@Before
public void setUp() throws IOException {
Intents.init();
Context context = mActivityRule.getActivity();
uiTestUtils = new UITestUtils(context);
uiTestUtils.setup();
@ -54,30 +73,26 @@ public class MainActivityTest extends ActivityInstrumentationTestCase2<MainActiv
// override first launch preference
// do this BEFORE calling getActivity()!
prefs = getInstrumentation().getTargetContext().getSharedPreferences(MainActivity.PREF_NAME, Context.MODE_PRIVATE);
prefs = context.getSharedPreferences(MainActivity.PREF_NAME, Context.MODE_PRIVATE);
prefs.edit().putBoolean(MainActivity.PREF_IS_FIRST_LAUNCH, false).commit();
solo = new Solo(getInstrumentation(), getActivity());
solo = new Solo(getInstrumentation(), mActivityRule.getActivity());
}
@Override
protected void tearDown() throws Exception {
@After
public void tearDown() throws Exception {
uiTestUtils.tearDown();
solo.finishOpenedActivities();
Intents.release();
PodDBAdapter.deleteDatabase();
// reset preferences
prefs.edit().clear().commit();
super.tearDown();
}
private void openNavDrawer() {
solo.clickOnImageButton(0);
getInstrumentation().waitForIdleSync();
onView(withId(R.id.drawer_layout)).perform(DrawerActions.open());
}
@Test
public void testAddFeed() throws Exception {
uiTestUtils.addHostedFeedData();
final Feed feed = uiTestUtils.hostedFeeds.get(0);
@ -89,10 +104,12 @@ public class MainActivityTest extends ActivityInstrumentationTestCase2<MainActiv
solo.waitForView(R.id.butSubscribe);
assertEquals(solo.getString(R.string.subscribe_label), solo.getButton(0).getText().toString());
solo.clickOnButton(0);
solo.waitForText(solo.getString(R.string.subscribed_label));
assertTrue(solo.waitForText(solo.getString(R.string.open_podcast), 0, Timeout.getLargeTimeout(), false));
}
@FlakyTest(tolerance = 3)
@Test
@FlakyTest
public void testClickNavDrawer() throws Exception {
uiTestUtils.addLocalFeedData(false);
@ -150,57 +167,60 @@ public class MainActivityTest extends ActivityInstrumentationTestCase2<MainActiv
return ((MainActivity) solo.getCurrentActivity()).getSupportActionBar().getTitle().toString();
}
@SuppressWarnings("unchecked")
@FlakyTest(tolerance = 3)
@Test
@FlakyTest
public void testGoToPreferences() {
openNavDrawer();
solo.clickOnText(solo.getString(R.string.settings_label));
solo.waitForActivity(PreferenceActivity.class);
onView(withText(R.string.settings_label)).perform(click());
intended(hasComponent(PreferenceActivity.class.getName()));
}
@Test
public void testDrawerPreferencesHideSomeElements() {
UserPreferences.setHiddenDrawerItems(new ArrayList<>());
openNavDrawer();
solo.clickLongOnText(solo.getString(R.string.queue_label));
solo.waitForDialogToOpen();
solo.clickOnText(solo.getString(R.string.episodes_label));
solo.clickOnText(solo.getString(R.string.playback_history_label));
solo.clickOnText(solo.getString(R.string.confirm_label));
solo.waitForDialogToClose();
onView(first(withText(R.string.queue_label))).perform(longClick());
onView(withText(R.string.episodes_label)).perform(click());
onView(withText(R.string.playback_history_label)).perform(click());
onView(withText(R.string.confirm_label)).perform(click());
List<String> hidden = UserPreferences.getHiddenDrawerItems();
assertEquals(2, hidden.size());
assertTrue(hidden.contains(EpisodesFragment.TAG));
assertTrue(hidden.contains(PlaybackHistoryFragment.TAG));
}
@Test
public void testDrawerPreferencesUnhideSomeElements() {
List<String> hidden = Arrays.asList(PlaybackHistoryFragment.TAG, DownloadsFragment.TAG);
UserPreferences.setHiddenDrawerItems(hidden);
openNavDrawer();
solo.clickLongOnText(solo.getString(R.string.queue_label));
solo.waitForDialogToOpen();
solo.clickOnText(solo.getString(R.string.downloads_label));
solo.clickOnText(solo.getString(R.string.queue_label));
solo.clickOnText(solo.getString(R.string.confirm_label));
solo.waitForDialogToClose();
onView(first(withText(R.string.queue_label))).perform(longClick());
onView(withText(R.string.downloads_label)).perform(click());
onView(withText(R.string.queue_label)).perform(click());
onView(withText(R.string.confirm_label)).perform(click());
hidden = UserPreferences.getHiddenDrawerItems();
assertEquals(2, hidden.size());
assertTrue(hidden.contains(QueueFragment.TAG));
assertTrue(hidden.contains(PlaybackHistoryFragment.TAG));
}
@Test
public void testDrawerPreferencesHideAllElements() {
UserPreferences.setHiddenDrawerItems(new ArrayList<>());
String[] titles = getInstrumentation().getTargetContext().getResources().getStringArray(R.array.nav_drawer_titles);
String[] titles = mActivityRule.getActivity().getResources().getStringArray(R.array.nav_drawer_titles);
openNavDrawer();
solo.clickLongOnText(solo.getString(R.string.queue_label));
solo.waitForDialogToOpen();
onView(first(withText(R.string.queue_label))).perform(longClick());
for (String title : titles) {
solo.clickOnText(title);
onView(first(withText(title))).perform(click());
}
solo.clickOnText(solo.getString(R.string.confirm_label));
solo.waitForDialogToClose();
onView(withText(R.string.confirm_label)).perform(click());
List<String> hidden = UserPreferences.getHiddenDrawerItems();
assertEquals(titles.length, hidden.size());
for (String tag : MainActivity.NAV_DRAWER_TAGS) {
@ -208,21 +228,85 @@ public class MainActivityTest extends ActivityInstrumentationTestCase2<MainActiv
}
}
@Test
public void testDrawerPreferencesHideCurrentElement() {
UserPreferences.setHiddenDrawerItems(new ArrayList<>());
openNavDrawer();
onView(withText(R.string.downloads_label)).perform(click());
openNavDrawer();
onView(first(withText(R.string.queue_label))).perform(longClick());
onView(first(withText(R.string.downloads_label))).perform(click());
onView(withText(R.string.confirm_label)).perform(click());
openNavDrawer();
String downloads = solo.getString(R.string.downloads_label);
solo.clickOnText(downloads);
solo.waitForView(android.R.id.list);
openNavDrawer();
solo.clickLongOnText(downloads);
solo.waitForDialogToOpen();
solo.clickOnText(downloads);
solo.clickOnText(solo.getString(R.string.confirm_label));
solo.waitForDialogToClose();
List<String> hidden = UserPreferences.getHiddenDrawerItems();
assertEquals(1, hidden.size());
assertTrue(hidden.contains(DownloadsFragment.TAG));
}
@Test
public void testBackButtonBehaviorGoToPage() {
openNavDrawer();
solo.clickOnText(solo.getString(R.string.settings_label));
solo.clickOnText(solo.getString(R.string.user_interface_label));
solo.clickOnText(solo.getString(R.string.pref_back_button_behavior_title));
solo.clickOnText(solo.getString(R.string.back_button_go_to_page));
solo.waitForDialogToOpen();
solo.clickOnText(solo.getString(R.string.subscriptions_label));
solo.clickOnText(solo.getString(R.string.confirm_label));
solo.goBackToActivity(MainActivity.class.getSimpleName());
solo.goBack();
assertEquals(solo.getString(R.string.subscriptions_label), getActionbarTitle());
}
@Test
public void testBackButtonBehaviorOpenDrawer() {
openNavDrawer();
solo.clickOnText(solo.getString(R.string.settings_label));
solo.clickOnText(solo.getString(R.string.user_interface_label));
solo.clickOnText(solo.getString(R.string.pref_back_button_behavior_title));
solo.clickOnText(solo.getString(R.string.back_button_open_drawer));
solo.goBackToActivity(MainActivity.class.getSimpleName());
solo.goBack();
assertTrue(((MainActivity)solo.getCurrentActivity()).isDrawerOpen());
}
@Test
public void testBackButtonBehaviorDoubleTap() {
openNavDrawer();
solo.clickOnText(solo.getString(R.string.settings_label));
solo.clickOnText(solo.getString(R.string.user_interface_label));
solo.clickOnText(solo.getString(R.string.pref_back_button_behavior_title));
solo.clickOnText(solo.getString(R.string.back_button_double_tap));
solo.goBackToActivity(MainActivity.class.getSimpleName());
solo.goBack();
solo.goBack();
assertTrue(solo.getCurrentActivity().isFinishing());
}
@Test
public void testBackButtonBehaviorPrompt() {
openNavDrawer();
solo.clickOnText(solo.getString(R.string.settings_label));
solo.clickOnText(solo.getString(R.string.user_interface_label));
solo.clickOnText(solo.getString(R.string.pref_back_button_behavior_title));
solo.clickOnText(solo.getString(R.string.back_button_show_prompt));
solo.goBackToActivity(MainActivity.class.getSimpleName());
solo.goBack();
solo.clickOnText(solo.getString(R.string.yes));
solo.waitForDialogToClose();
assertTrue(solo.getCurrentActivity().isFinishing());
}
@Test
public void testBackButtonBehaviorDefault() {
openNavDrawer();
solo.clickOnText(solo.getString(R.string.settings_label));
solo.clickOnText(solo.getString(R.string.user_interface_label));
solo.clickOnText(solo.getString(R.string.pref_back_button_behavior_title));
solo.clickOnText(solo.getString(R.string.back_button_default));
solo.goBackToActivity(MainActivity.class.getSimpleName());
solo.goBack();
assertTrue(solo.getCurrentActivity().isFinishing());
}
}

View File

@ -59,7 +59,7 @@ public class PlaybackSonicTest extends ActivityInstrumentationTestCase2<MainActi
.clear()
.putBoolean(UserPreferences.PREF_UNPAUSE_ON_HEADSET_RECONNECT, false)
.putBoolean(UserPreferences.PREF_PAUSE_ON_HEADSET_DISCONNECT, false)
.putBoolean(UserPreferences.PREF_SONIC, true)
.putString(UserPreferences.PREF_MEDIA_PLAYER, "sonic")
.commit();
solo = new Solo(getInstrumentation(), getActivity());

View File

@ -1,15 +1,14 @@
package de.test.antennapod.ui;
import android.content.Context;
import android.content.SharedPreferences;
import android.content.res.Resources;
import android.test.ActivityInstrumentationTestCase2;
import android.preference.PreferenceManager;
import android.support.test.espresso.contrib.RecyclerViewActions;
import android.support.test.rule.ActivityTestRule;
import android.support.test.runner.AndroidJUnit4;
import android.view.View;
import com.robotium.solo.Solo;
import com.robotium.solo.Timeout;
import java.util.Arrays;
import java.util.concurrent.TimeUnit;
import de.danoeh.antennapod.R;
import de.danoeh.antennapod.activity.PreferenceActivity;
import de.danoeh.antennapod.core.preferences.UserPreferences;
@ -17,36 +16,58 @@ import de.danoeh.antennapod.core.storage.APCleanupAlgorithm;
import de.danoeh.antennapod.core.storage.APNullCleanupAlgorithm;
import de.danoeh.antennapod.core.storage.APQueueCleanupAlgorithm;
import de.danoeh.antennapod.core.storage.EpisodeCleanupAlgorithm;
import de.danoeh.antennapod.fragment.EpisodesFragment;
import de.danoeh.antennapod.fragment.QueueFragment;
import de.danoeh.antennapod.fragment.SubscriptionFragment;
public class PreferencesTest extends ActivityInstrumentationTestCase2<PreferenceActivity> {
import org.hamcrest.Matcher;
import org.junit.After;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
private static final String TAG = "PreferencesTest";
import java.util.Arrays;
import java.util.concurrent.TimeUnit;
import static android.support.test.InstrumentationRegistry.getInstrumentation;
import static android.support.test.espresso.Espresso.onView;
import static android.support.test.espresso.action.ViewActions.click;
import static android.support.test.espresso.matcher.ViewMatchers.hasDescendant;
import static android.support.test.espresso.matcher.ViewMatchers.withId;
import static android.support.test.espresso.matcher.ViewMatchers.withText;
import static junit.framework.TestCase.assertEquals;
import static junit.framework.TestCase.assertTrue;
@RunWith(AndroidJUnit4.class)
public class PreferencesTest {
private Solo solo;
private Context context;
private Resources res;
private SharedPreferences prefs;
public PreferencesTest() {
super(PreferenceActivity.class);
}
@Rule
public ActivityTestRule<PreferenceActivity> mActivityRule = new ActivityTestRule<>(PreferenceActivity.class);
@Override
public void setUp() throws Exception {
super.setUp();
solo = new Solo(getInstrumentation(), getActivity());
@Before
public void setUp() {
solo = new Solo(getInstrumentation(), mActivityRule.getActivity());
Timeout.setSmallTimeout(500);
Timeout.setLargeTimeout(1000);
context = getInstrumentation().getTargetContext();
res = getActivity().getResources();
UserPreferences.init(context);
res = mActivityRule.getActivity().getResources();
UserPreferences.init(mActivityRule.getActivity());
prefs = PreferenceManager.getDefaultSharedPreferences(mActivityRule.getActivity());
prefs.edit().clear();
prefs.edit().putBoolean(UserPreferences.PREF_ENABLE_AUTODL, true).commit();
}
@Override
public void tearDown() throws Exception {
@After
public void tearDown() {
solo.finishOpenedActivities();
super.tearDown();
prefs.edit().clear();
}
@Test
public void testSwitchTheme() {
final int theme = UserPreferences.getTheme();
int otherTheme;
@ -55,13 +76,13 @@ public class PreferencesTest extends ActivityInstrumentationTestCase2<Preference
} else {
otherTheme = R.string.pref_theme_title_light;
}
solo.clickOnText(solo.getString(R.string.user_interface_label));
solo.clickOnText(solo.getString(R.string.pref_set_theme_title));
solo.waitForDialogToOpen();
solo.clickOnText(solo.getString(otherTheme));
clickPreference(withText(R.string.user_interface_label));
clickPreference(withText(R.string.pref_set_theme_title));
onView(withText(otherTheme)).perform(click());
assertTrue(solo.waitForCondition(() -> UserPreferences.getTheme() != theme, Timeout.getLargeTimeout()));
}
@Test
public void testSwitchThemeBack() {
final int theme = UserPreferences.getTheme();
int otherTheme;
@ -70,33 +91,23 @@ public class PreferencesTest extends ActivityInstrumentationTestCase2<Preference
} else {
otherTheme = R.string.pref_theme_title_light;
}
solo.clickOnText(solo.getString(R.string.user_interface_label));
solo.clickOnText(solo.getString(R.string.pref_set_theme_title));
solo.waitForDialogToOpen(1000);
solo.clickOnText(solo.getString(otherTheme));
clickPreference(withText(R.string.user_interface_label));
clickPreference(withText(R.string.pref_set_theme_title));
onView(withText(otherTheme)).perform(click());
assertTrue(solo.waitForCondition(() -> UserPreferences.getTheme() != theme, Timeout.getLargeTimeout()));
}
public void testExpandNotification() {
solo.clickOnText(solo.getString(R.string.user_interface_label));
final int priority = UserPreferences.getNotifyPriority();
solo.clickOnText(solo.getString(R.string.pref_expandNotify_title));
assertTrue(solo.waitForCondition(() -> priority != UserPreferences.getNotifyPriority(), Timeout.getLargeTimeout()));
solo.clickOnText(solo.getString(R.string.pref_expandNotify_title));
assertTrue(solo.waitForCondition(() -> priority == UserPreferences.getNotifyPriority(), Timeout.getLargeTimeout()));
}
@Test
public void testEnablePersistentPlaybackControls() {
solo.clickOnText(solo.getString(R.string.user_interface_label));
final boolean persistNotify = UserPreferences.isPersistNotify();
solo.scrollDown();
solo.scrollDown();
solo.clickOnText(solo.getString(R.string.pref_persistNotify_title));
clickPreference(withText(R.string.user_interface_label));
clickPreference(withText(R.string.pref_persistNotify_title));
assertTrue(solo.waitForCondition(() -> persistNotify != UserPreferences.isPersistNotify(), Timeout.getLargeTimeout()));
solo.clickOnText(solo.getString(R.string.pref_persistNotify_title));
clickPreference(withText(R.string.pref_persistNotify_title));
assertTrue(solo.waitForCondition(() -> persistNotify == UserPreferences.isPersistNotify(), Timeout.getLargeTimeout()));
}
@Test
public void testSetLockscreenButtons() {
solo.clickOnText(solo.getString(R.string.user_interface_label));
solo.scrollDown();
@ -123,6 +134,7 @@ public class PreferencesTest extends ActivityInstrumentationTestCase2<Preference
assertTrue(solo.waitForCondition(() -> !UserPreferences.showSkipOnCompactNotification(), Timeout.getLargeTimeout()));
}
@Test
public void testEnqueueAtFront() {
solo.clickOnText(solo.getString(R.string.playback_pref));
final boolean enqueueAtFront = UserPreferences.enqueueAtFront();
@ -134,6 +146,7 @@ public class PreferencesTest extends ActivityInstrumentationTestCase2<Preference
assertTrue(solo.waitForCondition(() -> enqueueAtFront == UserPreferences.enqueueAtFront(), Timeout.getLargeTimeout()));
}
@Test
public void testHeadPhonesDisconnect() {
solo.clickOnText(solo.getString(R.string.playback_pref));
final boolean pauseOnHeadsetDisconnect = UserPreferences.isPauseOnHeadsetDisconnect();
@ -143,6 +156,7 @@ public class PreferencesTest extends ActivityInstrumentationTestCase2<Preference
assertTrue(solo.waitForCondition(() -> pauseOnHeadsetDisconnect == UserPreferences.isPauseOnHeadsetDisconnect(), Timeout.getLargeTimeout()));
}
@Test
public void testHeadPhonesReconnect() {
solo.clickOnText(solo.getString(R.string.playback_pref));
if(UserPreferences.isPauseOnHeadsetDisconnect() == false) {
@ -156,6 +170,7 @@ public class PreferencesTest extends ActivityInstrumentationTestCase2<Preference
assertTrue(solo.waitForCondition(() -> unpauseOnHeadsetReconnect == UserPreferences.isUnpauseOnHeadsetReconnect(), Timeout.getLargeTimeout()));
}
@Test
public void testBluetoothReconnect() {
solo.clickOnText(solo.getString(R.string.playback_pref));
if(UserPreferences.isPauseOnHeadsetDisconnect() == false) {
@ -169,6 +184,7 @@ public class PreferencesTest extends ActivityInstrumentationTestCase2<Preference
assertTrue(solo.waitForCondition(() -> unpauseOnBluetoothReconnect == UserPreferences.isUnpauseOnBluetoothReconnect(), Timeout.getLargeTimeout()));
}
@Test
public void testContinuousPlayback() {
solo.clickOnText(solo.getString(R.string.playback_pref));
final boolean continuousPlayback = UserPreferences.isFollowQueue();
@ -180,6 +196,7 @@ public class PreferencesTest extends ActivityInstrumentationTestCase2<Preference
assertTrue(solo.waitForCondition(() -> continuousPlayback == UserPreferences.isFollowQueue(), Timeout.getLargeTimeout()));
}
@Test
public void testAutoDelete() {
solo.clickOnText(solo.getString(R.string.storage_pref));
final boolean autoDelete = UserPreferences.isAutoDelete();
@ -189,17 +206,15 @@ public class PreferencesTest extends ActivityInstrumentationTestCase2<Preference
assertTrue(solo.waitForCondition(() -> autoDelete == UserPreferences.isAutoDelete(), Timeout.getLargeTimeout()));
}
@Test
public void testPlaybackSpeeds() {
solo.clickOnText(solo.getString(R.string.playback_pref));
solo.scrollDown();
solo.scrollDown();
solo.clickOnText(solo.getString(R.string.pref_playback_speed_title));
solo.waitForDialogToOpen(1000);
clickPreference(withText(R.string.playback_pref));
clickPreference(withText(R.string.pref_playback_speed_title));
assertTrue(solo.searchText(res.getStringArray(R.array.playback_speed_values)[0]));
solo.clickOnText(solo.getString(R.string.cancel_label));
solo.waitForDialogToClose(1000);
onView(withText(R.string.cancel_label)).perform(click());
}
@Test
public void testPauseForInterruptions() {
solo.clickOnText(solo.getString(R.string.playback_pref));
final boolean pauseForFocusLoss = UserPreferences.shouldPauseForFocusLoss();
@ -209,6 +224,7 @@ public class PreferencesTest extends ActivityInstrumentationTestCase2<Preference
assertTrue(solo.waitForCondition(() -> pauseForFocusLoss == UserPreferences.shouldPauseForFocusLoss(), Timeout.getLargeTimeout()));
}
@Test
public void testDisableUpdateInterval() {
solo.clickOnText(solo.getString(R.string.network_pref));
solo.clickOnText(solo.getString(R.string.pref_autoUpdateIntervallOrTime_sum));
@ -217,31 +233,31 @@ public class PreferencesTest extends ActivityInstrumentationTestCase2<Preference
assertTrue(solo.waitForCondition(() -> UserPreferences.getUpdateInterval() == 0, 1000));
}
@Test
public void testSetUpdateInterval() {
solo.clickOnText(solo.getString(R.string.network_pref));
solo.clickOnText(solo.getString(R.string.pref_autoUpdateIntervallOrTime_title));
solo.waitForDialogToOpen();
solo.clickOnText(solo.getString(R.string.pref_autoUpdateIntervallOrTime_Interval));
solo.waitForDialogToOpen();
clickPreference(withText(R.string.network_pref));
clickPreference(withText(R.string.pref_autoUpdateIntervallOrTime_title));
onView(withText(R.string.pref_autoUpdateIntervallOrTime_Interval)).perform(click());
String search = "12 " + solo.getString(R.string.pref_update_interval_hours_plural);
solo.clickOnText(search);
solo.waitForDialogToClose();
onView(withText(search)).perform(click());
assertTrue(solo.waitForCondition(() -> UserPreferences.getUpdateInterval() ==
TimeUnit.HOURS.toMillis(12), Timeout.getLargeTimeout()));
}
@Test
public void testMobileUpdates() {
solo.clickOnText(solo.getString(R.string.network_pref));
clickPreference(withText(R.string.network_pref));
final boolean mobileUpdates = UserPreferences.isAllowMobileUpdate();
solo.clickOnText(solo.getString(R.string.pref_mobileUpdate_title));
clickPreference(withText(R.string.pref_mobileUpdate_title));
assertTrue(solo.waitForCondition(() -> mobileUpdates != UserPreferences.isAllowMobileUpdate(), Timeout.getLargeTimeout()));
solo.clickOnText(solo.getString(R.string.pref_mobileUpdate_title));
clickPreference(withText(R.string.pref_mobileUpdate_title));
assertTrue(solo.waitForCondition(() -> mobileUpdates == UserPreferences.isAllowMobileUpdate(), Timeout.getLargeTimeout()));
}
@Test
public void testSetSequentialDownload() {
solo.clickOnText(solo.getString(R.string.network_pref));
solo.clickOnText(solo.getString(R.string.pref_parallel_downloads_title));
clickPreference(withText(R.string.network_pref));
clickPreference(withText(R.string.pref_parallel_downloads_title));
solo.waitForDialogToOpen();
solo.clearEditText(0);
solo.enterText(0, "1");
@ -249,9 +265,10 @@ public class PreferencesTest extends ActivityInstrumentationTestCase2<Preference
assertTrue(solo.waitForCondition(() -> UserPreferences.getParallelDownloads() == 1, Timeout.getLargeTimeout()));
}
@Test
public void testSetParallelDownloads() {
solo.clickOnText(solo.getString(R.string.network_pref));
solo.clickOnText(solo.getString(R.string.pref_parallel_downloads_title));
clickPreference(withText(R.string.network_pref));
clickPreference(withText(R.string.pref_parallel_downloads_title));
solo.waitForDialogToOpen();
solo.clearEditText(0);
solo.enterText(0, "10");
@ -259,50 +276,50 @@ public class PreferencesTest extends ActivityInstrumentationTestCase2<Preference
assertTrue(solo.waitForCondition(() -> UserPreferences.getParallelDownloads() == 10, Timeout.getLargeTimeout()));
}
@Test
public void testSetParallelDownloadsInvalidInput() {
solo.clickOnText(solo.getString(R.string.network_pref));
solo.clickOnText(solo.getString(R.string.pref_parallel_downloads_title));
clickPreference(withText(R.string.network_pref));
clickPreference(withText(R.string.pref_parallel_downloads_title));
solo.waitForDialogToOpen();
solo.clearEditText(0);
solo.enterText(0, "0");
assertEquals("1", solo.getEditText(0).getText().toString());
assertEquals("", solo.getEditText(0).getText().toString());
solo.clearEditText(0);
solo.enterText(0, "100");
assertEquals("50", solo.getEditText(0).getText().toString());
assertEquals("", solo.getEditText(0).getText().toString());
}
@Test
public void testSetEpisodeCache() {
String[] entries = res.getStringArray(R.array.episode_cache_size_entries);
String[] values = res.getStringArray(R.array.episode_cache_size_values);
String entry = entries[entries.length/2];
final int value = Integer.valueOf(values[values.length/2]);
solo.clickOnText(solo.getString(R.string.network_pref));
solo.clickOnText(solo.getString(R.string.pref_automatic_download_title));
solo.waitForText(solo.getString(R.string.pref_automatic_download_title));
solo.clickOnText(solo.getString(R.string.pref_episode_cache_title));
clickPreference(withText(R.string.network_pref));
clickPreference(withText(R.string.pref_automatic_download_title));
clickPreference(withText(R.string.pref_episode_cache_title));
solo.waitForDialogToOpen();
solo.clickOnText(entry);
assertTrue(solo.waitForCondition(() -> UserPreferences.getEpisodeCacheSize() == value, Timeout.getLargeTimeout()));
}
@Test
public void testSetEpisodeCacheMin() {
String[] entries = res.getStringArray(R.array.episode_cache_size_entries);
String[] values = res.getStringArray(R.array.episode_cache_size_values);
String minEntry = entries[0];
final int minValue = Integer.valueOf(values[0]);
solo.clickOnText(solo.getString(R.string.network_pref));
solo.clickOnText(solo.getString(R.string.pref_automatic_download_title));
solo.waitForText(solo.getString(R.string.pref_automatic_download_title));
if(!UserPreferences.isEnableAutodownload()) {
solo.clickOnText(solo.getString(R.string.pref_automatic_download_title));
}
solo.clickOnText(solo.getString(R.string.pref_episode_cache_title));
clickPreference(withText(R.string.network_pref));
clickPreference(withText(R.string.pref_automatic_download_title));
clickPreference(withText(R.string.pref_episode_cache_title));
solo.waitForDialogToOpen(1000);
solo.scrollUp();
solo.clickOnText(minEntry);
assertTrue(solo.waitForCondition(() -> UserPreferences.getEpisodeCacheSize() == minValue, Timeout.getLargeTimeout()));
}
@Test
public void testSetEpisodeCacheMax() {
String[] entries = res.getStringArray(R.array.episode_cache_size_entries);
String[] values = res.getStringArray(R.array.episode_cache_size_values);
@ -311,24 +328,22 @@ public class PreferencesTest extends ActivityInstrumentationTestCase2<Preference
solo.clickOnText(solo.getString(R.string.network_pref));
solo.clickOnText(solo.getString(R.string.pref_automatic_download_title));
solo.waitForText(solo.getString(R.string.pref_automatic_download_title));
if(!UserPreferences.isEnableAutodownload()) {
solo.clickOnText(solo.getString(R.string.pref_automatic_download_title));
}
solo.clickOnText(solo.getString(R.string.pref_episode_cache_title));
solo.waitForDialogToOpen();
solo.clickOnText(maxEntry);
assertTrue(solo.waitForCondition(() -> UserPreferences.getEpisodeCacheSize() == maxValue, Timeout.getLargeTimeout()));
}
@Test
public void testAutomaticDownload() {
final boolean automaticDownload = UserPreferences.isEnableAutodownload();
solo.clickOnText(solo.getString(R.string.network_pref));
solo.clickOnText(solo.getString(R.string.pref_automatic_download_title));
solo.waitForText(solo.getString(R.string.pref_automatic_download_title));
solo.clickOnText(solo.getString(R.string.pref_automatic_download_title));
clickPreference(withText(R.string.network_pref));
clickPreference(withText(R.string.pref_automatic_download_title));
clickPreference(withText(R.string.pref_automatic_download_title));
assertTrue(solo.waitForCondition(() -> automaticDownload != UserPreferences.isEnableAutodownload(), Timeout.getLargeTimeout()));
if(UserPreferences.isEnableAutodownload() == false) {
solo.clickOnText(solo.getString(R.string.pref_automatic_download_title));
clickPreference(withText(R.string.pref_automatic_download_title));
}
assertTrue(solo.waitForCondition(() -> UserPreferences.isEnableAutodownload() == true, Timeout.getLargeTimeout()));
final boolean enableAutodownloadOnBattery = UserPreferences.isEnableAutodownloadOnBattery();
@ -343,6 +358,7 @@ public class PreferencesTest extends ActivityInstrumentationTestCase2<Preference
assertTrue(solo.waitForCondition(() -> enableWifiFilter == UserPreferences.isEnableAutodownloadWifiFilter(), Timeout.getLargeTimeout()));
}
@Test
public void testEpisodeCleanupQueueOnly() {
solo.clickOnText(solo.getString(R.string.network_pref));
solo.clickOnText(solo.getString(R.string.pref_automatic_download_title));
@ -356,6 +372,7 @@ public class PreferencesTest extends ActivityInstrumentationTestCase2<Preference
Timeout.getLargeTimeout()));
}
@Test
public void testEpisodeCleanupNeverAlg() {
solo.clickOnText(solo.getString(R.string.network_pref));
solo.clickOnText(solo.getString(R.string.pref_automatic_download_title));
@ -369,6 +386,7 @@ public class PreferencesTest extends ActivityInstrumentationTestCase2<Preference
Timeout.getLargeTimeout()));
}
@Test
public void testEpisodeCleanupClassic() {
solo.clickOnText(solo.getString(R.string.network_pref));
solo.clickOnText(solo.getString(R.string.pref_automatic_download_title));
@ -386,12 +404,14 @@ public class PreferencesTest extends ActivityInstrumentationTestCase2<Preference
Timeout.getLargeTimeout()));
}
@Test
public void testEpisodeCleanupNumDays() {
solo.clickOnText(solo.getString(R.string.network_pref));
solo.clickOnText(solo.getString(R.string.pref_automatic_download_title));
solo.clickOnText(solo.getString(R.string.pref_episode_cleanup_title));
solo.waitForText(solo.getString(R.string.episode_cleanup_after_listening));
solo.clickOnText("5");
clickPreference(withText(R.string.network_pref));
clickPreference(withText(R.string.pref_automatic_download_title));
clickPreference(withText(R.string.pref_episode_cleanup_title));
solo.waitForDialogToOpen();
String search = res.getQuantityString(R.plurals.episode_cleanup_days_after_listening, 5, 5);
onView(withText(search)).perform(click());
assertTrue(solo.waitForCondition(() -> {
EpisodeCleanupAlgorithm alg = UserPreferences.getEpisodeCleanupAlgorithm();
if (alg instanceof APCleanupAlgorithm) {
@ -403,15 +423,13 @@ public class PreferencesTest extends ActivityInstrumentationTestCase2<Preference
Timeout.getLargeTimeout()));
}
@Test
public void testRewindChange() {
int seconds = UserPreferences.getRewindSecs();
int deltas[] = res.getIntArray(R.array.seek_delta_values);
solo.clickOnText(solo.getString(R.string.playback_pref));
solo.scrollDown();
solo.scrollDown();
solo.clickOnText(solo.getString(R.string.pref_rewind));
clickPreference(withText(R.string.playback_pref));
clickPreference(withText(R.string.pref_rewind));
solo.waitForDialogToOpen();
int currentIndex = Arrays.binarySearch(deltas, seconds);
@ -419,24 +437,22 @@ public class PreferencesTest extends ActivityInstrumentationTestCase2<Preference
// Find next value (wrapping around to next)
int newIndex = (currentIndex + 1) % deltas.length;
solo.clickOnText(String.valueOf(deltas[newIndex]) + " seconds");
solo.clickOnButton("Confirm");
onView(withText(String.valueOf(deltas[newIndex]) + " seconds")).perform(click());
onView(withText("Confirm")).perform(click());
solo.waitForDialogToClose();
assertTrue(solo.waitForCondition(() -> UserPreferences.getRewindSecs() == deltas[newIndex],
Timeout.getLargeTimeout()));
}
@Test
public void testFastForwardChange() {
solo.clickOnText(solo.getString(R.string.playback_pref));
solo.scrollDown();
solo.scrollDown();
clickPreference(withText(R.string.playback_pref));
for (int i = 2; i > 0; i--) { // repeat twice to catch any error where fastforward is tracking rewind
int seconds = UserPreferences.getFastForwardSecs();
int deltas[] = res.getIntArray(R.array.seek_delta_values);
solo.clickOnText(solo.getString(R.string.pref_fast_forward));
clickPreference(withText(R.string.pref_fast_forward));
solo.waitForDialogToOpen();
int currentIndex = Arrays.binarySearch(deltas, seconds);
@ -445,12 +461,52 @@ public class PreferencesTest extends ActivityInstrumentationTestCase2<Preference
// Find next value (wrapping around to next)
int newIndex = (currentIndex + 1) % deltas.length;
solo.clickOnText(String.valueOf(deltas[newIndex]) + " seconds");
solo.clickOnButton("Confirm");
onView(withText(String.valueOf(deltas[newIndex]) + " seconds")).perform(click());
onView(withText("Confirm")).perform(click());
solo.waitForDialogToClose();
assertTrue(solo.waitForCondition(() -> UserPreferences.getFastForwardSecs() == deltas[newIndex],
Timeout.getLargeTimeout()));
}
}
@Test
public void testBackButtonBehaviorGoToPageSelector() {
clickPreference(withText(R.string.user_interface_label));
clickPreference(withText(R.string.pref_back_button_behavior_title));
solo.waitForDialogToOpen();
solo.clickOnText(solo.getString(R.string.back_button_go_to_page));
solo.waitForDialogToOpen();
solo.clickOnText(solo.getString(R.string.queue_label));
solo.clickOnText(solo.getString(R.string.confirm_label));
assertTrue(solo.waitForCondition(() -> UserPreferences.getBackButtonBehavior() == UserPreferences.BackButtonBehavior.GO_TO_PAGE,
Timeout.getLargeTimeout()));
assertTrue(solo.waitForCondition(() -> UserPreferences.getBackButtonGoToPage().equals(QueueFragment.TAG),
Timeout.getLargeTimeout()));
clickPreference(withText(R.string.pref_back_button_behavior_title));
solo.waitForDialogToOpen();
solo.clickOnText(solo.getString(R.string.back_button_go_to_page));
solo.waitForDialogToOpen();
solo.clickOnText(solo.getString(R.string.episodes_label));
solo.clickOnText(solo.getString(R.string.confirm_label));
assertTrue(solo.waitForCondition(() -> UserPreferences.getBackButtonBehavior() == UserPreferences.BackButtonBehavior.GO_TO_PAGE,
Timeout.getLargeTimeout()));
assertTrue(solo.waitForCondition(() -> UserPreferences.getBackButtonGoToPage().equals(EpisodesFragment.TAG),
Timeout.getLargeTimeout()));
clickPreference(withText(R.string.pref_back_button_behavior_title));
solo.waitForDialogToOpen();
solo.clickOnText(solo.getString(R.string.back_button_go_to_page));
solo.waitForDialogToOpen();
solo.clickOnText(solo.getString(R.string.subscriptions_label));
solo.clickOnText(solo.getString(R.string.confirm_label));
assertTrue(solo.waitForCondition(() -> UserPreferences.getBackButtonBehavior() == UserPreferences.BackButtonBehavior.GO_TO_PAGE,
Timeout.getLargeTimeout()));
assertTrue(solo.waitForCondition(() -> UserPreferences.getBackButtonGoToPage().equals(SubscriptionFragment.TAG),
Timeout.getLargeTimeout()));
}
private void clickPreference(Matcher<View> matcher) {
onView(withId(R.id.list))
.perform(RecyclerViewActions.actionOnItem(hasDescendant(matcher), click()));
}
}

View File

@ -8,6 +8,7 @@ import java.io.IOException;
* Utility methods for FeedGenerator
*/
class GeneratorUtil {
private GeneratorUtil(){}
public static void addPaymentLink(XmlSerializer xml, String paymentLink, boolean withNamespace) throws IOException {
String ns = (withNamespace) ? "http://www.w3.org/2005/Atom" : null;

View File

@ -2,8 +2,8 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="de.danoeh.antennapod"
android:installLocation="auto"
android:versionCode="1060690"
android:versionName="1.6.6-RC1">
android:versionCode="1070195"
android:versionName="1.7.1">
<!--
Version code schema:
"1.2.3-SNAPSHOT" -> 1020300

View File

@ -20,7 +20,7 @@ public class PodcastApp extends Application {
try {
Class.forName("de.danoeh.antennapod.config.ClientConfigurator");
} catch (Exception e) {
throw new RuntimeException("ClientConfigurator not found");
throw new RuntimeException("ClientConfigurator not found", e);
}
}

View File

@ -43,8 +43,8 @@ public class AboutActivity extends AppCompatActivity {
super.onCreate(savedInstanceState);
getSupportActionBar().setDisplayShowHomeEnabled(true);
setContentView(R.layout.about);
webViewContainer = (LinearLayout) findViewById(R.id.webViewContainer);
webView = (WebView) findViewById(R.id.webViewAbout);
webViewContainer = findViewById(R.id.webViewContainer);
webView = findViewById(R.id.webViewAbout);
webView.getSettings().setCacheMode(WebSettings.LOAD_NO_CACHE);
if (UserPreferences.getTheme() == R.style.Theme_AntennaPod_Dark) {
if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.ICE_CREAM_SANDWICH_MR1) {

View File

@ -64,11 +64,11 @@ public class DirectoryChooserActivity extends AppCompatActivity {
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
setContentView(R.layout.directory_chooser);
butConfirm = (Button) findViewById(R.id.butConfirm);
butCancel = (Button) findViewById(R.id.butCancel);
butNavUp = (ImageButton) findViewById(R.id.butNavUp);
txtvSelectedFolder = (TextView) findViewById(R.id.txtvSelectedFolder);
listDirectories = (ListView) findViewById(R.id.directory_list);
butConfirm = findViewById(R.id.butConfirm);
butCancel = findViewById(R.id.butCancel);
butNavUp = findViewById(R.id.butNavUp);
txtvSelectedFolder = findViewById(R.id.txtvSelectedFolder);
listDirectories = findViewById(R.id.directory_list);
butConfirm.setOnClickListener(new OnClickListener() {

View File

@ -49,11 +49,11 @@ public class DownloadAuthenticationActivity extends AppCompatActivity {
}
setContentView(R.layout.download_authentication_activity);
TextView txtvDescription = (TextView) findViewById(R.id.txtvDescription);
etxtUsername = (EditText) findViewById(R.id.etxtUsername);
etxtPassword = (EditText) findViewById(R.id.etxtPassword);
Button butConfirm = (Button) findViewById(R.id.butConfirm);
Button butCancel = (Button) findViewById(R.id.butCancel);
TextView txtvDescription = findViewById(R.id.txtvDescription);
etxtUsername = findViewById(R.id.etxtUsername);
etxtPassword = findViewById(R.id.etxtPassword);
Button butConfirm = findViewById(R.id.butConfirm);
Button butCancel = findViewById(R.id.butCancel);
Validate.isTrue(getIntent().hasExtra(ARG_DOWNLOAD_REQUEST), "Download request missing");
DownloadRequest request = getIntent().getParcelableExtra(ARG_DOWNLOAD_REQUEST);

View File

@ -86,22 +86,22 @@ public class FeedInfoActivity extends AppCompatActivity {
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
long feedId = getIntent().getLongExtra(EXTRA_FEED_ID, -1);
imgvCover = (ImageView) findViewById(R.id.imgvCover);
txtvTitle = (TextView) findViewById(R.id.txtvTitle);
TextView txtvAuthorHeader = (TextView) findViewById(R.id.txtvAuthor);
ImageView imgvBackground = (ImageView) findViewById(R.id.imgvBackground);
imgvCover = findViewById(R.id.imgvCover);
txtvTitle = findViewById(R.id.txtvTitle);
TextView txtvAuthorHeader = findViewById(R.id.txtvAuthor);
ImageView imgvBackground = findViewById(R.id.imgvBackground);
findViewById(R.id.butShowInfo).setVisibility(View.INVISIBLE);
findViewById(R.id.butShowSettings).setVisibility(View.INVISIBLE);
// https://github.com/bumptech/glide/issues/529
imgvBackground.setColorFilter(new LightingColorFilter(0xff828282, 0x000000));
txtvDescription = (TextView) findViewById(R.id.txtvDescription);
lblLanguage = (TextView) findViewById(R.id.lblLanguage);
txtvLanguage = (TextView) findViewById(R.id.txtvLanguage);
lblAuthor = (TextView) findViewById(R.id.lblAuthor);
txtvAuthor = (TextView) findViewById(R.id.txtvDetailsAuthor);
txtvUrl = (TextView) findViewById(R.id.txtvUrl);
txtvDescription = findViewById(R.id.txtvDescription);
lblLanguage = findViewById(R.id.lblLanguage);
txtvLanguage = findViewById(R.id.txtvLanguage);
lblAuthor = findViewById(R.id.lblAuthor);
txtvAuthor = findViewById(R.id.txtvDetailsAuthor);
txtvUrl = findViewById(R.id.txtvUrl);
txtvUrl.setOnClickListener(copyUrlToClipboard);

View File

@ -112,27 +112,27 @@ public class FeedSettingsActivity extends AppCompatActivity {
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
long feedId = getIntent().getLongExtra(EXTRA_FEED_ID, -1);
imgvCover = (ImageView) findViewById(R.id.imgvCover);
txtvTitle = (TextView) findViewById(R.id.txtvTitle);
TextView txtvAuthorHeader = (TextView) findViewById(R.id.txtvAuthor);
ImageView imgvBackground = (ImageView) findViewById(R.id.imgvBackground);
imgvCover = findViewById(R.id.imgvCover);
txtvTitle = findViewById(R.id.txtvTitle);
TextView txtvAuthorHeader = findViewById(R.id.txtvAuthor);
ImageView imgvBackground = findViewById(R.id.imgvBackground);
findViewById(R.id.butShowInfo).setVisibility(View.INVISIBLE);
findViewById(R.id.butShowSettings).setVisibility(View.INVISIBLE);
// https://github.com/bumptech/glide/issues/529
imgvBackground.setColorFilter(new LightingColorFilter(0xff828282, 0x000000));
cbxAutoDownload = (CheckBox) findViewById(R.id.cbxAutoDownload);
cbxKeepUpdated = (CheckBox) findViewById(R.id.cbxKeepUpdated);
spnAutoDelete = (Spinner) findViewById(R.id.spnAutoDelete);
etxtUsername = (EditText) findViewById(R.id.etxtUsername);
etxtPassword = (EditText) findViewById(R.id.etxtPassword);
etxtFilterText = (EditText) findViewById(R.id.etxtEpisodeFilterText);
rdoFilterInclude = (RadioButton) findViewById(R.id.radio_filter_include);
cbxAutoDownload = findViewById(R.id.cbxAutoDownload);
cbxKeepUpdated = findViewById(R.id.cbxKeepUpdated);
spnAutoDelete = findViewById(R.id.spnAutoDelete);
etxtUsername = findViewById(R.id.etxtUsername);
etxtPassword = findViewById(R.id.etxtPassword);
etxtFilterText = findViewById(R.id.etxtEpisodeFilterText);
rdoFilterInclude = findViewById(R.id.radio_filter_include);
rdoFilterInclude.setOnClickListener(v -> {
filterInclude = true;
filterTextChanged = true;
});
rdoFilterExclude = (RadioButton) findViewById(R.id.radio_filter_exclude);
rdoFilterExclude = findViewById(R.id.radio_filter_exclude);
rdoFilterExclude.setOnClickListener(v -> {
filterInclude = false;
filterTextChanged = true;

View File

@ -41,9 +41,9 @@ public class FlattrAuthActivity extends AppCompatActivity {
if (BuildConfig.DEBUG) Log.d(TAG, "Activity created");
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
setContentView(R.layout.flattr_auth);
txtvExplanation = (TextView) findViewById(R.id.txtvExplanation);
butAuthenticate = (Button) findViewById(R.id.but_authenticate);
butReturn = (Button) findViewById(R.id.but_return_home);
txtvExplanation = findViewById(R.id.txtvExplanation);
butAuthenticate = findViewById(R.id.but_authenticate);
butReturn = findViewById(R.id.but_return_home);
butReturn.setOnClickListener(v -> {
Intent intent = new Intent(FlattrAuthActivity.this, MainActivity.class);

View File

@ -13,9 +13,7 @@ import android.support.v7.app.AlertDialog;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.view.MenuItem;
import de.danoeh.antennapod.R;
import de.danoeh.antennapod.core.preferences.UserPreferences;
import de.danoeh.antennapod.core.storage.PodDBAdapter;
import org.apache.commons.io.FileUtils;
import org.apache.commons.io.IOUtils;
@ -26,6 +24,10 @@ import java.io.IOException;
import java.io.InputStream;
import java.nio.channels.FileChannel;
import de.danoeh.antennapod.R;
import de.danoeh.antennapod.core.preferences.UserPreferences;
import de.danoeh.antennapod.core.storage.PodDBAdapter;
/**
* Displays the 'import/export' screen
*/

View File

@ -27,6 +27,7 @@ import android.view.MenuItem;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ListView;
import android.widget.Toast;
import com.bumptech.glide.Glide;
@ -123,6 +124,8 @@ public class MainActivity extends CastEnabledActivity implements NavDrawerActivi
private Disposable disposable;
private long lastBackButtonPressTime = 0;
@Override
public void onCreate(Bundle savedInstanceState) {
setTheme(UserPreferences.getNoTitleTheme());
@ -130,7 +133,7 @@ public class MainActivity extends CastEnabledActivity implements NavDrawerActivi
StorageUtils.checkStorageAvailability(this);
setContentView(R.layout.main);
toolbar = (Toolbar) findViewById(R.id.toolbar);
toolbar = findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
@ -142,8 +145,8 @@ public class MainActivity extends CastEnabledActivity implements NavDrawerActivi
currentTitle = getTitle();
drawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout);
navList = (ListView) findViewById(R.id.nav_list);
drawerLayout = findViewById(R.id.drawer_layout);
navList = findViewById(R.id.nav_list);
navDrawer = findViewById(R.id.nav_layout);
drawerToggle = new ActionBarDrawerToggle(this, drawerLayout, R.string.drawer_open, R.string.drawer_close);
@ -643,10 +646,40 @@ public class MainActivity extends CastEnabledActivity implements NavDrawerActivi
@Override
public void onBackPressed() {
if(isDrawerOpen()) {
if (isDrawerOpen()) {
drawerLayout.closeDrawer(navDrawer);
} else {
} else if (getSupportFragmentManager().getBackStackEntryCount() != 0) {
super.onBackPressed();
} else {
switch (UserPreferences.getBackButtonBehavior()) {
case OPEN_DRAWER:
drawerLayout.openDrawer(navDrawer);
break;
case SHOW_PROMPT:
new AlertDialog.Builder(this)
.setMessage(R.string.close_prompt)
.setPositiveButton(R.string.yes, (dialogInterface, i) -> MainActivity.super.onBackPressed())
.setNegativeButton(R.string.no, null)
.setCancelable(false)
.show();
break;
case DOUBLE_TAP:
if (lastBackButtonPressTime < System.currentTimeMillis() - 2000) {
Toast.makeText(this, R.string.double_tap_toast, Toast.LENGTH_SHORT).show();
lastBackButtonPressTime = System.currentTimeMillis();
} else {
super.onBackPressed();
}
break;
case GO_TO_PAGE:
if (getLastNavFragment().equals(UserPreferences.getBackButtonGoToPage())) {
super.onBackPressed();
} else {
loadFragment(UserPreferences.getBackButtonGoToPage(), null);
}
break;
default: super.onBackPressed();
}
}
}

View File

@ -234,7 +234,6 @@ public abstract class MediaplayerActivity extends CastEnabledActivity implements
Log.d(TAG, "onCreate()");
StorageUtils.checkStorageAvailability(this);
orientation = getResources().getConfiguration().orientation;
getWindow().setFormat(PixelFormat.TRANSPARENT);
}
@ -268,15 +267,10 @@ public abstract class MediaplayerActivity extends CastEnabledActivity implements
private void onBufferUpdate(float progress) {
if (sbPosition != null) {
sbPosition.setSecondaryProgress((int) progress * sbPosition.getMax());
sbPosition.setSecondaryProgress((int) (progress * sbPosition.getMax()));
}
}
/**
* Current screen orientation.
*/
private int orientation;
@Override
protected void onStart() {
super.onStart();
@ -808,13 +802,13 @@ public abstract class MediaplayerActivity extends CastEnabledActivity implements
void setupGUI() {
setContentView(getContentViewResourceId());
sbPosition = (SeekBar) findViewById(R.id.sbPosition);
txtvPosition = (TextView) findViewById(R.id.txtvPosition);
sbPosition = findViewById(R.id.sbPosition);
txtvPosition = findViewById(R.id.txtvPosition);
SharedPreferences prefs = getSharedPreferences(PREFS, MODE_PRIVATE);
showTimeLeft = prefs.getBoolean(PREF_SHOW_TIME_LEFT, false);
Log.d("timeleft", showTimeLeft ? "true" : "false");
txtvLength = (TextView) findViewById(R.id.txtvLength);
txtvLength = findViewById(R.id.txtvLength);
if (txtvLength != null) {
txtvLength.setOnClickListener(v -> {
showTimeLeft = !showTimeLeft;
@ -838,18 +832,18 @@ public abstract class MediaplayerActivity extends CastEnabledActivity implements
});
}
butRev = (ImageButton) findViewById(R.id.butRev);
txtvRev = (TextView) findViewById(R.id.txtvRev);
butRev = findViewById(R.id.butRev);
txtvRev = findViewById(R.id.txtvRev);
if (txtvRev != null) {
txtvRev.setText(String.valueOf(UserPreferences.getRewindSecs()));
}
butPlay = (ImageButton) findViewById(R.id.butPlay);
butFF = (ImageButton) findViewById(R.id.butFF);
txtvFF = (TextView) findViewById(R.id.txtvFF);
butPlay = findViewById(R.id.butPlay);
butFF = findViewById(R.id.butFF);
txtvFF = findViewById(R.id.txtvFF);
if (txtvFF != null) {
txtvFF.setText(String.valueOf(UserPreferences.getFastForwardSecs()));
}
butSkip = (ImageButton) findViewById(R.id.butSkip);
butSkip = findViewById(R.id.butSkip);
// SEEKBAR SETUP
@ -1002,7 +996,7 @@ public abstract class MediaplayerActivity extends CastEnabledActivity implements
}
@Override
public void onRequestPermissionsResult(int requestCode, String permissions[], int[] grantResults) {
public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {
if (requestCode == REQUEST_CODE_STORAGE) {
if (grantResults.length <= 0 || grantResults[0] != PackageManager.PERMISSION_GRANTED) {
Toast.makeText(this, R.string.needs_storage_permission, Toast.LENGTH_LONG).show();

View File

@ -227,18 +227,18 @@ public abstract class MediaplayerInfoActivity extends MediaplayerActivity implem
@Override
protected void setupGUI() {
super.setupGUI();
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
Toolbar toolbar = findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
getSupportActionBar().setTitle("");
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
findViewById(R.id.shadow).setVisibility(View.GONE);
AppBarLayout appBarLayout = (AppBarLayout) findViewById(R.id.appBar);
AppBarLayout appBarLayout = findViewById(R.id.appBar);
float px = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 4, getResources().getDisplayMetrics());
appBarLayout.setElevation(px);
}
drawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout);
navList = (ListView) findViewById(R.id.nav_list);
drawerLayout = findViewById(R.id.drawer_layout);
navList = findViewById(R.id.nav_list);
navDrawer = findViewById(R.id.nav_layout);
drawerToggle = new ActionBarDrawerToggle(this, drawerLayout, R.string.drawer_open, R.string.drawer_close);
@ -274,14 +274,14 @@ public abstract class MediaplayerInfoActivity extends MediaplayerActivity implem
startActivity(new Intent(MediaplayerInfoActivity.this, PreferenceActivity.class));
});
butPlaybackSpeed = (Button) findViewById(R.id.butPlaybackSpeed);
butCastDisconnect = (ImageButton) findViewById(R.id.butCastDisconnect);
butPlaybackSpeed = findViewById(R.id.butPlaybackSpeed);
butCastDisconnect = findViewById(R.id.butCastDisconnect);
pager = (ViewPager) findViewById(R.id.pager);
pager = findViewById(R.id.pager);
pagerAdapter = new MediaplayerInfoPagerAdapter(getSupportFragmentManager(), media);
pagerAdapter.setController(controller);
pager.setAdapter(pagerAdapter);
CirclePageIndicator pageIndicator = (CirclePageIndicator) findViewById(R.id.page_indicator);
CirclePageIndicator pageIndicator = findViewById(R.id.page_indicator);
pageIndicator.setViewPager(pager);
loadLastFragment();
pager.onSaveInstanceState();
@ -357,7 +357,7 @@ public abstract class MediaplayerInfoActivity extends MediaplayerActivity implem
@Override
public boolean onOptionsItemSelected(MenuItem item) {
return drawerToggle != null && drawerToggle.onOptionsItemSelected(item) || super.onOptionsItemSelected(item);
return (drawerToggle != null && drawerToggle.onOptionsItemSelected(item)) || super.onOptionsItemSelected(item);
}
@Override

View File

@ -144,7 +144,7 @@ public class OnlineFeedViewActivity extends AppCompatActivity {
feedUrl = getIntent().getStringExtra(ARG_FEEDURL);
} else if (TextUtils.equals(getIntent().getAction(), Intent.ACTION_SEND)
|| TextUtils.equals(getIntent().getAction(), Intent.ACTION_VIEW)) {
feedUrl = (TextUtils.equals(getIntent().getAction(), Intent.ACTION_SEND))
feedUrl = TextUtils.equals(getIntent().getAction(), Intent.ACTION_SEND)
? getIntent().getStringExtra(Intent.EXTRA_TEXT) : getIntent().getDataString();
if (actionBar != null) {
actionBar.setTitle(R.string.add_feed_label);
@ -306,7 +306,7 @@ public class OnlineFeedViewActivity extends AppCompatActivity {
}
private void parseFeed() {
if (feed == null || feed.getFile_url() == null && feed.isDownloaded()) {
if (feed == null || (feed.getFile_url() == null && feed.isDownloaded())) {
throw new IllegalStateException("feed must be non-null and downloaded when parseFeed is called");
}
Log.d(TAG, "Parsing feed");
@ -379,20 +379,20 @@ public class OnlineFeedViewActivity extends AppCompatActivity {
this.feed = feed;
this.selectedDownloadUrl = feed.getDownload_url();
EventDistributor.getInstance().register(listener);
ListView listView = (ListView) findViewById(R.id.listview);
ListView listView = findViewById(R.id.listview);
LayoutInflater inflater = LayoutInflater.from(this);
View header = inflater.inflate(R.layout.onlinefeedview_header, listView, false);
listView.addHeaderView(header);
listView.setAdapter(new FeedItemlistDescriptionAdapter(this, 0, feed.getItems()));
ImageView cover = (ImageView) header.findViewById(R.id.imgvCover);
TextView title = (TextView) header.findViewById(R.id.txtvTitle);
TextView author = (TextView) header.findViewById(R.id.txtvAuthor);
TextView description = (TextView) header.findViewById(R.id.txtvDescription);
Spinner spAlternateUrls = (Spinner) header.findViewById(R.id.spinnerAlternateUrls);
ImageView cover = header.findViewById(R.id.imgvCover);
TextView title = header.findViewById(R.id.txtvTitle);
TextView author = header.findViewById(R.id.txtvAuthor);
TextView description = header.findViewById(R.id.txtvDescription);
Spinner spAlternateUrls = header.findViewById(R.id.spinnerAlternateUrls);
subscribeButton = (Button) header.findViewById(R.id.butSubscribe);
subscribeButton = header.findViewById(R.id.butSubscribe);
if (StringUtils.isNotBlank(feed.getImageUrl())) {
Glide.with(this)

View File

@ -39,9 +39,9 @@ public class OpmlFeedChooserActivity extends AppCompatActivity {
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);
butConfirm = findViewById(R.id.butConfirm);
butCancel = findViewById(R.id.butCancel);
feedlist = findViewById(R.id.feedlist);
feedlist.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE);
listAdapter = new ArrayAdapter<>(this,

View File

@ -36,16 +36,16 @@ public class OpmlImportFromPathActivity extends OpmlImportBaseActivity {
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
setContentView(R.layout.opml_import);
final TextView txtvHeaderExplanation1 = (TextView) findViewById(R.id.txtvHeadingExplanation1);
final TextView txtvExplanation1 = (TextView) findViewById(R.id.txtvExplanation1);
final TextView txtvHeaderExplanation2 = (TextView) findViewById(R.id.txtvHeadingExplanation2);
final TextView txtvExplanation2 = (TextView) findViewById(R.id.txtvExplanation2);
final TextView txtvHeaderExplanation3 = (TextView) findViewById(R.id.txtvHeadingExplanation3);
final TextView txtvHeaderExplanation1 = findViewById(R.id.txtvHeadingExplanation1);
final TextView txtvExplanation1 = findViewById(R.id.txtvExplanation1);
final TextView txtvHeaderExplanation2 = findViewById(R.id.txtvHeadingExplanation2);
final TextView txtvExplanation2 = findViewById(R.id.txtvExplanation2);
final TextView txtvHeaderExplanation3 = findViewById(R.id.txtvHeadingExplanation3);
Button butChooseFilesystem = (Button) findViewById(R.id.butChooseFileFromFilesystem);
Button butChooseFilesystem = findViewById(R.id.butChooseFileFromFilesystem);
butChooseFilesystem.setOnClickListener(v -> chooseFileFromFilesystem());
Button butChooseExternal = (Button) findViewById(R.id.butChooseFileFromExternal);
Button butChooseExternal = findViewById(R.id.butChooseFileFromExternal);
butChooseExternal.setOnClickListener(v -> chooseFileFromExternal());
int nextOption = 1;

View File

@ -14,6 +14,8 @@ import de.danoeh.antennapod.core.export.opml.OpmlElement;
*/
public class OpmlImportHolder {
private OpmlImportHolder(){}
private static ArrayList<OpmlElement> readElements;
public static ArrayList<OpmlElement> getReadElements() {

View File

@ -12,11 +12,11 @@ import android.view.MenuItem;
import android.view.ViewGroup;
import android.widget.FrameLayout;
import java.lang.ref.WeakReference;
import com.bytehamster.lib.preferencesearch.SearchPreference;
import com.bytehamster.lib.preferencesearch.SearchPreferenceResult;
import com.bytehamster.lib.preferencesearch.SearchPreferenceResultListener;
import java.lang.ref.WeakReference;
import de.danoeh.antennapod.R;
import de.danoeh.antennapod.core.preferences.UserPreferences;
import de.danoeh.antennapod.preferences.PreferenceController;

View File

@ -53,9 +53,9 @@ public class StatisticsActivity extends AppCompatActivity
prefs = getSharedPreferences(PREF_NAME, MODE_PRIVATE);
countAll = prefs.getBoolean(PREF_COUNT_ALL, false);
totalTimeTextView = (TextView) findViewById(R.id.total_time);
feedStatisticsList = (ListView) findViewById(R.id.statistics_list);
progressBar = (ProgressBar) findViewById(R.id.progressBar);
totalTimeTextView = findViewById(R.id.total_time);
feedStatisticsList = findViewById(R.id.statistics_list);
progressBar = findViewById(R.id.progressBar);
listAdapter = new StatisticsListAdapter(this);
listAdapter.setCountAll(countAll);
feedStatisticsList.setAdapter(listAdapter);

View File

@ -42,7 +42,7 @@ public class StorageErrorActivity extends AppCompatActivity {
setContentView(R.layout.storage_error);
Button btnChooseDataFolder = (Button) findViewById(R.id.btnChooseDataFolder);
Button btnChooseDataFolder = findViewById(R.id.btnChooseDataFolder);
btnChooseDataFolder.setOnClickListener(v -> {
if (Build.VERSION_CODES.KITKAT <= Build.VERSION.SDK_INT &&
Build.VERSION.SDK_INT <= Build.VERSION_CODES.LOLLIPOP_MR1) {

View File

@ -23,6 +23,10 @@ import android.widget.FrameLayout;
import android.widget.LinearLayout;
import android.widget.ProgressBar;
import android.widget.SeekBar;
import java.lang.ref.WeakReference;
import java.util.concurrent.atomic.AtomicBoolean;
import de.danoeh.antennapod.R;
import de.danoeh.antennapod.core.feed.MediaType;
import de.danoeh.antennapod.core.preferences.UserPreferences;
@ -32,9 +36,6 @@ import de.danoeh.antennapod.core.util.gui.PictureInPictureUtil;
import de.danoeh.antennapod.core.util.playback.Playable;
import de.danoeh.antennapod.view.AspectRatioVideoView;
import java.lang.ref.WeakReference;
import java.util.concurrent.atomic.AtomicBoolean;
/**
* Activity for playing video files.
*/
@ -142,11 +143,11 @@ public class VideoplayerActivity extends MediaplayerActivity {
}
super.setupGUI();
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
controls = (LinearLayout) findViewById(R.id.controls);
videoOverlay = (LinearLayout) findViewById(R.id.overlay);
videoview = (AspectRatioVideoView) findViewById(R.id.videoview);
videoframe = (FrameLayout) findViewById(R.id.videoframe);
progressIndicator = (ProgressBar) findViewById(R.id.progressIndicator);
controls = findViewById(R.id.controls);
videoOverlay = findViewById(R.id.overlay);
videoview = findViewById(R.id.videoview);
videoframe = findViewById(R.id.videoframe);
progressIndicator = findViewById(R.id.progressIndicator);
videoview.getHolder().addCallback(surfaceHolderCallback);
videoframe.setOnTouchListener(onVideoviewTouched);
videoOverlay.setOnTouchListener((view, motionEvent) -> true); // To suppress touches directly below the slider

View File

@ -45,8 +45,6 @@ import de.danoeh.antennapod.core.service.GpodnetSyncService;
public class GpodnetAuthenticationActivity extends AppCompatActivity {
private static final String TAG = "GpodnetAuthActivity";
private static final String CURRENT_STEP = "current_step";
private ViewFlipper viewFlipper;
private static final int STEP_DEFAULT = -1;
@ -72,7 +70,7 @@ public class GpodnetAuthenticationActivity extends AppCompatActivity {
setContentView(R.layout.gpodnetauth_activity);
service = new GpodnetService();
viewFlipper = (ViewFlipper) findViewById(R.id.viewflipper);
viewFlipper = findViewById(R.id.viewflipper);
LayoutInflater inflater = (LayoutInflater)
getSystemService(Context.LAYOUT_INFLATER_SERVICE);
views = new View[]{
@ -109,11 +107,11 @@ public class GpodnetAuthenticationActivity extends AppCompatActivity {
}
private void setupLoginView(View view) {
final EditText username = (EditText) view.findViewById(R.id.etxtUsername);
final EditText password = (EditText) view.findViewById(R.id.etxtPassword);
final Button login = (Button) view.findViewById(R.id.butLogin);
final TextView txtvError = (TextView) view.findViewById(R.id.txtvError);
final ProgressBar progressBar = (ProgressBar) view.findViewById(R.id.progBarLogin);
final EditText username = view.findViewById(R.id.etxtUsername);
final EditText password = view.findViewById(R.id.etxtPassword);
final Button login = view.findViewById(R.id.butLogin);
final TextView txtvError = view.findViewById(R.id.txtvError);
final ProgressBar progressBar = view.findViewById(R.id.progBarLogin);
password.setOnEditorActionListener((v, actionID, event) ->
actionID == EditorInfo.IME_ACTION_GO && login.performClick());
@ -177,13 +175,13 @@ public class GpodnetAuthenticationActivity extends AppCompatActivity {
}
private void setupDeviceView(View view) {
final EditText deviceID = (EditText) view.findViewById(R.id.etxtDeviceID);
final EditText caption = (EditText) view.findViewById(R.id.etxtCaption);
final Button createNewDevice = (Button) view.findViewById(R.id.butCreateNewDevice);
final Button chooseDevice = (Button) view.findViewById(R.id.butChooseExistingDevice);
final TextView txtvError = (TextView) view.findViewById(R.id.txtvError);
final ProgressBar progBarCreateDevice = (ProgressBar) view.findViewById(R.id.progbarCreateDevice);
final Spinner spinnerDevices = (Spinner) view.findViewById(R.id.spinnerChooseDevice);
final EditText deviceID = view.findViewById(R.id.etxtDeviceID);
final EditText caption = view.findViewById(R.id.etxtCaption);
final Button createNewDevice = view.findViewById(R.id.butCreateNewDevice);
final Button chooseDevice = view.findViewById(R.id.butChooseExistingDevice);
final TextView txtvError = view.findViewById(R.id.txtvError);
final ProgressBar progBarCreateDevice = view.findViewById(R.id.progbarCreateDevice);
final Spinner spinnerDevices = view.findViewById(R.id.spinnerChooseDevice);
// load device list
@ -348,8 +346,8 @@ public class GpodnetAuthenticationActivity extends AppCompatActivity {
}
private void setupFinishView(View view) {
final Button sync = (Button) view.findViewById(R.id.butSyncNow);
final Button back = (Button) view.findViewById(R.id.butGoMainscreen);
final Button sync = view.findViewById(R.id.butSyncNow);
final Button back = view.findViewById(R.id.butGoMainscreen);
sync.setOnClickListener(v -> {
GpodnetSyncService.sendSyncIntent(GpodnetAuthenticationActivity.this);

View File

@ -1,6 +1,7 @@
package de.danoeh.antennapod.adapter;
import android.os.Build;
import android.support.annotation.Nullable;
import android.support.v4.content.ContextCompat;
import android.support.v7.widget.RecyclerView;
import android.support.v7.widget.helper.ItemTouchHelper;
@ -51,7 +52,7 @@ public class AllEpisodesRecycleAdapter extends RecyclerView.Adapter<AllEpisodesR
private final ActionButtonUtils actionButtonUtils;
private final boolean showOnlyNewEpisodes;
private int position = -1;
private FeedItem selectedItem;
private final int playingBackGroundColor;
private final int normalBackGroundColor;
@ -76,24 +77,24 @@ public class AllEpisodesRecycleAdapter extends RecyclerView.Adapter<AllEpisodesR
View view = LayoutInflater.from(parent.getContext())
.inflate(R.layout.new_episodes_listitem, parent, false);
Holder holder = new Holder(view);
holder.container = (FrameLayout) view.findViewById(R.id.container);
holder.content = (LinearLayout) view.findViewById(R.id.content);
holder.placeholder = (TextView) view.findViewById(R.id.txtvPlaceholder);
holder.title = (TextView) view.findViewById(R.id.txtvTitle);
holder.container = view.findViewById(R.id.container);
holder.content = view.findViewById(R.id.content);
holder.placeholder = view.findViewById(R.id.txtvPlaceholder);
holder.title = view.findViewById(R.id.txtvTitle);
if(Build.VERSION.SDK_INT >= 23) {
holder.title.setHyphenationFrequency(Layout.HYPHENATION_FREQUENCY_FULL);
}
holder.pubDate = (TextView) view
holder.pubDate = view
.findViewById(R.id.txtvPublished);
holder.statusUnread = view.findViewById(R.id.statusUnread);
holder.butSecondary = (ImageButton) view
holder.butSecondary = view
.findViewById(R.id.butSecondaryAction);
holder.queueStatus = (ImageView) view
holder.queueStatus = view
.findViewById(R.id.imgvInPlaylist);
holder.progress = (ProgressBar) view
holder.progress = view
.findViewById(R.id.pbar_progress);
holder.cover = (ImageView) view.findViewById(R.id.imgvCover);
holder.txtvDuration = (TextView) view.findViewById(R.id.txtvDuration);
holder.cover = view.findViewById(R.id.imgvCover);
holder.txtvDuration = view.findViewById(R.id.txtvDuration);
holder.item = null;
holder.mainActivityRef = mainActivityRef;
// so we can grab this later
@ -107,7 +108,7 @@ public class AllEpisodesRecycleAdapter extends RecyclerView.Adapter<AllEpisodesR
final FeedItem item = itemAccess.getItem(position);
if (item == null) return;
holder.itemView.setOnLongClickListener(v -> {
this.position = holder.getAdapterPosition();
this.selectedItem = item;
return false;
});
holder.item = item;
@ -200,6 +201,11 @@ public class AllEpisodesRecycleAdapter extends RecyclerView.Adapter<AllEpisodesR
.into(new CoverTarget(item.getFeed().getImageLocation(), holder.placeholder, holder.cover, mainActivityRef.get()));
}
@Nullable
public FeedItem getSelectedItem() {
return selectedItem;
}
@Override
public long getItemId(int position) {
FeedItem item = itemAccess.getItem(position);
@ -211,16 +217,6 @@ public class AllEpisodesRecycleAdapter extends RecyclerView.Adapter<AllEpisodesR
return itemAccess.getCount();
}
public FeedItem getItem(int position) {
return itemAccess.getItem(position);
}
public int getPosition() {
int pos = position;
position = -1; // reset
return pos;
}
private final View.OnClickListener secondaryActionListener = new View.OnClickListener() {
@Override
public void onClick(View v) {

View File

@ -57,12 +57,12 @@ public class ChaptersListAdapter extends ArrayAdapter<Chapter> {
convertView = inflater.inflate(R.layout.simplechapter_item, parent, false);
holder.view = convertView;
holder.title = (TextView) convertView.findViewById(R.id.txtvTitle);
holder.title = convertView.findViewById(R.id.txtvTitle);
defaultTextColor = holder.title.getTextColors().getDefaultColor();
holder.start = (TextView) convertView.findViewById(R.id.txtvStart);
holder.link = (TextView) convertView.findViewById(R.id.txtvLink);
holder.duration = (TextView) convertView.findViewById(R.id.txtvDuration);
holder.butPlayChapter = (ImageButton) convertView.findViewById(R.id.butPlayChapter);
holder.start = convertView.findViewById(R.id.txtvStart);
holder.link = convertView.findViewById(R.id.txtvLink);
holder.duration = convertView.findViewById(R.id.txtvDuration);
holder.butPlayChapter = convertView.findViewById(R.id.butPlayChapter);
convertView.setTag(holder);
} else {
holder = (Holder) convertView.getTag();

View File

@ -1,13 +1,12 @@
package de.danoeh.antennapod.adapter;
import android.content.Context;
import android.support.annotation.NonNull;
import android.content.Intent;
import android.widget.Toast;
import com.afollestad.materialdialogs.MaterialDialog;
import de.danoeh.antennapod.core.util.IntentUtils;
import de.danoeh.antennapod.core.util.playback.PlaybackServiceStarter;
import org.apache.commons.lang3.Validate;
import de.danoeh.antennapod.R;
@ -21,8 +20,10 @@ import de.danoeh.antennapod.core.storage.DBTasks;
import de.danoeh.antennapod.core.storage.DBWriter;
import de.danoeh.antennapod.core.storage.DownloadRequestException;
import de.danoeh.antennapod.core.storage.DownloadRequester;
import de.danoeh.antennapod.core.util.IntentUtils;
import de.danoeh.antennapod.core.util.LongList;
import de.danoeh.antennapod.core.util.NetworkUtils;
import de.danoeh.antennapod.core.util.playback.PlaybackServiceStarter;
/**
* Default implementation of an ActionButtonCallback

View File

@ -49,15 +49,15 @@ public class DownloadLogAdapter extends BaseAdapter {
LayoutInflater inflater = (LayoutInflater) context
.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
convertView = inflater.inflate(R.layout.downloadlog_item, parent, false);
holder.icon = (IconTextView) convertView.findViewById(R.id.txtvIcon);
holder.retry = (IconButton) convertView.findViewById(R.id.btnRetry);
holder.date = (TextView) convertView.findViewById(R.id.txtvDate);
holder.title = (TextView) convertView.findViewById(R.id.txtvTitle);
holder.icon = convertView.findViewById(R.id.txtvIcon);
holder.retry = convertView.findViewById(R.id.btnRetry);
holder.date = convertView.findViewById(R.id.txtvDate);
holder.title = convertView.findViewById(R.id.txtvTitle);
if(Build.VERSION.SDK_INT >= 23) {
holder.title.setHyphenationFrequency(Layout.HYPHENATION_FREQUENCY_FULL);
}
holder.type = (TextView) convertView.findViewById(R.id.txtvType);
holder.reason = (TextView) convertView.findViewById(R.id.txtvReason);
holder.type = convertView.findViewById(R.id.txtvType);
holder.reason = convertView.findViewById(R.id.txtvReason);
convertView.setTag(holder);
} else {
holder = (Holder) convertView.getTag();

View File

@ -61,16 +61,16 @@ public class DownloadedEpisodesListAdapter extends BaseAdapter {
.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
convertView = inflater.inflate(R.layout.downloaded_episodeslist_item,
parent, false);
holder.imageView = (ImageView) convertView.findViewById(R.id.imgvImage);
holder.title = (TextView) convertView.findViewById(R.id.txtvTitle);
holder.imageView = convertView.findViewById(R.id.imgvImage);
holder.title = convertView.findViewById(R.id.txtvTitle);
if(Build.VERSION.SDK_INT >= 23) {
holder.title.setHyphenationFrequency(Layout.HYPHENATION_FREQUENCY_FULL);
}
holder.txtvSize = (TextView) convertView.findViewById(R.id.txtvSize);
holder.queueStatus = (ImageView) convertView.findViewById(R.id.imgvInPlaylist);
holder.pubDate = (TextView) convertView
holder.txtvSize = convertView.findViewById(R.id.txtvSize);
holder.queueStatus = convertView.findViewById(R.id.imgvInPlaylist);
holder.pubDate = convertView
.findViewById(R.id.txtvPublished);
holder.butSecondary = (ImageButton) convertView
holder.butSecondary = convertView
.findViewById(R.id.butSecondaryAction);
convertView.setTag(holder);
} else {

View File

@ -59,14 +59,14 @@ public class DownloadlistAdapter extends BaseAdapter {
LayoutInflater inflater = (LayoutInflater) context
.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
convertView = inflater.inflate(R.layout.downloadlist_item, parent, false);
holder.title = (TextView) convertView.findViewById(R.id.txtvTitle);
holder.downloaded = (TextView) convertView
holder.title = convertView.findViewById(R.id.txtvTitle);
holder.downloaded = convertView
.findViewById(R.id.txtvDownloaded);
holder.percent = (TextView) convertView
holder.percent = convertView
.findViewById(R.id.txtvPercent);
holder.progbar = (ProgressBar) convertView
holder.progbar = convertView
.findViewById(R.id.progProgress);
holder.butSecondary = (ImageButton) convertView
holder.butSecondary = convertView
.findViewById(R.id.butSecondaryAction);
convertView.setTag(holder);

View File

@ -90,24 +90,24 @@ public class FeedItemlistAdapter extends BaseAdapter {
LayoutInflater inflater = (LayoutInflater) context
.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
convertView = inflater.inflate(R.layout.feeditemlist_item, parent, false);
holder.container = (LinearLayout) convertView
holder.container = convertView
.findViewById(R.id.container);
holder.title = (TextView) convertView.findViewById(R.id.txtvItemname);
holder.title = convertView.findViewById(R.id.txtvItemname);
if(Build.VERSION.SDK_INT >= 23) {
holder.title.setHyphenationFrequency(Layout.HYPHENATION_FREQUENCY_FULL);
}
holder.lenSize = (TextView) convertView
holder.lenSize = convertView
.findViewById(R.id.txtvLenSize);
holder.butAction = (ImageButton) convertView
holder.butAction = convertView
.findViewById(R.id.butSecondaryAction);
holder.published = (TextView) convertView
holder.published = convertView
.findViewById(R.id.txtvPublished);
holder.inPlaylist = (ImageView) convertView
holder.inPlaylist = convertView
.findViewById(R.id.imgvInPlaylist);
holder.type = (ImageView) convertView.findViewById(R.id.imgvType);
holder.type = convertView.findViewById(R.id.imgvType);
holder.statusUnread = convertView
.findViewById(R.id.statusUnread);
holder.episodeProgress = (ProgressBar) convertView
holder.episodeProgress = convertView
.findViewById(R.id.pbar_episode_progress);
convertView.setTag(holder);

View File

@ -34,9 +34,9 @@ public class FeedItemlistDescriptionAdapter extends ArrayAdapter<FeedItem> {
LayoutInflater inflater = (LayoutInflater) getContext()
.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
convertView = inflater.inflate(R.layout.itemdescription_listitem, parent, false);
holder.title = (TextView) convertView.findViewById(R.id.txtvTitle);
holder.pubDate = (TextView) convertView.findViewById(R.id.txtvPubDate);
holder.description = (TextView) convertView.findViewById(R.id.txtvDescription);
holder.title = convertView.findViewById(R.id.txtvTitle);
holder.pubDate = convertView.findViewById(R.id.txtvPubDate);
holder.description = convertView.findViewById(R.id.txtvDescription);
convertView.setTag(holder);
} else {

View File

@ -212,7 +212,7 @@ public class NavListAdapter extends BaseAdapter
v = getFeedView(position, convertView, parent);
}
if (v != null && viewType != VIEW_TYPE_SECTION_DIVIDER) {
TextView txtvTitle = (TextView) v.findViewById(R.id.txtvTitle);
TextView txtvTitle = v.findViewById(R.id.txtvTitle);
if (position == itemAccess.getSelectedItemIndex()) {
txtvTitle.setTypeface(null, Typeface.BOLD);
} else {
@ -235,9 +235,9 @@ public class NavListAdapter extends BaseAdapter
convertView = inflater.inflate(R.layout.nav_listitem, parent, false);
holder.image = (ImageView) convertView.findViewById(R.id.imgvCover);
holder.title = (TextView) convertView.findViewById(R.id.txtvTitle);
holder.count = (TextView) convertView.findViewById(R.id.txtvCount);
holder.image = convertView.findViewById(R.id.imgvCover);
holder.title = convertView.findViewById(R.id.txtvTitle);
holder.count = convertView.findViewById(R.id.txtvCount);
convertView.setTag(holder);
} else {
holder = (NavHolder) convertView.getTag();
@ -325,10 +325,10 @@ public class NavListAdapter extends BaseAdapter
convertView = inflater.inflate(R.layout.nav_feedlistitem, parent, false);
holder.image = (ImageView) convertView.findViewById(R.id.imgvCover);
holder.title = (TextView) convertView.findViewById(R.id.txtvTitle);
holder.failure = (IconTextView) convertView.findViewById(R.id.itxtvFailure);
holder.count = (TextView) convertView.findViewById(R.id.txtvCount);
holder.image = convertView.findViewById(R.id.imgvCover);
holder.title = convertView.findViewById(R.id.txtvTitle);
holder.failure = convertView.findViewById(R.id.itxtvFailure);
holder.count = convertView.findViewById(R.id.txtvCount);
convertView.setTag(holder);
} else {
holder = (FeedHolder) convertView.getTag();

View File

@ -25,7 +25,6 @@ import android.widget.TextView;
import com.bumptech.glide.Glide;
import com.joanzapata.iconify.Iconify;
import de.danoeh.antennapod.core.util.ThemeUtils;
import org.apache.commons.lang3.ArrayUtils;
import java.lang.ref.WeakReference;
@ -41,6 +40,7 @@ import de.danoeh.antennapod.core.util.Converter;
import de.danoeh.antennapod.core.util.DateUtils;
import de.danoeh.antennapod.core.util.LongList;
import de.danoeh.antennapod.core.util.NetworkUtils;
import de.danoeh.antennapod.core.util.ThemeUtils;
import de.danoeh.antennapod.fragment.ItemFragment;
import de.danoeh.antennapod.menuhandler.FeedItemMenuHandler;
@ -134,19 +134,19 @@ public class QueueRecyclerAdapter extends RecyclerView.Adapter<QueueRecyclerAdap
public ViewHolder(View v) {
super(v);
container = (FrameLayout) v.findViewById(R.id.container);
dragHandle = (ImageView) v.findViewById(R.id.drag_handle);
placeholder = (TextView) v.findViewById(R.id.txtvPlaceholder);
cover = (ImageView) v.findViewById(R.id.imgvCover);
title = (TextView) v.findViewById(R.id.txtvTitle);
container = v.findViewById(R.id.container);
dragHandle = v.findViewById(R.id.drag_handle);
placeholder = v.findViewById(R.id.txtvPlaceholder);
cover = v.findViewById(R.id.imgvCover);
title = v.findViewById(R.id.txtvTitle);
if(Build.VERSION.SDK_INT >= 23) {
title.setHyphenationFrequency(Layout.HYPHENATION_FREQUENCY_FULL);
}
pubDate = (TextView) v.findViewById(R.id.txtvPubDate);
progressLeft = (TextView) v.findViewById(R.id.txtvProgressLeft);
progressRight = (TextView) v.findViewById(R.id.txtvProgressRight);
butSecondary = (ImageButton) v.findViewById(R.id.butSecondaryAction);
progressBar = (ProgressBar) v.findViewById(R.id.progressBar);
pubDate = v.findViewById(R.id.txtvPubDate);
progressLeft = v.findViewById(R.id.txtvProgressLeft);
progressRight = v.findViewById(R.id.txtvProgressRight);
butSecondary = v.findViewById(R.id.butSecondaryAction);
progressBar = v.findViewById(R.id.progressBar);
v.setTag(this);
v.setOnClickListener(this);
v.setOnCreateContextMenuListener(this);

View File

@ -61,13 +61,13 @@ public class SearchlistAdapter extends BaseAdapter {
.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
convertView = inflater.inflate(R.layout.searchlist_item, parent, false);
holder.title = (TextView) convertView.findViewById(R.id.txtvTitle);
holder.title = convertView.findViewById(R.id.txtvTitle);
if(Build.VERSION.SDK_INT >= 23) {
holder.title.setHyphenationFrequency(Layout.HYPHENATION_FREQUENCY_FULL);
}
holder.cover = (ImageView) convertView
holder.cover = convertView
.findViewById(R.id.imgvFeedimage);
holder.subtitle = (TextView) convertView
holder.subtitle = convertView
.findViewById(R.id.txtvSubtitle);
convertView.setTag(holder);

View File

@ -62,9 +62,9 @@ public class StatisticsListAdapter extends BaseAdapter {
convertView = inflater.inflate(R.layout.statistics_listitem, parent, false);
holder.image = (ImageView) convertView.findViewById(R.id.imgvCover);
holder.title = (TextView) convertView.findViewById(R.id.txtvTitle);
holder.time = (TextView) convertView.findViewById(R.id.txtvTime);
holder.image = convertView.findViewById(R.id.imgvCover);
holder.title = convertView.findViewById(R.id.txtvTitle);
holder.time = convertView.findViewById(R.id.txtvTime);
convertView.setTag(holder);
} else {
holder = (StatisticsHolder) convertView.getTag();

View File

@ -89,9 +89,9 @@ public class SubscriptionsAdapter extends BaseAdapter implements AdapterView.OnI
LayoutInflater layoutInflater =
(LayoutInflater) mainActivityRef.get().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
convertView = layoutInflater.inflate(R.layout.subscription_item, parent, false);
holder.feedTitle = (TextView) convertView.findViewById(R.id.txtvTitle);
holder.imageView = (ImageView) convertView.findViewById(R.id.imgvCover);
holder.count = (TriangleLabelView) convertView.findViewById(R.id.triangleCountView);
holder.feedTitle = convertView.findViewById(R.id.txtvTitle);
holder.imageView = convertView.findViewById(R.id.imgvCover);
holder.count = convertView.findViewById(R.id.triangleCountView);
convertView.setTag(holder);

View File

@ -40,10 +40,10 @@ public class PodcastListAdapter extends ArrayAdapter<GpodnetPodcast> {
.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
convertView = inflater.inflate(R.layout.gpodnet_podcast_listitem, parent, false);
holder.image = (ImageView) convertView.findViewById(R.id.imgvCover);
holder.title = (TextView) convertView.findViewById(R.id.txtvTitle);
holder.subscribers = (TextView) convertView.findViewById(R.id.txtvSubscribers);
holder.url = (TextView) convertView.findViewById(R.id.txtvUrl);
holder.image = convertView.findViewById(R.id.imgvCover);
holder.title = convertView.findViewById(R.id.txtvTitle);
holder.subscribers = convertView.findViewById(R.id.txtvSubscribers);
holder.url = convertView.findViewById(R.id.txtvUrl);
convertView.setTag(holder);
} else {
holder = (Holder) convertView.getTag();

View File

@ -34,8 +34,8 @@ public class TagListAdapter extends ArrayAdapter<GpodnetTag> {
.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
convertView = inflater.inflate(R.layout.gpodnet_tag_listitem, parent, false);
holder.title = (TextView) convertView.findViewById(R.id.txtvTitle);
holder.usage = (TextView) convertView.findViewById(R.id.txtvUsage);
holder.title = convertView.findViewById(R.id.txtvTitle);
holder.usage = convertView.findViewById(R.id.txtvUsage);
convertView.setTag(holder);
} else {
holder = (Holder) convertView.getTag();

View File

@ -182,9 +182,9 @@ public class ItunesAdapter extends ArrayAdapter<ItunesAdapter.Podcast> {
* @param view GridView cell
*/
PodcastViewHolder(View view){
coverView = (ImageView) view.findViewById(R.id.imgvCover);
titleView = (TextView) view.findViewById(R.id.txtvTitle);
urlView = (TextView) view.findViewById(R.id.txtvUrl);
coverView = view.findViewById(R.id.imgvCover);
titleView = view.findViewById(R.id.txtvTitle);
urlView = view.findViewById(R.id.txtvUrl);
}
}
}

View File

@ -8,6 +8,8 @@ import de.danoeh.antennapod.core.ClientConfig;
*/
class ClientConfigurator {
private ClientConfigurator(){}
static {
ClientConfig.USER_AGENT = "AntennaPod/" + BuildConfig.VERSION_NAME;
ClientConfig.applicationCallbacks = new ApplicationCallbacksImpl();

View File

@ -2,7 +2,6 @@ package de.danoeh.antennapod.config;
import android.content.Context;
import android.content.Intent;
import android.os.Build;
import de.danoeh.antennapod.R;
import de.danoeh.antennapod.activity.AudioplayerActivity;

View File

@ -35,11 +35,11 @@ public abstract class AuthenticationDialog extends Dialog {
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.authentication_dialog);
final EditText etxtUsername = (EditText) findViewById(R.id.etxtUsername);
final EditText etxtPassword = (EditText) findViewById(R.id.etxtPassword);
final CheckBox saveUsernamePassword = (CheckBox) findViewById(R.id.chkSaveUsernamePassword);
final Button butConfirm = (Button) findViewById(R.id.butConfirm);
final Button butCancel = (Button) findViewById(R.id.butCancel);
final EditText etxtUsername = findViewById(R.id.etxtUsername);
final EditText etxtPassword = findViewById(R.id.etxtPassword);
final CheckBox saveUsernamePassword = findViewById(R.id.chkSaveUsernamePassword);
final Button butConfirm = findViewById(R.id.butConfirm);
final Button butCancel = findViewById(R.id.butCancel);
if (titleRes != 0) {
setTitle(titleRes);

View File

@ -29,9 +29,9 @@ public class AutoFlattrPreferenceDialog {
AlertDialog.Builder builder = new AlertDialog.Builder(activity);
@SuppressLint("InflateParams") View view = activity.getLayoutInflater().inflate(R.layout.autoflattr_preference_dialog, null);
final CheckBox chkAutoFlattr = (CheckBox) view.findViewById(R.id.chkAutoFlattr);
final SeekBar skbPercent = (SeekBar) view.findViewById(R.id.skbPercent);
final TextView txtvStatus = (TextView) view.findViewById(R.id.txtvStatus);
final CheckBox chkAutoFlattr = view.findViewById(R.id.chkAutoFlattr);
final SeekBar skbPercent = view.findViewById(R.id.skbPercent);
final TextView txtvStatus = view.findViewById(R.id.txtvStatus);
chkAutoFlattr.setChecked(UserPreferences.isAutoFlattr());
skbPercent.setEnabled(chkAutoFlattr.isChecked());

View File

@ -1,5 +1,6 @@
package de.danoeh.antennapod.dialog;
import android.app.AlertDialog;
import android.content.res.TypedArray;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
@ -84,7 +85,7 @@ public class EpisodesApplyActionFragment extends Fragment {
Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.episodes_apply_action_fragment, container, false);
mListView = (ListView) view.findViewById(android.R.id.list);
mListView = view.findViewById(android.R.id.list);
mListView.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE);
mListView.setOnItemClickListener((ListView, view1, position, rowId) -> {
long id = episodes.get(position).getId();
@ -95,6 +96,28 @@ public class EpisodesApplyActionFragment extends Fragment {
}
refreshCheckboxes();
});
mListView.setOnItemLongClickListener((adapterView, view12, position, id) -> {
new AlertDialog.Builder(getActivity())
.setItems(R.array.batch_long_press_options, (dialogInterface, item) -> {
int direction;
if (item == 0) {
direction = -1;
} else {
direction = 1;
}
int currentPosition = position + direction;
while (currentPosition >= 0 && currentPosition < episodes.size()) {
long id1 = episodes.get(currentPosition).getId();
if (!checkedIds.contains(id1)) {
checkedIds.add(id1);
}
currentPosition += direction;
}
refreshCheckboxes();
}).show();
return true;
});
for(FeedItem episode : episodes) {
titles.add(episode.getTitle());
@ -106,7 +129,7 @@ public class EpisodesApplyActionFragment extends Fragment {
checkAll();
int lastVisibleDiv = 0;
btnAddToQueue = (Button) view.findViewById(R.id.btnAddToQueue);
btnAddToQueue = view.findViewById(R.id.btnAddToQueue);
if((actions & ACTION_QUEUE) != 0) {
btnAddToQueue.setOnClickListener(v -> queueChecked());
lastVisibleDiv = R.id.divider1;
@ -114,7 +137,7 @@ public class EpisodesApplyActionFragment extends Fragment {
btnAddToQueue.setVisibility(View.GONE);
view.findViewById(R.id.divider1).setVisibility(View.GONE);
}
btnMarkAsPlayed = (Button) view.findViewById(R.id.btnMarkAsPlayed);
btnMarkAsPlayed = view.findViewById(R.id.btnMarkAsPlayed);
if((actions & ACTION_MARK_PLAYED) != 0) {
btnMarkAsPlayed.setOnClickListener(v -> markedCheckedPlayed());
lastVisibleDiv = R.id.divider2;
@ -122,7 +145,7 @@ public class EpisodesApplyActionFragment extends Fragment {
btnMarkAsPlayed.setVisibility(View.GONE);
view.findViewById(R.id.divider2).setVisibility(View.GONE);
}
btnMarkAsUnplayed = (Button) view.findViewById(R.id.btnMarkAsUnplayed);
btnMarkAsUnplayed = view.findViewById(R.id.btnMarkAsUnplayed);
if((actions & ACTION_MARK_UNPLAYED) != 0) {
btnMarkAsUnplayed.setOnClickListener(v -> markedCheckedUnplayed());
lastVisibleDiv = R.id.divider3;
@ -130,7 +153,7 @@ public class EpisodesApplyActionFragment extends Fragment {
btnMarkAsUnplayed.setVisibility(View.GONE);
view.findViewById(R.id.divider3).setVisibility(View.GONE);
}
btnDownload = (Button) view.findViewById(R.id.btnDownload);
btnDownload = view.findViewById(R.id.btnDownload);
if((actions & ACTION_DOWNLOAD) != 0) {
btnDownload.setOnClickListener(v -> downloadChecked());
lastVisibleDiv = R.id.divider4;
@ -138,7 +161,7 @@ public class EpisodesApplyActionFragment extends Fragment {
btnDownload.setVisibility(View.GONE);
view.findViewById(R.id.divider4).setVisibility(View.GONE);
}
btnDelete = (Button) view.findViewById(R.id.btnDelete);
btnDelete = view.findViewById(R.id.btnDelete);
if((actions & ACTION_REMOVE) != 0) {
btnDelete.setOnClickListener(v -> deleteChecked());
} else {

View File

@ -17,6 +17,9 @@ import de.danoeh.antennapod.core.preferences.GpodnetPreferences;
* Creates a dialog that lets the user change the hostname for the gpodder.net service.
*/
public class GpodnetSetHostnameDialog {
private GpodnetSetHostnameDialog(){}
private static final String TAG = "GpodnetSetHostnameDialog";
public static AlertDialog createDialog(final Context context) {

View File

@ -102,7 +102,7 @@ public class ProxyDialog {
.autoDismiss(false)
.build();
View view = dialog.getCustomView();
spType = (Spinner) view.findViewById(R.id.spType);
spType = view.findViewById(R.id.spType);
String[] types = { Proxy.Type.DIRECT.name(), Proxy.Type.HTTP.name() };
ArrayAdapter<String> adapter = new ArrayAdapter<>(context,
android.R.layout.simple_spinner_item, types);
@ -110,22 +110,22 @@ public class ProxyDialog {
spType.setAdapter(adapter);
ProxyConfig proxyConfig = UserPreferences.getProxyConfig();
spType.setSelection(adapter.getPosition(proxyConfig.type.name()));
etHost = (EditText) view.findViewById(R.id.etHost);
etHost = view.findViewById(R.id.etHost);
if(!TextUtils.isEmpty(proxyConfig.host)) {
etHost.setText(proxyConfig.host);
}
etHost.addTextChangedListener(requireTestOnChange);
etPort = (EditText) view.findViewById(R.id.etPort);
etPort = view.findViewById(R.id.etPort);
if(proxyConfig.port > 0) {
etPort.setText(String.valueOf(proxyConfig.port));
}
etPort.addTextChangedListener(requireTestOnChange);
etUsername = (EditText) view.findViewById(R.id.etUsername);
etUsername = view.findViewById(R.id.etUsername);
if(!TextUtils.isEmpty(proxyConfig.username)) {
etUsername.setText(proxyConfig.username);
}
etUsername.addTextChangedListener(requireTestOnChange);
etPassword = (EditText) view.findViewById(R.id.etPassword);
etPassword = view.findViewById(R.id.etPassword);
if(!TextUtils.isEmpty(proxyConfig.password)) {
etPassword.setText(proxyConfig.username);
}
@ -146,7 +146,7 @@ public class ProxyDialog {
enableSettings(false);
}
});
txtvMessage = (TextView) view.findViewById(R.id.txtvMessage);
txtvMessage = view.findViewById(R.id.txtvMessage);
checkValidity();
return dialog;
}

View File

@ -17,6 +17,8 @@ import de.danoeh.antennapod.R;
public class RatingDialog {
private RatingDialog(){}
private static final String TAG = RatingDialog.class.getSimpleName();
private static final int AFTER_DAYS = 7;

View File

@ -61,11 +61,11 @@ public abstract class SleepTimerDialog {
dialog = builder.build();
View view = dialog.getView();
etxtTime = (EditText) view.findViewById(R.id.etxtTime);
spTimeUnit = (Spinner) view.findViewById(R.id.spTimeUnit);
cbShakeToReset = (CheckBox) view.findViewById(R.id.cbShakeToReset);
cbVibrate = (CheckBox) view.findViewById(R.id.cbVibrate);
chAutoEnable = (CheckBox) view.findViewById(R.id.chAutoEnable);
etxtTime = view.findViewById(R.id.etxtTime);
spTimeUnit = view.findViewById(R.id.spTimeUnit);
cbShakeToReset = view.findViewById(R.id.cbShakeToReset);
cbVibrate = view.findViewById(R.id.cbVibrate);
chAutoEnable = view.findViewById(R.id.chAutoEnable);
etxtTime.setText(SleepTimerPreferences.lastTimerValue());
etxtTime.addTextChangedListener(new TextWatcher() {

View File

@ -32,18 +32,18 @@ public class AddFeedFragment extends Fragment {
super.onCreateView(inflater, container, savedInstanceState);
View root = inflater.inflate(R.layout.addfeed, container, false);
final EditText etxtFeedurl = (EditText) root.findViewById(R.id.etxtFeedurl);
final EditText etxtFeedurl = root.findViewById(R.id.etxtFeedurl);
Bundle args = getArguments();
if (args != null && args.getString(ARG_FEED_URL) != null) {
etxtFeedurl.setText(args.getString(ARG_FEED_URL));
}
Button butSearchITunes = (Button) root.findViewById(R.id.butSearchItunes);
Button butBrowserGpoddernet = (Button) root.findViewById(R.id.butBrowseGpoddernet);
Button butSearchFyyd = (Button) root.findViewById(R.id.butSearchFyyd);
Button butOpmlImport = (Button) root.findViewById(R.id.butOpmlImport);
Button butConfirm = (Button) root.findViewById(R.id.butConfirm);
Button butSearchITunes = root.findViewById(R.id.butSearchItunes);
Button butBrowserGpoddernet = root.findViewById(R.id.butBrowseGpoddernet);
Button butSearchFyyd = root.findViewById(R.id.butSearchFyyd);
Button butOpmlImport = root.findViewById(R.id.butOpmlImport);
Button butConfirm = root.findViewById(R.id.butConfirm);
final MainActivity activity = (MainActivity) getActivity();
activity.getSupportActionBar().setTitle(R.string.add_feed_label);

View File

@ -275,14 +275,10 @@ public class AllEpisodesFragment extends Fragment {
if(item.getItemId() == R.id.share_item) {
return true; // avoids that the position is reset when we need it in the submenu
}
int pos = listAdapter.getPosition();
if(pos < 0) {
return false;
}
FeedItem selectedItem = itemAccess.getItem(pos);
FeedItem selectedItem = listAdapter.getSelectedItem();
if (selectedItem == null) {
Log.i(TAG, "Selected item at position " + pos + " was null, ignoring selection");
Log.i(TAG, "Selected item was null, ignoring selection");
return super.onContextItemSelected(item);
}
@ -313,7 +309,7 @@ public class AllEpisodesFragment extends Fragment {
View root = inflater.inflate(fragmentResource, container, false);
recyclerView = (RecyclerView) root.findViewById(android.R.id.list);
recyclerView = root.findViewById(android.R.id.list);
RecyclerView.ItemAnimator animator = recyclerView.getItemAnimator();
if (animator instanceof SimpleItemAnimator) {
((SimpleItemAnimator) animator).setSupportsChangeAnimations(false);
@ -323,7 +319,7 @@ public class AllEpisodesFragment extends Fragment {
recyclerView.setHasFixedSize(true);
recyclerView.addItemDecoration(new HorizontalDividerItemDecoration.Builder(getActivity()).build());
progLoading = (ProgressBar) root.findViewById(R.id.progLoading);
progLoading = root.findViewById(R.id.progLoading);
if (!itemsLoaded) {
progLoading.setVisibility(View.VISIBLE);

View File

@ -22,7 +22,6 @@ import de.danoeh.antennapod.core.util.playback.Playable;
public class CoverFragment extends Fragment implements MediaplayerInfoContentFragment {
private static final String TAG = "CoverFragment";
private static final String ARG_PLAYABLE = "arg.playable";
private Playable media;
@ -49,9 +48,9 @@ public class CoverFragment extends Fragment implements MediaplayerInfoContentFra
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
root = inflater.inflate(R.layout.cover_fragment, container, false);
txtvPodcastTitle = (TextView) root.findViewById(R.id.txtvPodcastTitle);
txtvEpisodeTitle = (TextView) root.findViewById(R.id.txtvEpisodeTitle);
imgvCover = (ImageView) root.findViewById(R.id.imgvCover);
txtvPodcastTitle = root.findViewById(R.id.txtvPodcastTitle);
txtvEpisodeTitle = root.findViewById(R.id.txtvEpisodeTitle);
imgvCover = root.findViewById(R.id.imgvCover);
return root;
}

View File

@ -38,12 +38,12 @@ public class DownloadsFragment extends Fragment {
super.onCreateView(inflater, container, savedInstanceState);
View root = inflater.inflate(R.layout.pager_fragment, container, false);
viewPager = (ViewPager)root.findViewById(R.id.viewpager);
viewPager = root.findViewById(R.id.viewpager);
DownloadsPagerAdapter pagerAdapter = new DownloadsPagerAdapter(getChildFragmentManager(), getResources());
viewPager.setAdapter(pagerAdapter);
// Give the TabLayout the ViewPager
tabLayout = (TabLayout) root.findViewById(R.id.sliding_tabs);
tabLayout = root.findViewById(R.id.sliding_tabs);
tabLayout.setupWithViewPager(viewPager);
return root;

View File

@ -46,11 +46,11 @@ public class EpisodesFragment extends Fragment {
((MainActivity) getActivity()).getSupportActionBar().setTitle(R.string.episodes_label);
View rootView = inflater.inflate(R.layout.pager_fragment, container, false);
viewPager = (ViewPager)rootView.findViewById(R.id.viewpager);
viewPager = rootView.findViewById(R.id.viewpager);
viewPager.setAdapter(new EpisodesPagerAdapter(getChildFragmentManager(), getResources()));
// Give the TabLayout the ViewPager
tabLayout = (TabLayout) rootView.findViewById(R.id.sliding_tabs);
tabLayout = rootView.findViewById(R.id.sliding_tabs);
tabLayout.setupWithViewPager(viewPager);
return rootView;

View File

@ -20,7 +20,6 @@ import de.danoeh.antennapod.R;
import de.danoeh.antennapod.core.feed.MediaType;
import de.danoeh.antennapod.core.glide.ApGlideSettings;
import de.danoeh.antennapod.core.service.playback.PlaybackService;
import de.danoeh.antennapod.core.util.Converter;
import de.danoeh.antennapod.core.util.playback.Playable;
import de.danoeh.antennapod.core.util.playback.PlaybackController;
import io.reactivex.Maybe;
@ -53,12 +52,12 @@ public class ExternalPlayerFragment extends Fragment {
Bundle savedInstanceState) {
View root = inflater.inflate(R.layout.external_player_fragment,
container, false);
fragmentLayout = (ViewGroup) root.findViewById(R.id.fragmentLayout);
imgvCover = (ImageView) root.findViewById(R.id.imgvCover);
txtvTitle = (TextView) root.findViewById(R.id.txtvTitle);
butPlay = (ImageButton) root.findViewById(R.id.butPlay);
mFeedName = (TextView) root.findViewById(R.id.txtvAuthor);
mProgressBar = (ProgressBar) root.findViewById(R.id.episodeProgress);
fragmentLayout = root.findViewById(R.id.fragmentLayout);
imgvCover = root.findViewById(R.id.imgvCover);
txtvTitle = root.findViewById(R.id.txtvTitle);
butPlay = root.findViewById(R.id.butPlay);
mFeedName = root.findViewById(R.id.txtvAuthor);
mProgressBar = root.findViewById(R.id.episodeProgress);
fragmentLayout.setOnClickListener(v -> {
Log.d(TAG, "layoutInfo was clicked");
@ -83,7 +82,7 @@ public class ExternalPlayerFragment extends Fragment {
super.onActivityCreated(savedInstanceState);
controller = setupPlaybackController();
butPlay.setOnClickListener(v -> {
if(controller != null) {
if (controller != null) {
controller.playPause();
}
});
@ -144,6 +143,9 @@ public class ExternalPlayerFragment extends Fragment {
if (controller != null) {
controller.release();
}
if (disposable != null) {
disposable.dispose();
}
}
@Override
@ -164,7 +166,7 @@ public class ExternalPlayerFragment extends Fragment {
controller = setupPlaybackController();
if (butPlay != null) {
butPlay.setOnClickListener(v -> {
if(controller != null) {
if (controller != null) {
controller.playPause();
}
});
@ -179,6 +181,9 @@ public class ExternalPlayerFragment extends Fragment {
return false;
}
if (disposable != null) {
disposable.dispose();
}
disposable = Maybe.create(emitter -> {
Playable media = controller.getMedia();
if(media != null) {
@ -216,15 +221,10 @@ public class ExternalPlayerFragment extends Fragment {
butPlay.setVisibility(View.VISIBLE);
}
} else {
Log.w(TAG, "loadMediaInfo was called while the media object of playbackService was null!");
Log.w(TAG, "loadMediaInfo was called while the media object of playbackService was null!");
}
}
private String getPositionString(int position, int duration) {
return Converter.getDurationStringLong(position) + " / "
+ Converter.getDurationStringLong(duration);
}
public PlaybackController getPlaybackControllerTestingOnly() {
return controller;
}

View File

@ -75,7 +75,7 @@ public class FyydSearchFragment extends Fragment {
Bundle savedInstanceState) {
// Inflate the layout for this fragment
View root = inflater.inflate(R.layout.fragment_itunes_search, container, false);
gridView = (GridView) root.findViewById(R.id.gridView);
gridView = root.findViewById(R.id.gridView);
adapter = new ItunesAdapter(getActivity(), new ArrayList<>());
gridView.setAdapter(adapter);
@ -87,10 +87,10 @@ public class FyydSearchFragment extends Fragment {
intent.putExtra(OnlineFeedViewActivity.ARG_TITLE, podcast.title);
startActivity(intent);
});
progressBar = (ProgressBar) root.findViewById(R.id.progressBar);
txtvError = (TextView) root.findViewById(R.id.txtvError);
butRetry = (Button) root.findViewById(R.id.butRetry);
txtvEmpty = (TextView) root.findViewById(android.R.id.empty);
progressBar = root.findViewById(R.id.progressBar);
txtvError = root.findViewById(R.id.txtvError);
butRetry = root.findViewById(R.id.butRetry);
txtvEmpty = root.findViewById(android.R.id.empty);
return root;
}

View File

@ -165,25 +165,25 @@ public class ItemFragment extends Fragment implements OnSwipeGesture {
super.onCreateView(inflater, container, savedInstanceState);
View layout = inflater.inflate(R.layout.feeditem_fragment, container, false);
root = (ViewGroup) layout.findViewById(R.id.content_root);
root = layout.findViewById(R.id.content_root);
LinearLayout header = (LinearLayout) root.findViewById(R.id.header);
LinearLayout header = root.findViewById(R.id.header);
if(feedItems.length > 0) {
header.setOnTouchListener((v, event) -> headerGestureDetector.onTouchEvent(event));
}
txtvPodcast = (TextView) layout.findViewById(R.id.txtvPodcast);
txtvPodcast = layout.findViewById(R.id.txtvPodcast);
txtvPodcast.setOnClickListener(v -> openPodcast());
txtvTitle = (TextView) layout.findViewById(R.id.txtvTitle);
txtvTitle = layout.findViewById(R.id.txtvTitle);
if(Build.VERSION.SDK_INT >= 23) {
txtvTitle.setHyphenationFrequency(Layout.HYPHENATION_FREQUENCY_FULL);
}
txtvDuration = (TextView) layout.findViewById(R.id.txtvDuration);
txtvPublished = (TextView) layout.findViewById(R.id.txtvPublished);
txtvDuration = layout.findViewById(R.id.txtvDuration);
txtvPublished = layout.findViewById(R.id.txtvPublished);
if (Build.VERSION.SDK_INT >= 14) { // ellipsize is causing problems on old versions, see #448
txtvTitle.setEllipsize(TextUtils.TruncateAt.END);
}
webvDescription = (WebView) layout.findViewById(R.id.webvDescription);
webvDescription = layout.findViewById(R.id.webvDescription);
if (UserPreferences.getTheme() == R.style.Theme_AntennaPod_Dark ||
UserPreferences.getTheme() == R.style.Theme_AntennaPod_TrueBlack) {
if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.ICE_CREAM_SANDWICH_MR1) {
@ -215,12 +215,12 @@ public class ItemFragment extends Fragment implements OnSwipeGesture {
});
registerForContextMenu(webvDescription);
imgvCover = (ImageView) layout.findViewById(R.id.imgvCover);
imgvCover = layout.findViewById(R.id.imgvCover);
imgvCover.setOnClickListener(v -> openPodcast());
progbarDownload = (ProgressBar) layout.findViewById(R.id.progbarDownload);
progbarLoading = (ProgressBar) layout.findViewById(R.id.progbarLoading);
butAction1 = (IconButton) layout.findViewById(R.id.butAction1);
butAction2 = (IconButton) layout.findViewById(R.id.butAction2);
progbarDownload = layout.findViewById(R.id.progbarDownload);
progbarLoading = layout.findViewById(R.id.progbarLoading);
butAction1 = layout.findViewById(R.id.butAction1);
butAction2 = layout.findViewById(R.id.butAction2);
butAction1.setOnClickListener(v -> {
if (item == null) {

View File

@ -412,13 +412,10 @@ public class ItemlistFragment extends ListFragment {
}
private boolean insideOnFragmentLoaded = false;
private void onFragmentLoaded() {
if(!isVisible()) {
return;
}
insideOnFragmentLoaded = true;
if (adapter == null) {
setListAdapter(null);
setupHeaderView();
@ -435,9 +432,6 @@ public class ItemlistFragment extends ListFragment {
if (feed != null && feed.getNextPageLink() == null && listFooter != null) {
getListView().removeFooterView(listFooter.getRoot());
}
insideOnFragmentLoaded = false;
}
private void refreshHeaderView() {
@ -481,14 +475,14 @@ public class ItemlistFragment extends ListFragment {
View header = inflater.inflate(R.layout.feeditemlist_header, lv, false);
lv.addHeaderView(header);
txtvTitle = (TextView) header.findViewById(R.id.txtvTitle);
TextView txtvAuthor = (TextView) header.findViewById(R.id.txtvAuthor);
imgvBackground = (ImageView) header.findViewById(R.id.imgvBackground);
imgvCover = (ImageView) header.findViewById(R.id.imgvCover);
ImageButton butShowInfo = (ImageButton) header.findViewById(R.id.butShowInfo);
ImageButton butShowSettings = (ImageButton) header.findViewById(R.id.butShowSettings);
txtvInformation = (TextView) header.findViewById(R.id.txtvInformation);
txtvFailure = (IconTextView) header.findViewById(R.id.txtvFailure);
txtvTitle = header.findViewById(R.id.txtvTitle);
TextView txtvAuthor = header.findViewById(R.id.txtvAuthor);
imgvBackground = header.findViewById(R.id.imgvBackground);
imgvCover = header.findViewById(R.id.imgvCover);
ImageButton butShowInfo = header.findViewById(R.id.butShowInfo);
ImageButton butShowSettings = header.findViewById(R.id.butShowSettings);
txtvInformation = header.findViewById(R.id.txtvInformation);
txtvFailure = header.findViewById(R.id.txtvFailure);
txtvTitle.setText(feed.getTitle());
txtvAuthor.setText(feed.getAuthor());

View File

@ -110,7 +110,7 @@ public class ItunesSearchFragment extends Fragment {
Bundle savedInstanceState) {
// Inflate the layout for this fragment
View root = inflater.inflate(R.layout.fragment_itunes_search, container, false);
gridView = (GridView) root.findViewById(R.id.gridView);
gridView = root.findViewById(R.id.gridView);
adapter = new ItunesAdapter(getActivity(), new ArrayList<>());
gridView.setAdapter(adapter);
@ -170,10 +170,10 @@ public class ItunesSearchFragment extends Fragment {
});
}
});
progressBar = (ProgressBar) root.findViewById(R.id.progressBar);
txtvError = (TextView) root.findViewById(R.id.txtvError);
butRetry = (Button) root.findViewById(R.id.butRetry);
txtvEmpty = (TextView) root.findViewById(android.R.id.empty);
progressBar = root.findViewById(R.id.progressBar);
txtvError = root.findViewById(R.id.txtvError);
butRetry = root.findViewById(R.id.butRetry);
txtvEmpty = root.findViewById(android.R.id.empty);
loadToplist();

View File

@ -380,8 +380,8 @@ public class QueueFragment extends Fragment {
((MainActivity) getActivity()).getSupportActionBar().setTitle(R.string.queue_label);
View root = inflater.inflate(R.layout.queue_fragment, container, false);
infoBar = (TextView) root.findViewById(R.id.info_bar);
recyclerView = (RecyclerView) root.findViewById(R.id.recyclerView);
infoBar = root.findViewById(R.id.info_bar);
recyclerView = root.findViewById(R.id.recyclerView);
RecyclerView.ItemAnimator animator = recyclerView.getItemAnimator();
if (animator instanceof SimpleItemAnimator) {
((SimpleItemAnimator) animator).setSupportsChangeAnimations(false);
@ -487,16 +487,16 @@ public class QueueFragment extends Fragment {
private void reallyMoved(int from, int to) {
// Write drag operation to database
Log.d(TAG, "Write to database move(" + dragFrom + ", " + dragTo + ")");
DBWriter.moveQueueItem(dragFrom, dragTo, true);
Log.d(TAG, "Write to database move(" + from + ", " + to + ")");
DBWriter.moveQueueItem(from, to, true);
}
}
);
itemTouchHelper.attachToRecyclerView(recyclerView);
txtvEmpty = (TextView) root.findViewById(android.R.id.empty);
txtvEmpty = root.findViewById(android.R.id.empty);
txtvEmpty.setVisibility(View.GONE);
progLoading = (ProgressBar) root.findViewById(R.id.progLoading);
progLoading = root.findViewById(R.id.progLoading);
progLoading.setVisibility(View.VISIBLE);
return root;
@ -533,9 +533,12 @@ public class QueueFragment extends Fragment {
String info = queue.size() + getString(R.string.episodes_suffix);
if(queue.size() > 0) {
long timeLeft = 0;
float playbackSpeed = Float.valueOf(UserPreferences.getPlaybackSpeed());
for(FeedItem item : queue) {
if(item.getMedia() != null) {
timeLeft += item.getMedia().getDuration() - item.getMedia().getPosition();
timeLeft +=
(long) ((item.getMedia().getDuration() - item.getMedia().getPosition())
/ playbackSpeed);
}
}
info += " \u2022 ";

View File

@ -68,7 +68,7 @@ public class SubscriptionFragment extends Fragment {
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View root = inflater.inflate(R.layout.fragment_subscriptions, container, false);
subscriptionGridLayout = (GridView) root.findViewById(R.id.subscriptions_grid);
subscriptionGridLayout = root.findViewById(R.id.subscriptions_grid);
registerForContextMenu(subscriptionGridLayout);
return root;
}

View File

@ -31,12 +31,12 @@ public class GpodnetMainFragment extends Fragment {
super.onCreateView(inflater, container, savedInstanceState);
View root = inflater.inflate(R.layout.pager_fragment, container, false);
viewPager = (ViewPager)root.findViewById(R.id.viewpager);
viewPager = root.findViewById(R.id.viewpager);
GpodnetPagerAdapter pagerAdapter = new GpodnetPagerAdapter(getChildFragmentManager(), getResources());
viewPager.setAdapter(pagerAdapter);
// Give the TabLayout the ViewPager
tabLayout = (TabLayout) root.findViewById(R.id.sliding_tabs);
tabLayout = root.findViewById(R.id.sliding_tabs);
tabLayout.setupWithViewPager(viewPager);
return root;

View File

@ -78,10 +78,10 @@ public abstract class PodcastListFragment extends Fragment {
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View root = inflater.inflate(R.layout.gpodnet_podcast_list, container, false);
gridView = (GridView) root.findViewById(R.id.gridView);
progressBar = (ProgressBar) root.findViewById(R.id.progressBar);
txtvError = (TextView) root.findViewById(R.id.txtvError);
butRetry = (Button) root.findViewById(R.id.butRetry);
gridView = root.findViewById(R.id.gridView);
progressBar = root.findViewById(R.id.progressBar);
txtvError = root.findViewById(R.id.txtvError);
butRetry = root.findViewById(R.id.butRetry);
gridView.setOnItemClickListener((parent, view, position, id) ->
onPodcastSelected((GpodnetPodcast) gridView.getAdapter().getItem(position)));

View File

@ -30,6 +30,9 @@ import de.danoeh.antennapod.core.util.ShareUtils;
* Handles interactions with the FeedItemMenu.
*/
public class FeedMenuHandler {
private FeedMenuHandler(){ }
private static final String TAG = "FeedMenuHandler";
public static boolean onCreateOptionsMenu(MenuInflater inflater, Menu menu) {

View File

@ -19,7 +19,7 @@ public class MenuItemUtils extends de.danoeh.antennapod.core.menuhandler.MenuIte
public static void adjustTextColor(Context context, SearchView sv) {
if(Build.VERSION.SDK_INT < 14) {
EditText searchEditText = (EditText) sv.findViewById(R.id.search_src_text);
EditText searchEditText = sv.findViewById(R.id.search_src_text);
if (UserPreferences.getTheme() == de.danoeh.antennapod.R.style.Theme_AntennaPod_Dark
|| UserPreferences.getTheme() == R.style.Theme_AntennaPod_TrueBlack) {
searchEditText.setTextColor(Color.WHITE);

View File

@ -9,6 +9,7 @@ import android.support.v7.preference.PreferenceViewHolder;
import android.util.AttributeSet;
import android.util.TypedValue;
import android.widget.TextView;
import de.danoeh.antennapod.R;
public class MasterSwitchPreference extends SwitchPreference {

View File

@ -8,6 +8,7 @@ import android.util.AttributeSet;
import android.view.View;
import android.view.WindowManager;
import android.widget.EditText;
import de.danoeh.antennapod.R;
public class NumberPickerPreference extends Preference {

View File

@ -227,6 +227,33 @@ public class PreferenceController implements SharedPreferences.OnSharedPreferenc
return true;
});
ui.findPreference(UserPreferences.PREF_BACK_BUTTON_BEHAVIOR)
.setOnPreferenceChangeListener((preference, newValue) -> {
if (newValue.equals("page")) {
final Context context = ui.getActivity();
final String[] navTitles = context.getResources().getStringArray(R.array.back_button_go_to_pages);
final String[] navTags = context.getResources().getStringArray(R.array.back_button_go_to_pages_tags);
final String choice[] = { UserPreferences.getBackButtonGoToPage() };
AlertDialog.Builder builder = new AlertDialog.Builder(context);
builder.setTitle(R.string.back_button_go_to_page_title);
builder.setSingleChoiceItems(navTitles, ArrayUtils.indexOf(navTags, UserPreferences.getBackButtonGoToPage()), (dialogInterface, i) -> {
if (i >= 0) {
choice[0] = navTags[i];
}
});
builder.setPositiveButton(R.string.confirm_label, (dialogInterface, i) -> UserPreferences.setBackButtonGoToPage(choice[0]));
builder.setNegativeButton(R.string.cancel_label, null);
builder.create().show();
return true;
} else {
return true;
}
});
if (Build.VERSION.SDK_INT >= 26) {
ui.findPreference(UserPreferences.PREF_EXPANDED_NOTIFICATION).setVisible(false);
}
}
private void setupStorageScreen() {

View File

@ -33,7 +33,7 @@ public class SPAUtil {
* sent before.
*/
public static synchronized boolean sendSPAppsQueryFeedsIntent(Context context) {
if (context == null) throw new IllegalArgumentException("context = null");
assert context != null : "context = null";
final Context appContext = context.getApplicationContext();
if (appContext == null) {
Log.wtf(TAG, "Unable to get application context");

View File

@ -1,4 +1,4 @@
AntennaPod ist ein Podcast-Manager und -Player, der Dir unmittelbar Zugriff auf Millionen von freien und bezahlten Podcasts ermöglicht, angefangen von unabhängigen Podcastern zu großen Rundfunkanstalten oder Hörfunksendern wie BBC, NPR und CNN. Abonniere, importiere und exportiere deine Feeds mühelos mit Hilfe des iTunes-Verzeichnisses, OPML-Dateien oder einfachen RSS-URLs. Reduziere Aufwand, Stromverbrauch und Datenverbrauch durch die Kontrolle der Downloads (bestimmte Uhrzeiten, Intervalle, WiFi-Netze) und des Löschens von Episoden (basierend auf deinen Favoriten und weiteren Einstellungen).<br>
AntennaPod ist ein Podcast-Manager und -Player, der Dir unmittelbar Zugriff auf Millionen von freien und kostenpflichtigen Podcasts ermöglicht, angefangen von unabhängigen Podcastern bis hin zu großen Rundfunkanstalten wie BBC, NPR und CNN. Abonniere, importiere und exportiere deine Feeds mühelos mit Hilfe des iTunes-Verzeichnisses, OPML-Dateien oder einfachen RSS-URLs. Reduziere Aufwand, Stromverbrauch und Datenverbrauch durch die Kontrolle der Downloads (bestimmte Uhrzeiten, Intervalle, WiFi-Netze) und des Löschens von Episoden (basierend auf deinen Favoriten und weiteren Einstellungen).<br>
Aber am wichtigsten: Downloade, streame oder füge Episoden zur Abspielliste hinzu und genieße sie mit einstellbarer Abspielgeschwindigkeit, Unterstützung von Kapiteln und Schlummerfunktion. Mit Flattr kannst du den Podcastern sogar deine Wertschätzung zeigen.
AntennaPod ist, von Podcast-Enthusiasten gemacht, frei im Sinne des Wortes: Open Source, keine Kosten, keine Werbung.
@ -24,7 +24,7 @@ STEUER DAS SYSTEM<br>
&#8226; Passe das Aussehen mit dem hellen oder dunklen Theme an<br>
&#8226; Sichere deine Abonnements mit gPodder.net oder über den OPML-Export
<b>Trete der AntennaPod-Community bei!</b><br>
<b>Tritt der AntennaPod-Community bei!</b><br>
AntennaPod wird aktiv von Freiwilligen weiterentwickelt. Auch du kannst bei der Entwicklung mit Quellcode oder Kommentaren mitwirken!
Wir verwenden GitHub für Funktionswünsche (Feature Requests), Fehlerberichte (Bug Reports) und zum Beisteuern von Code (Code Contributions).

View File

@ -1,11 +1,11 @@
AntennaPod is a podcast manager and player that gives you instant access to millions of free and paid podcasts, from independent podcasters to large publishing houses such as the BBC, NPR and CNN. Add, import and export their feeds hassle-free using the iTunes podcast database, OPML files or simple RSS URLs. Save effort, battery power and mobile data usage with powerful automation controls for downloading episodes (specify times, intervals and WiFi networks) and deleting episodes (based your favourites and delay settings).<br>
But most importantly: Download, stream or queue episodes and enjoy them the way you like with adjustable playback speeds, chapter support and a sleep timer. You can even show your love to the content creators with our Flattr integration.
Το Antennapod είναι μία εφαρμογή διαχείρισης και εκτέλεσης podcasts που σας δίνει άμεση πρόσβαση σε εκατομμύρια δωρεάν και επί πληρωμή podcasts, από ανεξάρτητους podcasters έως μεγάλους εκδοτικούς οίκους όπως το BBC, NPR και CNN. Μπορείτε εύκολα να προσθέσετε, να εισάγετε και να εξάγετε τις ροές τους χρησιμοποιώντας τη βάση δεδομένων podcast του iTunes, αρχεία OPML ή απλά RSS URLs. Γλυτώστε προσπάθεια, μπαταρία και χρήση δεδομένων κινητής τηλεφωνίας με ισχυρές ρυθμίσεις αυτοματισμών για λήψη επεισοδίων (ορίστε τους χρόνους, τα διαστήματα και τα δίκτυα WiFi) και σβήστε επεισόδια (με βάση τα αγαπημένα σας και τις ρυθμίσεις καθυστέρησης).<br>
Αλλά το πλέον σημαντικό: Κατεβάστε, κάντε stream ή βάλτε στη σειρά επεισόδια και απολαύστε τα όπως επιθυμήτε με ρυθμιζόμενη ταχύτητα αναπαραγωγής, υποστήριξη κεφάλαιων και χρονόμετρο απενεργοποίησης. Μπορείτε ακόμη και να δείξετε την αγάπη σας στους δημιουργούς περιεχομένου μέσω της ενσωμάτωσης του Flattr.
Made by podcast-enthousiast, AntennaPod is free in all senses of the word: open source, no costs, no ads.
Φτιαγμένο από λάτρη των podcast, το AntennaPod είναι ελεύθερο με όλες τις έννοιες της λέξης: ανοικτού λογισμικού, χωρίς κόστη, χωρίς διαφημίσεις.
<b>All features:</b><br>
IMPORT, ORGANIZE AND PLAY<br>
&#8226; Add and import feeds via the iTunes and gPodder.net directories, OPML files and RSS or Atom links<br>
<b>Όλα τα χαρακτηριστικά:</b><br>
ΕΙΣΑΓΩΓΉ, ΟΡΓΆΝΩΣΗ ΚΑΙ ΕΚΤΈΛΕΣΗ<br>
&#8226; Προσθέστε και εισάγετε ροές μέσω των φακέλων του iTunes και του gPodder.net, αρχείων OPML και RSS ή συνδέσμους Atom<br>
&#8226; Manage playback from anywhere: homescreen widget, system notification and earplug and bluetooth controls<br>
&#8226; Enjoy listening your way with adjustable playback speed, chapter support (MP3, VorbisComment and Podlove), remembered playback position and an advanced sleep timer (shake to reset, lower volume and slow down playback)<br>
&#8226; Access password-protected feeds and episodes<br>
@ -24,20 +24,20 @@ CONTROL THE SYSTEM<br>
&#8226; Adapt to your environment using the light and dark theme<br>
&#8226; Back-up your subscriptions with the gPodder.net integration and OPML export
<b>Join the AntennaPod community!</b><br>
AntennaPod is under active development by volunteers. You can contribute too, with code or with comment!
<b>Ενταχθείτε στη κοινότητα του AntennaPod!</b><br>
Το AntennaPod βρίσκεται υπό ενεργή ανάπτυξη από εθελοντές. Μπορείτε και εσείς να συνεισφέρετε, με κώδικα ή με κάποιο σχόλιο.
GitHub is the place to go for feature requests, bug reports and code contributions:<br>
Το Github είναι το μέρος να επισκεφθείτε για να ζητήσετε καινούρια χαρακτηριστικά, να αναφέρετε σφάλματα και για συνεισφορά κώδικα:<br>
https://www.github.com/AntennaPod/AntennaPod
Our Google Group is the place to share your ideas, favourite podcasting moments and gratitude to all the volunteers:<br>
Το Google Group μας είναι το μέρος να μοιραστείτε τις ιδέες σας, τις αγαπημένες σας στιγμές ενασχόλησης με τα podcasts και ευγνωμοσύνη σε όλους τους εθελοντές:<br>
https://groups.google.com/forum/#!forum/antennapod
Have a question or want to give us feedback?
Έχετε κάποια ερώτηση ή θέλετε να μας δώσετε κάποια ανατροφοδότηση;
https://twitter.com/@AntennaPod
Transifex is the place to help with translations:<br>
Το Transifex είναι το μέρος για να βοηθήσετε με τις μεταφράσεις:<br>
https://www.transifex.com/antennapod/antennapod
Check out our Beta Testing programme to get the latest features first:<br>
Ελέγξτε το πρόγραμμά μας Beta Testing για να λαμβάνετε τα τελευταία χαρακτηριστικά πρώτοι:<br>
https://www.github.com/AntennaPod/AntennaPod/wiki/Help-test-AntennaPod

View File

@ -1,4 +1,4 @@
AntennaPod is un gestor y reproductor de podcast que te da acceso instantáneo a millones de podcast gratuitos y de pago, desde podcasters independientes a grandes estaciones como la BBC, NPR y CNN. Agrega, importa y exporta las fuentes de manera sencilla usando el listado de iTunes, archivos OPML o las URL de tipo RSS. Ahorra esfuerzo, batería y datos con los controles de descarga (a horas o intervalos específicos, o redes WiFi) y de borrado de episodios (basado en favoritos y ajustes de tiempo).<br>
AntennaPod es un gestor y reproductor de podcast que te da acceso instantáneo a millones de podcast gratuitos y pagos, desde podcasters independientes a grandes estaciones como la BBC, NPR y CNN. Agrega, importa y exporta las fuentes de manera sencilla usando el listado de iTunes, archivos OPML o las URL de tipo RSS. Ahorre esfuerzo, energía de la batería y uso de datos móviles con potentes controles de automatización para descargar episodios (especifique horarios, intervalos y redes WiFi) y elimine episodios (según sus preferencias y configuraciones de demora).<br>
Y lo más importante: descarga, escucha en stream y disfrutalos como quieras con velocidad de reproducción variable, soporte para capítulos y temporizador de sueño. Incluso puedes mostrar tu gratitud a los creadores de contenido mediante Flattr.
Hecho por entusiastas del podcasting, AntennaPod es libre, gratuito y sin publicidad.

View File

@ -10,12 +10,12 @@
android:id="@android:id/list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scrollbarStyle="outsideOverlay"
android:clipToPadding="false"
android:paddingTop="@dimen/list_vertical_padding"
android:paddingBottom="@dimen/list_vertical_padding"
android:clipToPadding="false"
tools:listitem="@layout/new_episodes_listitem"
tools:itemCount="13"/>
android:scrollbarStyle="outsideOverlay"
tools:itemCount="13"
tools:listitem="@layout/new_episodes_listitem" />
<ProgressBar
android:id="@+id/progLoading"

View File

@ -21,6 +21,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="16dp"
android:layout_marginStart="16dp"
android:text="1.00x"/>
</LinearLayout>
@ -35,6 +36,7 @@
android:layout_width="32dp"
android:layout_height="32dp"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:gravity="center"
android:text="-"
android:textStyle="bold"
@ -48,6 +50,7 @@
android:layout_height="32dp"
android:minWidth="0dp"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
android:gravity="center"
android:text="+"
android:textStyle="bold"
@ -60,7 +63,9 @@
android:layout_width="match_parent"
android:layout_height="32dp"
android:layout_toRightOf="@id/butDecSpeed"
android:layout_toEndOf="@id/butDecSpeed"
android:layout_toLeftOf="@id/butIncSpeed"
android:layout_toStartOf="@id/butIncSpeed"
android:layout_centerVertical="true"
android:max="40"/>
@ -79,6 +84,7 @@
android:layout_height="wrap_content"
android:layout_marginTop="-12dp"
android:layout_marginLeft="8dp"
android:layout_marginStart="8dp"
android:orientation="horizontal"
android:gravity="center">
@ -101,6 +107,7 @@
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_marginLeft="8dp"
android:layout_marginStart="8dp"
android:orientation="horizontal"
android:gravity="center">

View File

@ -67,8 +67,10 @@
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:layout_toLeftOf="@id/horizontal_divider"
android:layout_toStartOf="@id/horizontal_divider"
android:background="?android:attr/selectableItemBackground"
android:text="@string/cancel_label" />
@ -78,8 +80,10 @@
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
android:layout_alignParentTop="true"
android:layout_toRightOf="@id/horizontal_divider"
android:layout_toEndOf="@id/horizontal_divider"
android:background="?android:attr/selectableItemBackground"
android:text="@string/confirm_label" />
</RelativeLayout>

View File

@ -33,8 +33,10 @@
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:layout_toLeftOf="@id/horizontal_divider"
android:layout_toStartOf="@id/horizontal_divider"
android:background="?android:attr/selectableItemBackground"
android:text="@string/cancel_label" />
@ -44,8 +46,10 @@
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
android:layout_alignParentTop="true"
android:layout_toRightOf="@id/horizontal_divider"
android:layout_toEndOf="@id/horizontal_divider"
android:background="?android:attr/selectableItemBackground"
android:text="@string/confirm_label" />
</RelativeLayout>
@ -62,6 +66,7 @@
android:layout_width="60dp"
android:layout_height="60dp"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:background="?attr/selectableItemBackground"
android:src="?attr/navigation_up"
@ -77,6 +82,7 @@
android:layout_marginRight="8dp"
android:layout_marginTop="8dp"
android:layout_toRightOf="@id/butNavUp"
android:layout_toEndOf="@id/butNavUp"
android:text="@string/selected_folder_label"
android:textStyle="bold"
tools:background="@android:color/holo_green_dark">
@ -87,9 +93,11 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
android:layout_below="@id/txtvSelectedFolderLabel"
android:layout_margin="8dp"
android:layout_toRightOf="@id/butNavUp"
android:layout_toEndOf="@id/butNavUp"
android:ellipsize="start"
android:scrollHorizontally="true"
android:singleLine="true"

View File

@ -77,8 +77,10 @@
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:layout_toLeftOf="@id/horizontal_divider"
android:layout_toStartOf="@id/horizontal_divider"
android:background="?android:attr/selectableItemBackground"
android:text="@string/cancel_label"/>
@ -88,8 +90,10 @@
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
android:layout_alignParentTop="true"
android:layout_toRightOf="@id/horizontal_divider"
android:layout_toEndOf="@id/horizontal_divider"
android:background="?android:attr/selectableItemBackground"
android:text="@string/confirm_label"/>
</RelativeLayout>

View File

@ -13,6 +13,7 @@
android:layout_gravity="center_vertical"
android:layout_marginBottom="@dimen/listitem_threeline_verticalpadding"
android:layout_marginLeft="@dimen/listitem_threeline_horizontalpadding"
android:layout_marginStart="@dimen/listitem_threeline_horizontalpadding"
android:layout_marginTop="@dimen/listitem_threeline_verticalpadding"
android:contentDescription="@string/cover_label"
android:scaleType="centerCrop"
@ -24,7 +25,9 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/listitem_threeline_textleftpadding"
android:layout_marginStart="@dimen/listitem_threeline_textleftpadding"
android:layout_marginRight="@dimen/listitem_threeline_textrightpadding"
android:layout_marginEnd="@dimen/listitem_threeline_textrightpadding"
android:layout_marginTop="@dimen/listitem_threeline_verticalpadding"
android:layout_marginBottom="@dimen/listitem_threeline_verticalpadding"
android:layout_weight="1"
@ -74,6 +77,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="8dp"
android:layout_marginStart="8dp"
tools:text="Jan 23"
tools:background="@android:color/holo_green_dark"/>

View File

@ -17,6 +17,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/listitem_threeline_horizontalpadding"
android:layout_marginStart="@dimen/listitem_threeline_horizontalpadding"
android:layout_marginTop="@dimen/listitem_threeline_verticalpadding"
android:ellipsize="end"
android:lines="1"
@ -48,6 +49,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:ellipsize="end"
android:lines="1"
android:textColor="?android:attr/textColorPrimary"
@ -60,6 +62,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
android:ellipsize="end"
android:lines="1"
android:textColor="?android:attr/textColorPrimary"

View File

@ -17,6 +17,7 @@
android:layout_height="48sp"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:textSize="48sp"
android:gravity="center" />
@ -26,7 +27,9 @@
android:layout_height="wrap_content"
android:layout_below="@id/txtvIcon"
android:layout_alignLeft="@id/txtvIcon"
android:layout_alignStart="@id/txtvIcon"
android:layout_alignRight="@id/txtvIcon"
android:layout_alignEnd="@id/txtvIcon"
android:layout_marginTop="8dp"
android:text="{fa-repeat}"
tools:text="↻" />
@ -38,7 +41,9 @@
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
android:layout_marginLeft="8dp"
android:layout_marginStart="8dp"
android:layout_marginBottom="8dp"
tools:text="Media file"
tools:background="@android:color/holo_green_dark" />
@ -50,8 +55,11 @@
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_toRightOf="@id/txtvIcon"
android:layout_toEndOf="@id/txtvIcon"
android:layout_toLeftOf="@id/txtvType"
android:layout_toStartOf="@id/txtvType"
android:layout_marginLeft="8dp"
android:layout_marginStart="8dp"
android:layout_marginBottom="8dp"
android:minLines="1"
android:maxLines="2"
@ -64,8 +72,10 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="@id/txtvIcon"
android:layout_toEndOf="@id/txtvIcon"
android:layout_below="@id/txtvTitle"
android:layout_marginLeft="8dp"
android:layout_marginStart="8dp"
android:layout_marginBottom="8dp"
tools:text="January 23"
tools:background="@android:color/holo_green_dark" />
@ -76,7 +86,9 @@
android:layout_height="wrap_content"
android:layout_below="@id/txtvDate"
android:layout_toRightOf="@id/txtvIcon"
android:layout_toEndOf="@id/txtvIcon"
android:layout_marginLeft="8dp"
android:layout_marginStart="8dp"
android:textColor="?android:attr/textColorTertiary"
android:textSize="@dimen/text_size_micro"
tools:text="@string/design_time_downloaded_log_failure_reason"

View File

@ -1,22 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:background="@android:color/darker_gray">
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:background="@android:color/darker_gray">
<TextView
android:id="@+id/txtvTitle"
android:textColor="?android:attr/textColorPrimary"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="@dimen/text_size_small"
android:singleLine="true"
android:layout_margin="16dp"
android:ellipsize="start"
tools:text="List item title"
tools:background="@android:color/holo_green_dark"/>
android:singleLine="true"
android:textColor="?android:attr/textColorPrimary"
android:textSize="@dimen/text_size_small"
tools:background="@android:color/holo_green_dark"
tools:text="List item title" />
</LinearLayout>

View File

@ -36,7 +36,9 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_marginRight="8dp"
android:layout_marginEnd="8dp"
android:layout_marginBottom="8dp"
app:layout_row="0"
app:layout_column="0"
@ -60,6 +62,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="8dp"
android:layout_marginEnd="8dp"
android:layout_marginBottom="8dp"
app:layout_row="1"
app:layout_column="0"
@ -83,6 +86,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="8dp"
android:layout_marginEnd="8dp"
app:layout_row="2"
app:layout_column="0"
android:lines="1"

View File

@ -32,6 +32,7 @@
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_marginRight="16dp"
android:layout_marginEnd="16dp"
android:layout_marginBottom="16dp"
android:contentDescription="@string/cover_label"
android:gravity="center_vertical"
@ -45,6 +46,7 @@
android:layout_height="wrap_content"
android:layout_alignTop="@id/imgvCover"
android:layout_toRightOf="@id/imgvCover"
android:layout_toEndOf="@id/imgvCover"
tools:text="Podcast title"
tools:background="@android:color/holo_green_dark" />
@ -54,6 +56,7 @@
android:layout_height="wrap_content"
android:layout_below="@id/txtvPodcast"
android:layout_toRightOf="@id/imgvCover"
android:layout_toEndOf="@id/imgvCover"
android:textSize="16sp"
android:textColor="?android:attr/textColorPrimary"
android:ellipsize="end"
@ -67,6 +70,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="@id/imgvCover"
android:layout_toEndOf="@id/imgvCover"
android:layout_below="@id/txtvTitle"
tools:text="00:42:23"
tools:background="@android:color/holo_green_dark"/>
@ -77,8 +81,10 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
android:layout_below="@id/txtvTitle"
android:layout_marginLeft="8dp"
android:layout_marginStart="8dp"
tools:text="Jan 23"
tools:background="@android:color/holo_green_dark" />
@ -98,7 +104,9 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="16dp"
android:layout_marginStart="16dp"
android:layout_marginRight="16dp"
android:layout_marginEnd="16dp"
android:orientation="horizontal"
tools:background="@android:color/holo_blue_bright">
@ -108,6 +116,7 @@
android:layout_height="48dp"
android:layout_gravity="center_vertical"
android:layout_marginRight="8dp"
android:layout_marginEnd="8dp"
android:layout_weight="1"
android:background="?attr/selectableItemBackground"
android:ellipsize="end"
@ -123,6 +132,7 @@
android:layout_height="48dp"
android:layout_gravity="center_vertical"
android:layout_marginLeft="8dp"
android:layout_marginStart="8dp"
android:layout_weight="1"
android:background="?attr/selectableItemBackground"
android:ellipsize="end"

View File

@ -19,10 +19,12 @@
android:layout_width="@dimen/thumbnail_length_onlinefeedview"
android:layout_height="@dimen/thumbnail_length_onlinefeedview"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:layout_centerVertical="true"
android:layout_marginBottom="16dp"
android:layout_marginLeft="16dp"
android:layout_marginStart="16dp"
android:layout_marginTop="16dp"
android:contentDescription="@string/cover_label"
tools:src="@drawable/ic_stat_antenna_default"
@ -33,8 +35,10 @@
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
android:layout_alignParentTop="true"
android:layout_marginLeft="16dp"
android:layout_marginStart="16dp"
android:layout_marginTop="8dp"
android:background="?attr/selectableItemBackground"
android:contentDescription="@string/show_info_label"
@ -62,9 +66,12 @@
android:layout_alignParentTop="true"
android:layout_marginBottom="16dp"
android:layout_marginLeft="16dp"
android:layout_marginStart="16dp"
android:layout_marginTop="16dp"
android:layout_toLeftOf="@id/butShowInfo"
android:layout_toStartOf="@id/butShowInfo"
android:layout_toRightOf="@id/imgvCover"
android:layout_toEndOf="@id/imgvCover"
android:ellipsize="end"
android:maxLines="2"
android:shadowColor="@color/black"
@ -80,8 +87,13 @@
android:layout_below="@id/txtvTitle"
android:layout_marginBottom="16dp"
android:layout_marginLeft="16dp"
android:layout_marginStart="16dp"
android:layout_marginRight="16dp"
android:layout_marginEnd="16dp"
android:layout_toLeftOf="@id/butShowSettings"
android:layout_toStartOf="@id/butShowSettings"
android:layout_toRightOf="@id/imgvCover"
android:layout_toEndOf="@id/imgvCover"
android:ellipsize="end"
android:lines="1"
android:shadowColor="@color/black"

View File

@ -13,6 +13,7 @@
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_marginLeft="@dimen/listitem_threeline_horizontalpadding"
android:layout_marginStart="@dimen/listitem_threeline_horizontalpadding"
android:layout_weight="1"
android:layout_marginTop="@dimen/listitem_threeline_verticalpadding"
android:layout_marginBottom="@dimen/listitem_threeline_verticalpadding"
@ -24,6 +25,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
android:layout_alignParentTop="true"
android:layout_marginLeft="8dp"
android:layout_marginRight="8dp"
@ -36,9 +38,11 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:layout_marginBottom="4dp"
android:layout_toLeftOf="@id/statusUnread"
android:layout_toStartOf="@id/statusUnread"
tools:text="Episode title"
tools:background="@android:color/holo_green_dark" />
@ -48,6 +52,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_below="@id/txtvItemname"
tools:text="00:42:23"
tools:background="@android:color/holo_green_dark" />
@ -57,8 +62,10 @@
android:layout_width="@dimen/enc_icons_size"
android:layout_height="@dimen/enc_icons_size"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
android:layout_below="@id/txtvItemname"
android:layout_marginRight="8dp"
android:layout_marginEnd="8dp"
android:contentDescription="@string/in_queue_label"
android:src="?attr/stat_playlist"
android:visibility="visible"
@ -71,7 +78,9 @@
android:layout_height="@dimen/enc_icons_size"
android:layout_below="@id/txtvItemname"
android:layout_marginRight="8dp"
android:layout_marginEnd="8dp"
android:layout_toLeftOf="@id/imgvInPlaylist"
android:layout_toStartOf="@id/imgvInPlaylist"
tools:ignore="ContentDescription"
tools:src="@drawable/ic_hearing_white_18dp"
tools:background="@android:color/holo_red_light" />
@ -83,7 +92,9 @@
android:layout_height="wrap_content"
android:layout_below="@id/txtvItemname"
android:layout_marginRight="8dp"
android:layout_marginEnd="8dp"
android:layout_toLeftOf="@id/imgvType"
android:layout_toStartOf="@id/imgvType"
tools:text="Jan 23"
tools:background="@android:color/holo_green_dark" />
@ -92,16 +103,18 @@
style="?android:attr/progressBarStyleHorizontal"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_alignBottom="@id/txtvPublished"
android:layout_marginLeft="8dp"
android:layout_marginRight="8dp"
android:layout_toStartOf="@id/txtvPublished"
android:layout_toLeftOf="@id/txtvPublished"
android:layout_toEndOf="@id/txtvLenSize"
android:layout_toRightOf="@id/txtvLenSize"
android:layout_alignTop="@id/txtvPublished"
android:layout_alignBottom="@id/txtvPublished"
tools:background="@android:color/holo_blue_light"
android:layoutDirection="ltr"
android:indeterminate="false"
android:max="100"
android:progress="42"
android:indeterminate="false" />
tools:background="@android:color/holo_blue_light" />
</RelativeLayout>

View File

@ -39,7 +39,8 @@
app:layout_row="0"
app:layout_column="0"
app:layout_gravity="center_vertical"
android:layout_marginRight="10dp" />
android:layout_marginRight="10dp"
android:layout_marginEnd="10dp" />
<Spinner
android:layout_width="wrap_content"
@ -97,6 +98,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="8dp"
android:layout_marginEnd="8dp"
android:layout_marginBottom="8dp"
app:layout_row="0"
app:layout_column="0"
@ -119,6 +121,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="8dp"
android:layout_marginEnd="8dp"
android:layout_marginBottom="8dp"
app:layout_row="1"
app:layout_column="0"

View File

@ -15,8 +15,10 @@
android:layout_width="@dimen/thumbnail_length_itemlist"
android:layout_height="@dimen/thumbnail_length_itemlist"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:layout_marginRight="8dp"
android:layout_marginEnd="8dp"
android:adjustViewBounds="true"
android:contentDescription="@string/cover_label"
android:cropToPadding="true"
@ -30,6 +32,7 @@
android:layout_height="wrap_content"
android:layout_alignTop="@id/txtvTitle"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
android:orientation="horizontal">
<ImageView
@ -37,6 +40,7 @@
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginRight="-4dp"
android:layout_marginEnd="-4dp"
android:src="?attr/feed" />
<TextView
@ -56,7 +60,9 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="@id/imgvCover"
android:layout_toEndOf="@id/imgvCover"
android:layout_toLeftOf="@id/subscribers_container"
android:layout_toStartOf="@id/subscribers_container"
android:layout_alignTop="@id/imgvCover"
android:maxLines="2"
android:includeFontPadding="false"
@ -69,6 +75,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_toRightOf="@id/imgvCover"
android:layout_toEndOf="@id/imgvCover"
android:layout_below="@id/txtvTitle"
android:textSize="14sp"
android:textColor="?android:attr/textColorSecondary"

Some files were not shown because too many files have changed in this diff Show More