2
有任何方法在橫向模式下隱藏字段? 基本上,我想:在橫向模式下隱藏字段
android:visibility="GONE"
只是在橫向模式。有可能嗎?用一個簡單的解決方案......
我嘗試這樣做:
public override void OnConfigurationChanged(Android.Content.Res.Configuration newConfig)
{
base.OnConfigurationChanged(newConfig);
if(newConfig.Orientation == Android.Content.Res.Orientation.Landscape)
{
// 1
}
else
{
// 2
}
}
但不起作用。
請原諒我的無知,但我在哪裏輸入代碼? – GtOkAi
我會在你的Activity的'onCreate()'方法中做到這一點。 – nKn
明白了!就我而言,我是用CSharp編程的,我會看看我能做些什麼。謝謝 – GtOkAi