Android layout 我想在Android Xamarin本机应用程序布局中使图像具有粘性。我正在使用axml进行布局渲染

Android layout 我想在Android Xamarin本机应用程序布局中使图像具有粘性。我正在使用axml进行布局渲染,android-layout,xamarin.android,Android Layout,Xamarin.android,我想在axml中使布局右端角的图像具有粘性。编辑 我现在意识到OP需要Xamarin Android。这是为Xamarin表单编写的。:) 检查此问题,因为这可能重复: -- 尝试绝对布局 <AbsoluteLayout> <!--If You have other content, like a stacklayout, put it before the image (like below)--> <StackLayout Horizonta

我想在axml中使布局右端角的图像具有粘性。

编辑

我现在意识到OP需要Xamarin Android。这是为Xamarin表单编写的。:)

检查此问题,因为这可能重复:

--

尝试绝对布局

<AbsoluteLayout>
    <!--If You have other content, like a stacklayout, put it before the image (like below)-->

    <StackLayout HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand" AbsoluteLayout.LayoutFlags="All" AbsoluteLayout.LayoutBounds="0,0,1,1">
         <!--Content Here -->
   </StackLayout

    <Image Source="YOUR IMAGE SOURCE" AbsoluteLayout.LayoutFlags="All" AbsoluteLayout.LayoutBounds="1,1,0.2,0.2" />
</AbsoluteLayout>


希望这有帮助

但是绝对布局不推荐使用。还有别的选择吗?我错了。我以为你想要的是Xamarin表单,而不是Android。@SudiptoSarkar尝试检查这些答案:@SudiptoSarkar另请参见:你应该尝试自己编写代码。如果您有问题,请发布您尝试过的内容,并清楚解释哪些内容不起作用,然后提供。读一个好问题。一定要认真阅读。