当手机处于横向模式时,我正试图在我的布局上隐藏(ImageView.Gone)图像。我试过了:
mask = df.B == 'placeholder'
df = df[~mask]
的xml:
this.imageView = (ImageView) findViewById(R.id.sheep_image);
this.myOrientationEventListener = new OrientationEventListener(this,
SensorManager.SENSOR_DELAY_NORMAL) {
@Override
public void onOrientationChanged(int orientation) {
editText.setHint("orientation changed");
if (orientation == Configuration.ORIENTATION_LANDSCAPE) {
imageView.setVisibility(ImageView.GONE);
} else {
imageView.setVisibility(ImageView.VISIBLE);
}
}
};
但它似乎不起作用。什么都没发生,甚至没有EditText的暗示。