mayur rahatekar
mayur rahatekar

Reputation: 4460

How Edit Image view in android

I have Image View I want to show the Current time and date on each Image View. I don't know how to edit the Image view in android.

Upvotes: 0

Views: 1943

Answers (2)

Android Killer
Android Killer

Reputation: 18489

Hope this trick will help:

Take a textview and add your image as it's background and set it's text to current date and time whatever you want. :)

Yes you can do that using onDraw(Canvas c) which takes canvas parameter.Here is also some functions of Canvas which can help you.

Upvotes: 3

James Black
James Black

Reputation: 41858

You should be able to just override the OnDraw method and you will get the canvas parameter.

http://developer.android.com/reference/android/widget/ImageView.html#onDraw(android.graphics.Canvas)

Here is an example of someone overriding in this question: Creating Custom ImageView

In order to save this to a database you will just need to save the canvas as a bitmap

Upvotes: 1

Related Questions