layout

JPanel Layout Image Cutoff

I am adding images to a JPanel but the images are getting cut off. I was originally trying BorderLayout but that only worked for one image and adding others added image cut-off. So I switched to other layouts and the best and closest I could get was BoxLayout however that adds a very large cut-off which is not acceptable either. So basi...

Problem with TextViews running into each other in RelativeLayout

I have a problem with two Textviews on the same height in a RelativeLayout running into each other. I use the following Layout. <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent"> <ImageView android:...

How to test web layout using javascript testing frameworks

Has any one tried testing the actual layout of the web application in different browsers? I can only think of getting the actual dimensions of all the elements and then matching it with expected values. I think it is crude way to do it. Is there a better way to actually test the layout? Thanks Bharani ...

How to make parts of a div element resize automatically?

I'm trying to create a small html fragment (a div element) consisted of three parts: a label, textbox, and a button. Within that div element the label would be on the left (autosized), the button would be on the right (again, autosized) and the textbox should take up all remaining space within the parent div element. This is what I've...

Android - Wrapping a complete line, not just words

Hi all, Am currently writing an App for Android and in one of the layouts I have a users name and beside it a couple of tags. If both the users name and the tags are short enough, they fit neatly into one line. However, when either of the two are longer I want the name to stay fixed to the left, and the tags to drop to a line below an...

An example of when to have multiple "activities" in an Android application

I seem to be missing something obvious here, why would I want more than one activity per application in Android? Does somebody have some solid examples? ...

How do I make MFC checkbox read-only but keep text enabled?

It seems that disabling a checkbox through the Disabled property also grays out the caption. Does anyone know how to keep the caption enabled but disable input? EDIT Based on Paul's idea, I've done the following (now that I figured out that the static label and checkbox has a transparent property). Added a couple checkboxes. Set the...

ListView and dynamic row sizes

I'd like to use different row descriptors (from the XML layout resource) in one ListView. Can I and how? Also, I'd like to be able to programmatically change the size of the rows, based on the data in each row, in a ListView. Can I and how? Thank you in advance--I LOVE stackoverflow. M ...

Internet Explorer percent based layout issue

Heya, My goal is to make a layout that is 200% width and height, with four containers of equal height and width (100% each), using no javascript as the bear minimum (or preferably no hacks). Right now I am using HTML5, and CSS display:table. It works fine in Safari 4, Firefox 3.5, and Chrome 5. I haven't tested it yet on older versions...

did you know some good web site about 'iphone css layouts' ,and can you help me to improve my code..

i want to create a webpage on iphone , but i can't complete it in a simple way, this is my code: <!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd"&gt; <html xmlns="http://www.w3.org/1999/xhtml" > <head> <meta http-equiv="Content-Type" content="text/html; charse...

optimized grid for rectangular items

I have N rectangular items with an aspect ratio Aitem (X:Y). I have a rectangular display area with an aspect ratio Aview The items should be arranged in a table-like layout (i.e. r rows, c columns). what is the ideal grid rows x columns, so that individual items are largest? (rows * colums >= N, of course - i.e. there may be "unused" ...

Problem with ExtJS vbox layout nested in a hbox layout

I'm trying to get a layout to look like this : I've had all sorts of fun trying to get this working. I finally got something that almost works, but only because I dropped in the 3.2 beta of Ext JS. I'm left with one final problem. The code below will display the panels almost correctly, however, the right hand panel doesn't stretch t...

Set margins in a LinearLayout programmatically.

I'm trying to use Java (not XML) to create a LinearLayout with buttons that fill the screen, and have margins. Here is code that works without margins: LinearLayout buttonsView = new LinearLayout(this); buttonsView.setOrientation(LinearLayout.VERTICAL); for (int r = 0; r < 6; ++r) { Button btn = new Button(this); btn.setTe...

CSS Margins Increase with H1 Length

Consider the following markup: <!DOCTYPE html> <html> <head> <title>Test Page</title> <link href="screen.css" rel="stylesheet" /> </head> <body> <h1>Test</h1> <h3>Description</h3> </body> </html> And the CSS: h3{ margin-top: -25px; } Now, I want the H3 to have a margin-left of how...

LaTeX: Unnumbered section in header of document

I have a document where I want to place an unnumbered section in my header. I use the fancyhdr package, and for a numbered section, I would had done something like this: \lhead{\leftmark} But this don't work with unnumbered sections. I'm solving math-problems in my document, so I don't want part-sections and numbered sections Anyone,...

display a 'view' list within a composite layout in drupal

Hi, I've installed the composite layout module and I created a view with a list of 'testomonials'(just a simple list of title and excerpt). On my front page, I have been able to include a couple of other nodes within that page and a couple of blocks (e.g. within then same composite layout). However, I want to also include the list v...

Why are some of my views not aligned correctly at the bottom of my relative layout?

I have problems getting some of my views aligned in a relative layout that I use inside a row of my listview. Here is a screenshot from the layout builder in Eclipse, this is what I think it should look like: The next image is from the emulator. Now the TestTestTest View is at the top and covers the name and distance Textviews. ...

Android: how to hide and then show View with animation effect?

I have similar question like this one: http://stackoverflow.com/questions/2079074/update-layout-with-the-animation Basically: I have one vertical LinearLayout View with edittext, button and then list. I'd like to hide exittext after pressing button to make more space for list (button will go up). On second press edittext should be visib...

Moving views inside a layout/view in Android

. . I have more than one question, but I'll start with the more important and problematic one: . . I have a FrameLayout with a ImageView inside it. . . I need to get the size of the "usable area" of the screen my activity is ocupping, so I set the "onSizeChanged" on my View (I extended the ImageView class). Everything worked fine here. ...

Horizontal "tab"ish scroll between views

I'm interested in creating a horizontal scroll view that "snaps" to the viewed item, so only one item is ever shown at a time. The user can touch-drag left/right and will see previous/next views, switching to it if there's enough velocity. This interaction is exactly like what the new weather/news widget that comes with the Nexus One doe...