开发者

Create String From Character Images

开发者 https://www.devze.com 2023-02-17 18:58 出处:网络
Could anybody provide me the code? I am new in android. How can I create string with alphabe开发者_Python百科t images for instance I have A-Z alphabet images.

Could anybody provide me the code? I am new in android. How can I create string with alphabe开发者_Python百科t images for instance I have A-Z alphabet images.

I want to create my name like "jubin" click on that alphabet image one by one.


For that you need to take individual imageview for all those images . Suppose you want Alphabet A-Z then you have to take 26 ImageView and set Alphabet images into individual imageview .

There is setTag Property of image view so,you have to setTag for each imageView.

Example

If your first imageview have alphabet 'A' then you have to set Tag = 'A' , if imageview has alphabet 'B' then you have to set Tag = 'B' and so on...

So when you click on any image view you can get that tag using imageView.getTag() method.

you have to implement onClick method of imageview so you can get tag of individual imageView .

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号