Code clean up
This commit is contained in:
parent
7793cc822d
commit
2a72b1b21f
6 changed files with 15 additions and 15 deletions
|
|
@ -67,9 +67,9 @@ public class ArtistSongAdapter extends ArrayAdapter<Song> implements MaterialCab
|
|||
convertView = LayoutInflater.from(getContext()).inflate(R.layout.item_list, parent, false);
|
||||
}
|
||||
|
||||
final TextView songTitle = (TextView) convertView.findViewById(R.id.title);
|
||||
final TextView songInfo = (TextView) convertView.findViewById(R.id.text);
|
||||
final ImageView albumArt = (ImageView) convertView.findViewById(R.id.image);
|
||||
final TextView songTitle = convertView.findViewById(R.id.title);
|
||||
final TextView songInfo = convertView.findViewById(R.id.text);
|
||||
final ImageView albumArt = convertView.findViewById(R.id.image);
|
||||
final View shortSeparator = convertView.findViewById(R.id.short_separator);
|
||||
|
||||
if (position == getCount() - 1) {
|
||||
|
|
@ -93,7 +93,7 @@ public class ArtistSongAdapter extends ArrayAdapter<Song> implements MaterialCab
|
|||
albumArt.setTransitionName(activity.getString(R.string.transition_album_art));
|
||||
}
|
||||
|
||||
final ImageView overflowButton = (ImageView) convertView.findViewById(R.id.menu);
|
||||
final ImageView overflowButton = convertView.findViewById(R.id.menu);
|
||||
overflowButton.setOnClickListener(new SongMenuHelper.OnClickSongMenu(activity) {
|
||||
@Override
|
||||
public Song getSong() {
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ public class ChangelogDialog extends DialogFragment {
|
|||
})
|
||||
.build();
|
||||
|
||||
final WebView webView = (WebView) customView.findViewById(R.id.web_view);
|
||||
final WebView webView = customView.findViewById(R.id.web_view);
|
||||
try {
|
||||
// Load from phonograph-changelog.html in the assets folder
|
||||
StringBuilder buf = new StringBuilder();
|
||||
|
|
|
|||
|
|
@ -67,13 +67,13 @@ public class SongDetailDialog extends DialogFragment {
|
|||
.build();
|
||||
|
||||
View dialogView = dialog.getCustomView();
|
||||
final TextView fileName = (TextView) dialogView.findViewById(R.id.file_name);
|
||||
final TextView filePath = (TextView) dialogView.findViewById(R.id.file_path);
|
||||
final TextView fileSize = (TextView) dialogView.findViewById(R.id.file_size);
|
||||
final TextView fileFormat = (TextView) dialogView.findViewById(R.id.file_format);
|
||||
final TextView trackLength = (TextView) dialogView.findViewById(R.id.track_length);
|
||||
final TextView bitRate = (TextView) dialogView.findViewById(R.id.bitrate);
|
||||
final TextView samplingRate = (TextView) dialogView.findViewById(R.id.sampling_rate);
|
||||
final TextView fileName = dialogView.findViewById(R.id.file_name);
|
||||
final TextView filePath = dialogView.findViewById(R.id.file_path);
|
||||
final TextView fileSize = dialogView.findViewById(R.id.file_size);
|
||||
final TextView fileFormat = dialogView.findViewById(R.id.file_format);
|
||||
final TextView trackLength = dialogView.findViewById(R.id.track_length);
|
||||
final TextView bitRate = dialogView.findViewById(R.id.bitrate);
|
||||
final TextView samplingRate = dialogView.findViewById(R.id.sampling_rate);
|
||||
|
||||
fileName.setText(makeTextWithTitle(context, R.string.label_file_name, "-"));
|
||||
filePath.setText(makeTextWithTitle(context, R.string.label_file_path, "-"));
|
||||
|
|
|
|||
|
|
@ -145,7 +145,7 @@ public class FoldersFragment extends AbsMainActivityFragment implements MainActi
|
|||
if (savedInstanceState == null) {
|
||||
setCrumb(new BreadCrumbLayout.Crumb(tryGetCanonicalFile((File) getArguments().getSerializable(PATH))), true);
|
||||
} else {
|
||||
breadCrumbs.restoreFromStateWrapper((BreadCrumbLayout.SavedStateWrapper) savedInstanceState.getParcelable(CRUMBS));
|
||||
breadCrumbs.restoreFromStateWrapper(savedInstanceState.getParcelable(CRUMBS));
|
||||
getLoaderManager().initLoader(LOADER_ID, null, this);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -551,7 +551,7 @@ public class CardPlayerFragment extends AbsPlayerFragment implements PlayerAlbum
|
|||
|
||||
@Override
|
||||
public void setUpPanelAndAlbumCoverHeight() {
|
||||
WidthFitSquareLayout albumCoverContainer = (WidthFitSquareLayout) fragment.getView().findViewById(R.id.album_cover_container);
|
||||
WidthFitSquareLayout albumCoverContainer = fragment.getView().findViewById(R.id.album_cover_container);
|
||||
int topMargin = fragment.getResources().getDimensionPixelSize(R.dimen.status_bar_padding);
|
||||
|
||||
final int availablePanelHeight = fragment.slidingUpPanelLayout.getHeight() - fragment.getView().findViewById(R.id.player_content).getHeight() + topMargin;
|
||||
|
|
|
|||
|
|
@ -530,7 +530,7 @@ public class FlatPlayerFragment extends AbsPlayerFragment implements PlayerAlbum
|
|||
|
||||
@Override
|
||||
public void setUpPanelAndAlbumCoverHeight() {
|
||||
WidthFitSquareLayout albumCoverContainer = (WidthFitSquareLayout) fragment.getView().findViewById(R.id.album_cover_container);
|
||||
WidthFitSquareLayout albumCoverContainer = fragment.getView().findViewById(R.id.album_cover_container);
|
||||
|
||||
final int availablePanelHeight = fragment.slidingUpPanelLayout.getHeight() - fragment.getView().findViewById(R.id.player_content).getHeight();
|
||||
final int minPanelHeight = (int) ViewUtil.convertDpToPixel(8 + 72 + 24, fragment.getResources()) + fragment.getResources().getDimensionPixelSize(R.dimen.progress_container_height) + fragment.getResources().getDimensionPixelSize(R.dimen.media_controller_container_height);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue