Hello,
Welcome to Microsoft Q&A!
Just simply bind the Click
event to the ShareOptionsLayoutOnClick
method on LinearLayout .
In OnCreateView method
LinearLayout layout = FindViewById<LinearLayout>(Resource.Id.ShareLinearLayout);
layout.Click += ShareOptionsLayoutOnClick;
Update
There is one more solution , you can assign the event directly in xml .
<LinearLayout
android:id="@+id/ShareLinearLayout"
android:layout_height="match_parent"
android:layout_width="0dp"
android:layout_weight="1.5"
android:gravity="center"
android:clickable="true"
android:focusable="true"
android:foreground="?attr/selectableItemBackground"
android:orientation="horizontal"
android:onClick="ShareOptionsLayoutOnClick" //add this line
>
Modify the ShareOptionsLayoutOnClick
method as below
At last ,reference Mono.Android.Export
in android project to enable the Export
attribute.
Best Regards,
Cole Xia
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.