How to Create A Clicable Textview in the android application..??
For making textview clickable You masut have to change the properties from xml file as well as JAVA file also.
Make the Clickable attrib. turn to true.
<TextView
android:id="@+id/textView1"es in java
android:layout_width="wrap_content"
android:layout_height="wrap_content""
android:text="Demo"
android:linksClickable="true"
/>
change ur textview as above.
then we've to make change in java file.
then we've to make change in java file.
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.rn1);
TextView textview1 =(TextView)findViewById(R.id.textView9);
textview1.setOnClickListener(buttonhandler);
}
View.OnClickListener buttonhandler=new View.OnClickListener()
{
public void onClick(View v) {
if(v.getId()==R.id.textView9)
{
CopyReadAssets();
}
Now in this after clicking on Textview it will Open Function CopyReadAssets();
& YOU ARE DONE.
Keep in touch for more detais..
Keep in touch for more detais..
No comments:
Post a Comment