stretch

How can I stretch the image in imagebutton to the whole area of the imagebutton?

不打扰是莪最后的温柔 提交于 2019-12-03 05:45:49
问题 Here is a picture that will help you understand my problem: I want to stretch the image shown inside ImageButton to the whole area of the ImageButton . As you can see, the picture with the number 1 only take about 95% of the ImageButton and you can also see the boundaries of the ImageButton . I still want to maintain the image button style Here's how I am using ImageView: <ImageButton android:id="@+id/secondActivityBbuttonDownRight" android:layout_width="0dip" android:layout_height="match

WPF: How to make controls stretch in a StackPanel?

做~自己de王妃 提交于 2019-12-03 05:36:10
A Slider and some other controls won't stretch to fill available space when placed in a StackPanel; instead the width is always MinWidth (or about 10 pixels if MinWidth is not set). How do I make it stretch (the equivalent of Anchor.Left|Anchor.Right in WinForms)? Example: <StackPanel DockPanel.Dock="Bottom" Orientation="Horizontal"> <Slider Value="14" SmallChange="0.5" Maximum="100" Minimum="4" x:Name="FontSize" MinWidth="30" LargeChange="2" TickFrequency="10" TickPlacement="TopLeft" HorizontalAlignment="Stretch"/> <TextBlock Margin="8" Text="{Binding ElementName=FontSize, Path=Value}"

CSS background stretches to fill height in iOS but there is white space on scroll

谁都会走 提交于 2019-12-03 05:06:30
this CSS gets my background to fill 100% of the screen height in iOS but there is a minor problem - when you scroll down there is initially white space, then when you release your finger and stop scrolling the background image "adjusts" and fills 100% of the screen height again. The problem does not re-occur on the same page if you continue to scroll, just the first time. Could someone please help? Thanks #background { background: url(../img/background.jpg) center repeat-x; position: fixed; background-size: auto 100%; top: 0; left: 0; right: 0; bottom: 0; z-index: -1 } This happens because

Firefox rowspan problem

大城市里の小女人 提交于 2019-12-02 08:33:29
问题 I need some help with rowspan in firefox. I need 1 big cell and 30 rows (7 cells per row) of smaller cells next to the big one. It works exactly as I want in Chrome, but FF stretchs all smaller cells to make whole table rectangle or square shaped. Experiencing this issue at http://stinak.com/?s=1&u=1 (eg. Collections/ S/S 2012) I would like to force FF to make these tables look same as in Chrome. It means align all rows on top even if there are less rows than is set in rowspan. 回答1: I don't

Firefox rowspan problem

蓝咒 提交于 2019-12-02 07:38:39
I need some help with rowspan in firefox. I need 1 big cell and 30 rows (7 cells per row) of smaller cells next to the big one. It works exactly as I want in Chrome, but FF stretchs all smaller cells to make whole table rectangle or square shaped. Experiencing this issue at http://stinak.com/?s=1&u=1 (eg. Collections/ S/S 2012) I would like to force FF to make these tables look same as in Chrome. It means align all rows on top even if there are less rows than is set in rowspan. I don't know what specs have to say about this but Chrome's behaviour looks wrong. None of my other browsers (Opera,

WPF: Strange image stretching in Buttons

回眸只為那壹抹淺笑 提交于 2019-12-02 06:35:46
问题 I have multiple buttons, each having a 32x32 pixels PNG image. The strange thing is, that both buttons show different sizes (Yes, I triple checked that icons are really 32x32!). The seconds button looks like as it would be 48x48 pixels in size. The funniest thing is, if I omit the Stretch="None" attribute, the icons are scaled up to fill nearly the whole screen. I cannot explain myself why this is happening! <ToolBar Name="toolBar1" DockPanel.Dock="Top"> <Button Name="importButton" ToolTip=

spinner expanding beyond screen bounds

[亡魂溺海] 提交于 2019-12-02 04:32:53
I have a layout that contains a TableLayout with three rows. Each row has a TextView and a Spinner. The Spinners' column is set to stretch. My problem is that the Spinners are stretching off the edge of the screen when they contain a long string. I would like them to truncate the string instead. Here's a screenshot of the problem: http://www.comicfanboy.net/images/screenshot.png and here's the xml for the layout: <ScrollView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/settings_scrollview" android:layout_width="fill_parent" android:layout_height="fill_parent"

Image No Stretch or crop

喜欢而已 提交于 2019-12-02 03:06:48
问题 My question is simple. Let's say I have two rectangular images. The first is 200px wide and 100px tall, and the second is 100px wide and 200px tall. I want to display the images with a constant width/height, e.g. 150px by 150px without stretching the images to fit: I don't mind having whitespace/padding around the images. The problem is that the images could be of any width and height, and I want to limit them to a square box without stretching them. The following CSS stretches the images to

Image No Stretch or crop

一曲冷凌霜 提交于 2019-12-02 02:15:30
My question is simple. Let's say I have two rectangular images. The first is 200px wide and 100px tall, and the second is 100px wide and 200px tall. I want to display the images with a constant width/height, e.g. 150px by 150px without stretching the images to fit: I don't mind having whitespace/padding around the images. The problem is that the images could be of any width and height, and I want to limit them to a square box without stretching them. The following CSS stretches the images to fit to 150px by 150px: img { width: 150px; height: 150px; } The most preferable solution is CSS, even

WPF: Strange image stretching in Buttons

半世苍凉 提交于 2019-12-01 22:52:45
I have multiple buttons, each having a 32x32 pixels PNG image. The strange thing is, that both buttons show different sizes (Yes, I triple checked that icons are really 32x32!). The seconds button looks like as it would be 48x48 pixels in size. The funniest thing is, if I omit the Stretch="None" attribute, the icons are scaled up to fill nearly the whole screen. I cannot explain myself why this is happening! <ToolBar Name="toolBar1" DockPanel.Dock="Top"> <Button Name="importButton" ToolTip="Import" Click="importButton_Click"> <Image Source="Icons/Import.png" Stretch="None" /> </Button> <Button