Go Back   Android Forums > Android Development > Application Development
Application Development Dev Lounge for the Coder Folks
Gamers - Check out our new sister sites!
Nintendo Wii U!    |    OUYA - $99 Android System!

test: Reply
 
LinkBack Thread Tools
Old December 5th, 2010, 03:36 PM   #1 (permalink)
New Member
Thread Author (OP)
 
Join Date: Nov 2010
Posts: 14
 
Device(s): Droid 4, Droid X
Carrier: Not Provided

Thanks: 1
Thanked 1 Time in 1 Post
Default A few different questions

Hey everyone, I didn't want to make separate topics so I decided to put all my questions into 1 topic. It's okay if you can't answer them all at once but it would be helpful if you could answer even one of them.

1.) In my table layout I have 3 buttons horizontally next to each other. Only half of the 3rd button shows. Shouldn't eclipse automatically re-size all three to make them fit whatever screen is viewing the app? Is there a way to automatically re-size them to fit each screen?
--The ScrollView, TableLayout, and Buttons all have height and width set to wrap_content

2.) Is there a way to make links change color when you click them? Sort of like 'A:visited' or 'A:hover' in CSS. Because right now, I have
Code:
android:autoLink="web"
in one of my XML files. The link is blue, but it is rather annoying not knowing if you clicked it or not until a popup appears. I'm sure there is some javascript that I can use however I would like for it to return back to a normal color once the user hits the back button... that way if they want to click it again it will still change colors.

3.) How do you embed a link inside an ImageView?

Vitality93 is offline  
Last edited by Vitality93; December 5th, 2010 at 04:01 PM.
Reply With Quote
Sponsors
Old December 7th, 2010, 07:43 AM   #2 (permalink)
New Member
 
Join Date: Dec 2010
Location: Marquette, MI
Posts: 2
 
Device(s): Droid X
Carrier: Not Provided

Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to sajarvis
Default

Off the top of my head I can help with the first issue. You'll get much more universal results if you set sizes with "sp" for text and "dip" for basically everything else. Here's an example of a button I had in a table layout:

Code:
<Button 
        android:text="@string/calctotal" 
	android:id="@+id/btnTotal" 
	android:layout_width="150dip" 
	android:layout_height="wrap_content">
</Button>
The "sp" and "dip" are pixel density values rather than absolute values, so if you choose the size you want relative to the screen it stays pretty consistent between devices.
sajarvis is offline  
Last edited by sajarvis; December 7th, 2010 at 07:45 AM. Reason: Properly enter code.
Reply With Quote
Reply


Go Back   Android Forums > Android Development > Application Development
Thread Tools

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

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



All times are GMT -5. The time now is 04:03 AM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.