mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 12:23:58 +01:00
Remove redundant type casts (#1929)
This commit is contained in:
parent
ef73204cc0
commit
b2e5ad0c26
6 changed files with 12 additions and 12 deletions
|
|
@ -61,7 +61,7 @@ public class WelcomePagerAdapter extends PagerAdapter {
|
|||
LayoutInflater inflater = LayoutInflater.from(container.getContext());
|
||||
ViewGroup layout = (ViewGroup) inflater.inflate(PAGE_LAYOUTS[position], container, false);
|
||||
if( BuildConfig.FLAVOR == "beta"){
|
||||
TextView textView = (TextView) layout.findViewById(R.id.welcomeYesButton);
|
||||
TextView textView = layout.findViewById(R.id.welcomeYesButton);
|
||||
if( textView.getVisibility() != View.VISIBLE){
|
||||
textView.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -338,9 +338,9 @@ public class AchievementsActivity extends NavigationBaseActivity {
|
|||
AlertDialog.Builder alertadd = new AlertDialog.Builder(AchievementsActivity.this);
|
||||
LayoutInflater factory = LayoutInflater.from(AchievementsActivity.this);
|
||||
final View view = factory.inflate(R.layout.image_alert_layout, null);
|
||||
ImageView screenShotImage = (ImageView) view.findViewById(R.id.alert_image);
|
||||
ImageView screenShotImage = view.findViewById(R.id.alert_image);
|
||||
screenShotImage.setImageBitmap(screenshot);
|
||||
TextView shareMessage = (TextView) view.findViewById(R.id.alert_text);
|
||||
TextView shareMessage = view.findViewById(R.id.alert_text);
|
||||
shareMessage.setText(R.string.achievements_share_message);
|
||||
alertadd.setView(view);
|
||||
alertadd.setPositiveButton(R.string.about_translate_proceed, (dialog, which) -> shareScreen(screenshot));
|
||||
|
|
|
|||
|
|
@ -15,10 +15,10 @@ class ContributionViewHolder {
|
|||
final ProgressBar progressView;
|
||||
|
||||
ContributionViewHolder(View parent) {
|
||||
imageView = (MediaWikiImageView) parent.findViewById(R.id.contributionImage);
|
||||
titleView = (TextView)parent.findViewById(R.id.contributionTitle);
|
||||
stateView = (TextView)parent.findViewById(R.id.contributionState);
|
||||
seqNumView = (TextView)parent.findViewById(R.id.contributionSequenceNumber);
|
||||
progressView = (ProgressBar)parent.findViewById(R.id.contributionProgress);
|
||||
imageView = parent.findViewById(R.id.contributionImage);
|
||||
titleView = parent.findViewById(R.id.contributionTitle);
|
||||
stateView = parent.findViewById(R.id.contributionState);
|
||||
seqNumView = parent.findViewById(R.id.contributionSequenceNumber);
|
||||
progressView = parent.findViewById(R.id.contributionProgress);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -439,7 +439,7 @@ public class MediaDetailFragment extends CommonsDaggerSupportFragment {
|
|||
|
||||
private View buildCatLabel(final String catName, ViewGroup categoryContainer) {
|
||||
final View item = LayoutInflater.from(getContext()).inflate(R.layout.detail_category_item, categoryContainer, false);
|
||||
final CompatTextView textView = (CompatTextView) item.findViewById(R.id.mediaDetailCategoryItemText);
|
||||
final CompatTextView textView = item.findViewById(R.id.mediaDetailCategoryItemText);
|
||||
|
||||
textView.setText(catName);
|
||||
if (categoriesLoaded && categoriesPresent) {
|
||||
|
|
|
|||
|
|
@ -186,9 +186,9 @@ public class QuizResultActivity extends AppCompatActivity {
|
|||
AlertDialog.Builder alertadd = new AlertDialog.Builder(QuizResultActivity.this);
|
||||
LayoutInflater factory = LayoutInflater.from(QuizResultActivity.this);
|
||||
final View view = factory.inflate(R.layout.image_alert_layout, null);
|
||||
ImageView screenShotImage = (ImageView) view.findViewById(R.id.alert_image);
|
||||
ImageView screenShotImage = view.findViewById(R.id.alert_image);
|
||||
screenShotImage.setImageBitmap(screenshot);
|
||||
TextView shareMessage = (TextView) view.findViewById(R.id.alert_text);
|
||||
TextView shareMessage = view.findViewById(R.id.alert_text);
|
||||
shareMessage.setText(R.string.quiz_result_share_message);
|
||||
alertadd.setView(view);
|
||||
alertadd.setPositiveButton(R.string.about_translate_proceed, (dialog, which) -> shareScreen(screenshot));
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ public class RadioGroupHelper {
|
|||
public RadioGroupHelper(View rootView, int... radiosIDs) {
|
||||
super();
|
||||
for (int radioButtonID : radiosIDs) {
|
||||
add((RadioButton)rootView.findViewById(radioButtonID));
|
||||
add(rootView.findViewById(radioButtonID));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue