• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps onClick in TextView doesnt work

Hello,

I want a Menu with Textview to click it and react.

There is my TextView:
Code:
<TextView
                android:layout_width="fill_parent"
                android:layout_height="40px"
                android:text="MyLink"
                android:onClick="onClickMyLink"
                android:textColor="@color/white"
                android:padding="8px"
                style="@style/home_menu"/>

There is my listener method:
Code:
public void onClickMyLink(final View sfNormal) {

But If I click on the Text, it is not call my method.
The same method is working with a <button> tag
but not with my TextView.

Anybody an idea?

greets
Markus
 

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones