layout

Vertically centering a view in Android.

I'm trying to center a View vertically on screen with the following layout: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" > <EditText android:text="example text" ...

How do I get a 100% height in CSS?

Hello. I'm trying to create a layout for my website and I'm stuck with this. I have a div layer, container, and inside it, two layers: content and sidebar. These divs don't have fixed height. I would like to make both of the inner divs to have the same height (variable). My current CSS is: /* ========== RESET ========== */ body,div,...

Android layout issue

So I have a webview I'd like to display as a dialog. I'd like the webview to fill the entire screen, except for a button below it that I'd like to stay at the bottom of the dialog regardless of how much content is in the webview. Currently my webview fills up the dialog just enough to push the button off the screen. I'm sure this is some...

[Android] What does it mean when a parent wraps_content and a child fills_parent?

Taken from the Android documentation about LayoutParams: FILL_PARENT, which means the view wants to be as big as its parent (minus padding) WRAP_CONTENT, which means that the view wants to be just big enough to enclose its content (plus padding) Now, if the parent sets its height to wrap_content, and the child sets its height ...

jquery: auto-size absolute-positioned child div

hi, i'm having the following markup using 2 divs. the #child div has set position:absolute; +------------------------------+ | +----------+ | | | #child | | | +----------+ | | | | | | | +--------------...

Flex: adding/removing component from HBox.rawChildren causes horizontalAlign to fail?

I have an HBox displaying a series of canvases. I am removing a child of a canvas and adding it to the rawChildren of the containing HBox, so I can position it, and make it appear to shift outside the bounds of the canvas. Here is the code from the canvas: private function onMouseOver(e:MouseEvent):void { (this.parent as HBox).rawC...

unable to resize table beyond certain minimum width

Here is a demo page: http://bridgetandmisha.com/resize%5Fsizes.html# Why am i unable to resize one of the tables to be 400px using this code: $("#countProductSummaryDetailTable").width(400) Can someone tell me what html markup is preventing this? Also, i am able to resize another table on the page to 400px (but that is not what i n...

Including a background drawable foobars my layout in Android. Ideas why?

If I don't include a background in my root layout then everything renders as I expect: However, if I add JUST ONE LINE adding in a background then the layout goes completely haywire: The relevant bit of the XML layout is: <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width ="fill_paren...

Position absolute vs float in XHTML/CSS

Hi, I want to convert a .psd to XHTML and I have a menu bar whith round corners streching all the width of the wrapper, what I did so far was making slices for the ends of the bar and one for the center that is set to repeat-x. For example I have this: <div id="tagline" class="grid_16"><!-- begin tagline --> <div class="le...

Qt QHboxLayout cell size ssues

For those of you who haven't been reading my Qt questoins, I am learning Qt for a project. I have only limited experience with GUI design at all, and not in Qt. I've got a horizontal layout that I want to populate with some buttons. I can feed these buttons in just fine, but my formerly-square buttons are stretched horizontally to take ...

findViewById() returns null for custom component in layout XML, not for other components

I have a res/layout/main.xml including these elements and others: <some.package.MyCustomView android:id="@+id/foo" (some other params) /> <TextView android:id="@+id/boring" (some other params) /> In my Activity's onCreate, I do this: setContentView(R.layout.main); (TextView) boring = findViewById(R.id.boring); // ...find other elemen...

Android Layout AutoCompleteTextView NullPointerException Workaround

I'm working in with the Android SDK 2.0 / Galileo / ADT 0.9.4 (latest to date). Against Android 1.5 API layer. If I go to the layout editor and add an AutoCompleteTextView the screen immediately gives me a NullPointerException. Does anyone have a documented workaround for this problem? I can't seem to find one. This is obviously a bug...

Silverlight control layout update in runtime

Hi, I have a silverlight control that has a few element such as: Image, TextBox and a TextBlock. The application shows a list of the same control and the controls are placed in a specific layout, in grid with rows and cols. Now, I would like to be able to modify all the controls layout and arrange the element differently (preferred ...

BlackBerry - ButtonField with centered Bitmap

Hi, I have a class that extends from ButtonField : class BitmapButtonField extends ButtonField { private Bitmap _bitmap; private int _buttonWidth; private int _buttonHeight; BitmapButtonField(Bitmap bitmap, int buttonWidth, int buttonHeight, long style) { super(style); _buttonWidth = buttonWidth...

How do you normally make a program look beautiful?

How can I make an Application look nice and not like an amateur pulled it together? I mean graphic-wise. Is there some sort of book you can read regarding beautiful program layouts, etc? I put this in Community Wiki so please feel free to leave your opinions that way we can all learn. :D Edit: Oh my god. I completely forgot to mentio...

Viewport2DVisual3D with multiple materials

Hi All, I have a Viewport2DVisual3D control that contains a MaterialGroup as its Viewport2DVisual3D.Material property: <Viewport2DVisual3D.Material> <MaterialGroup> <DiffuseMaterial Brush="{DynamicResource ImageBrush1}"/> <DiffuseMaterial Viewport2DVisual3D.IsVisualHostMaterial="True" Brush="White"/> </MaterialGroup> </Viewport2DVi...

Small CSS problem in IE7

Hi, I have a small css problem that i can't seem to find a solution for. I have 2 problems: url to site: http://www.umono.nl/test/ The OL in the red box "Zoek en boek" is wrong in IE7 The css popup menu in the header "home, alle steden, etc.." is not aligned right in IE7. Can somebody please help me out? Thx, Kevin, ...

Overlaying with CSS

I want to load a website in an iframe, and overlay the website with some hints about the website that is shown. However, i got stuck at the point that the website has a variable passive white space at the left and right site (just like in stackoverflow). This means that i cannot position the overlays absolute or relative to the div the...

IE6 bumps down content when the parent container is too narrow

In the following example, the right side container appears to the right of the left side one in standards compliant browsers, but in IE6 the blue right side container appears below the left side one. IE6 effectively bumps it down because the parent container is narrower than the total width of the left and right side containers. I hav...

How to layout a Silverlight app?

I am brand new to Silverlight. Just downloaded and installed it (the SDK and the controls toolkit), went through a few tutorial and getting my head around XAML. I want to build a fairly simple app with 3 panes. It should look similar to the image below. Panel 1 will have a TreeView. Whenever the user clicks on a node, something els...