mirror of
https://github.com/AntennaPod/AntennaPod.git
synced 2025-01-30 02:14:51 +01:00
Remove redundant type casts
This commit is contained in:
parent
2dbcae1576
commit
a52f1ba34f
@ -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) {
|
||||
|
@ -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() {
|
||||
|
||||
|
@ -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);
|
||||
|
@ -85,22 +85,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);
|
||||
|
||||
|
@ -113,27 +113,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;
|
||||
|
@ -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);
|
||||
|
@ -130,7 +130,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 +142,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);
|
||||
|
@ -797,13 +797,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;
|
||||
@ -827,18 +827,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
|
||||
|
||||
|
@ -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();
|
||||
|
@ -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)
|
||||
|
@ -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,
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
@ -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) {
|
||||
|
@ -143,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
|
||||
|
@ -70,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[]{
|
||||
@ -107,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());
|
||||
@ -175,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
|
||||
@ -346,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);
|
||||
|
@ -76,24 +76,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
|
||||
|
@ -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();
|
||||
|
@ -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();
|
||||
|
@ -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 {
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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 {
|
||||
|
@ -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();
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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();
|
||||
|
@ -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);
|
||||
|
@ -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();
|
||||
|
@ -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();
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -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());
|
||||
|
@ -85,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();
|
||||
@ -129,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;
|
||||
@ -137,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;
|
||||
@ -145,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;
|
||||
@ -153,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;
|
||||
@ -161,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 {
|
||||
|
@ -101,7 +101,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);
|
||||
@ -109,22 +109,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);
|
||||
}
|
||||
@ -145,7 +145,7 @@ public class ProxyDialog {
|
||||
enableSettings(false);
|
||||
}
|
||||
});
|
||||
txtvMessage = (TextView) view.findViewById(R.id.txtvMessage);
|
||||
txtvMessage = view.findViewById(R.id.txtvMessage);
|
||||
checkValidity();
|
||||
return dialog;
|
||||
}
|
||||
|
@ -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() {
|
||||
|
@ -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);
|
||||
|
@ -313,7 +313,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 +323,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);
|
||||
|
@ -48,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;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -52,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");
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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) {
|
||||
|
@ -475,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());
|
||||
|
@ -109,7 +109,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();
|
||||
|
||||
|
@ -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);
|
||||
@ -494,9 +494,9 @@ public class QueueFragment extends Fragment {
|
||||
);
|
||||
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;
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -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)));
|
||||
|
@ -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);
|
||||
|
@ -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");
|
||||
|
@ -1799,7 +1799,7 @@ public class PlaybackService extends MediaBrowserServiceCompat {
|
||||
public boolean onMediaButtonEvent(final Intent mediaButton) {
|
||||
Log.d(TAG, "onMediaButtonEvent(" + mediaButton + ")");
|
||||
if (mediaButton != null) {
|
||||
KeyEvent keyEvent = (KeyEvent) mediaButton.getParcelableExtra(Intent.EXTRA_KEY_EVENT);
|
||||
KeyEvent keyEvent = mediaButton.getParcelableExtra(Intent.EXTRA_KEY_EVENT);
|
||||
if (keyEvent != null &&
|
||||
keyEvent.getAction() == KeyEvent.ACTION_DOWN &&
|
||||
keyEvent.getRepeatCount() == 0) {
|
||||
|
@ -27,8 +27,8 @@ public class MoreContentListFooterUtil {
|
||||
}
|
||||
|
||||
public void setLoadingState(boolean newState) {
|
||||
final ImageView imageView = (ImageView) root.findViewById(R.id.imgExpand);
|
||||
final ProgressBar progressBar = (ProgressBar) root.findViewById(R.id.progBar);
|
||||
final ImageView imageView = root.findViewById(R.id.imgExpand);
|
||||
final ProgressBar progressBar = root.findViewById(R.id.progBar);
|
||||
if (newState) {
|
||||
imageView.setVisibility(View.GONE);
|
||||
progressBar.setVisibility(View.VISIBLE);
|
||||
|
Loading…
x
Reference in New Issue
Block a user