Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 77050

attach event handler to ListView items from Android/iOS project

$
0
0

Hi
I have a ListView that has an ItemTemplate as ImageButton

//XAML

<ListView.ItemTemplate>

                    <ImageButton Source="{Binding IconURL}"
                                 Clicked="???"/>
                </ViewCell>
            </DataTemplate>
        </ListView.ItemTemplate>
    </ListView>

//C#
dataList.ItemsSource = listOfGames;

i want to set the ImageButton Clicked event for all items from Android app , that is a function/Method defined in Android project MainActivity,
but i cant access ListView items from Android project

Note: when the imagebutton clicked , i need to to perform platform specific API code , so i defined the UI in Froms but i need to define the functions in Android or iOS projects

regards


Viewing all articles
Browse latest Browse all 77050

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>