Android Forums

Go Back   These FORUMS ARE DISABLED!! OUR NEW FORUMS ARE AT http://androidforum.com/ > Android Coders > Android Development, Answers, Tutorials, and Code Snippets
Connect with Facebook

Click Here To Register!
 
 
LinkBack Thread Tools Display Modes
Old 04-01-2009, 11:59 AM   #1
Junior Member
 
Join Date: Sep 2008
Posts: 2
Friends: 0
View Wuque's Profile   View Wuque's Photo Album   View Wuque's Blog   View Social Groups
Hi, sorry for bothering, how can I set a png image as the background in a view?
Wuque is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in Technorati
Old 06-09-2009, 01:49 PM   #2
Junior Member
 
Join Date: Jun 2009
Posts: 3
Friends: 0
View The_Rick_14's Profile   View The_Rick_14's Photo Album   View The_Rick_14's Blog   View Social Groups
You can set it from the xml by using android:background="@drawable/photo_name". Just be sure to add the png file to the res/drawables directory of your project.

You can also do it within the java but I'd have to look up how to do so. I believe you would have to create a handler for the view and the call is something like view.setBackgroundResource(R.drawable.photo_name);
The_Rick_14 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in Technorati
 

Thread Tools
Display Modes



Similar Threads
Thread Thread Starter Forum Replies Last Post
Touchscreen, user view HCSC The Lounge 4 09-01-2009 10:10 PM
Help going from list view, to relevant text view. deenybird Android Development, Answers, Tutorials, and Code Snippets 0 02-04-2009 12:26 PM
Animating a simple event: View Flipper or Animation? arvind Android Development, Answers, Tutorials, and Code Snippets 0 12-29-2008 02:11 AM
How can i view the console output in Eclipse? Quest Android Development, Answers, Tutorials, and Code Snippets 1 11-25-2008 03:00 AM
1-Click thread view now added Andor Site Feedback 1 09-17-2008 10:15 AM


Unlocked G1 Phones | Buy T-Mobile G1 | Google Phone

All times are GMT -6. The time now is 03:59 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.
Copyright (c) 2012 TalkAndroid.com. All rights reserved.