小编GtO*_*kAi的帖子

在横向模式下隐藏字段

有什么方法可以在横向模式下隐藏字段?基本上,我想要:

android:visibility="GONE"
Run Code Online (Sandbox Code Playgroud)

仅在横向模式下。有可能吗 用一个简单的解决方案...

我尝试了这个:

 public override void OnConfigurationChanged(Android.Content.Res.Configuration newConfig)
    {
        base.OnConfigurationChanged(newConfig);
        if(newConfig.Orientation == Android.Content.Res.Orientation.Landscape)
        {
// 1
        }
        else
        {
  // 2
        }

    } 
Run Code Online (Sandbox Code Playgroud)

但是不起作用。

android xamarin

2
推荐指数
1
解决办法
1768
查看次数

标签 统计

android ×1

xamarin ×1