How to add testview when touching a letter on right alphabet panel as shown in images? Could you please help me? Below is my code.
In details, I am looking for an e
If you want to show the alphabet clicked as a Toast (a custom toast like the one shown in the image) use this:
view.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
LayoutInflater inflater = getLayoutInflater();
View layout = inflater.inflate(R.layout.toast_custom_layout,
(ViewGroup) findViewById(R.id.toast_layout_root));
Toast toast = new Toast(getApplicationContext());
toast.setGravity(Gravity.BOTTOM, 0, 0);
// to position the Toast on the screen
toast.setDuration(Toast.LENGTH_LONG);
// to set the duration, the toast should appear
toast.setView(layout);
// a custom layout for the toast
toast.show();
}
});
and your toast_custom_layout.xml
will be a 100 x 100 layout with large text size