-4

This is single TextView which is containing values form database. So I want when I click on the TextView, it should show Toast the same text in the position I clicked.

The image showing the text view

Community
  • 1
  • 1
MaLik Farooq
  • 55
  • 1
  • 7

1 Answers1

0

This is the code the TextView showing the data which is coming from the firebase.

textView = new TextView(Chat.this);                                                                                                       
textView.setText(message);                                                                                                                  
final Typeface typeface = Typeface.createFromAsset(getAssets(), "fonts/fnt1.otf");                                                  

  textView.setTypeface(typeface);                                                                                                             
  LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
  lp.setMargins(0, 0, 0, 20);
  textView.setLayoutParams(lp);
Rumit Patel
  • 8,830
  • 18
  • 51
  • 70
MaLik Farooq
  • 55
  • 1
  • 7