c# - How to get root layout in Xamarin using android? -
i`m using xamarin android. know can assign id root layout , via code :
<linearlayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/root"
and in c# use :
var mlayout = (linearlayout)findviewbyid(resource.id.root);
what need method root layout without needing id. this:
var mlayout = getrootlayout();
in activity call window.decorview.findviewbyid (android.resource.id.content)
.
Comments
Post a Comment