Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix hiding promo dialog images in landscape
  • Loading branch information
aforcier committed Aug 2, 2017
commit bb983c039918f9ca84850960f36c66eb307cfb56
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.LinearLayout;

import org.wordpress.android.R;
import org.wordpress.android.util.DisplayUtils;
Expand Down Expand Up @@ -81,7 +82,8 @@ public void onViewCreated(View view, Bundle savedInstanceState) {

ImageView image = (ImageView) view.findViewById(R.id.promo_dialog_image);
image.setImageResource(mDrawableId);
image.setVisibility(DisplayUtils.isLandscape(getActivity()) ? View.GONE : View.VISIBLE);
LinearLayout imageContainer = (LinearLayout) view.findViewById(R.id.promo_dialog_image_container);
imageContainer.setVisibility(DisplayUtils.isLandscape(getActivity()) ? View.GONE : View.VISIBLE);

WPTextView title = (WPTextView) view.findViewById(R.id.promo_dialog_title);
title.setText(mTitleId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.LinearLayout;

import org.wordpress.android.R;
import org.wordpress.android.analytics.AnalyticsTracker;
Expand Down Expand Up @@ -84,7 +85,8 @@ public void onViewCreated(View view, Bundle savedInstanceState) {

ImageView image = (ImageView) view.findViewById(R.id.promo_dialog_image);
image.setImageResource(mDrawableId);
image.setVisibility(DisplayUtils.isLandscape(getActivity()) ? View.GONE : View.VISIBLE);
LinearLayout imageContainer = (LinearLayout) view.findViewById(R.id.promo_dialog_image_container);
imageContainer.setVisibility(DisplayUtils.isLandscape(getActivity()) ? View.GONE : View.VISIBLE);

WPTextView title = (WPTextView) view.findViewById(R.id.promo_dialog_title);
title.setText(mTitleId);
Expand Down