Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Foreign Languages > German Forum
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Auffrischen imageView nach DrawText

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 01-19-2012, 03:15 PM
Knows the basics
 
Join Date: Nov 2011
Location: Im Paradies
Posts: 83
Default Auffrischen imageView nach DrawText

Ich spiele zur Zeit ein wenig mit den Draw Sachen herum und wollte so zum Spässle eine kleine Laufschrift in einem Imageview machen mit einer Canvas.

Funktioniert soweit ganz gut, der Text wird auch angezeigt:

canV.DrawText(strText,intPosX,30,Typeface.DEFAULT_ BOLD,30,Colors.Red,"CENTER")
imgScrolltext.Invalidate

Die Tragik: der Text wird ständig angezeigt, also nach dem Verschieben (erhöhen des intPosX) an der neuen Position, aber auch immer noch an der alten Position. Das sieht natürlich ziemlich schlecht aus. Die einzige Wirkung vom Invalidate ist, dass der Text an der neuen Position angezeigt wird.

Wie lässt man den Text vor dem erneuten DrawText aus dem ImageView verschwinden, also eine Art "Clear ImageView"?

Oder muss ich den Text auf ein Bitmap schreiben, dann die Bitmap laden und verschieben so ähnlich wie das Smiley Beispiel?
Reply With Quote
  #2 (permalink)  
Old 01-19-2012, 03:22 PM
klaus's Avatar
Basic4ppc Expert
 
Join Date: Oct 2007
Location: Fully, Switzerland
Posts: 4,463
Awards Showcase
Forum Contributer Beta Tester Competition Winner 
Total Awards: 3
Default

Am einfachsten ist es ein Rechteck mit der Hintergrundfarbe zu zeichnen bevor Du den Text neu zeichnest.

Beste Grüsse.
__________________
Klaus
Switzerland

Beginner's Guide / User's Guide
Reply With Quote
  #3 (permalink)  
Old 01-19-2012, 03:38 PM
Knows the basics
 
Join Date: Nov 2011
Location: Im Paradies
Posts: 83
Default

Danke funktioniert perfekt!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
line breaks in DrawText Fox Basic4android Updates and Questions 1 08-15-2011 11:15 AM
Problem with transparency and DrawText klaus Bugs & wishlist 3 03-16-2011 07:23 AM
Typo: Canvas - DrawText ssg Bugs & wishlist 1 12-14-2010 05:44 AM
DrawText derez Beta 3 11-21-2010 10:00 AM
Konvertierung String nach Int Amalkotey German Forum 1 06-14-2009 07:22 PM


All times are GMT. The time now is 06:49 PM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0