I have a Flex layout with some fixed size boxes into which I want to display text. However the text length is very variable, so it is necessary to scale, wrap and possibly elide (using ellipsis) the text.
The basic algorithm needed is:
fill bounding box with text, scaling font size to fit
if font size < minimum
set font size to mi...
I have a layout which specifies sizes of widgets in relative dimension, for example:
<LinearLayout ... layout_height="fill_parent">
<ImageView ... layout_height="wrap_content" />
<TextView ... layout_height="120dp" />
</LinearLayout>
Immediately after onCreate, I want to know how much is the height of the ImageView. How to d...
I'm trying to replace some layouts table layouts with css layouts and have this code:
<html>
<head>
<style type="text/css">
#grid{
border:solid;
border-width:1px;
border-color:#000000;
width:300px;
max-width:300px;
min-width:300px;
overflow:hidden;
font-size:14px;
}
#grid .item{
text-align:center;
w...
This page uses $_GET to grab an asset id and query a mysql database and return some information.
If 'id' does not match anything, no results are displayed but the page looks fine. If 'id' is null an error would occur at $id = $_GET["id"] or die(mysql_error()); When this occurs, they page layout is not displayed correctly. How do I fi...
I need some opinions on using PHP to make completely "scalable" websites.. For instance, using viewport resolution and resizing images, applying dynamic css styles..... In my mind doing this just add's to the complexity and should not be done, it should be fixed or fluid using strictly css and no server-side languages to generate layouts...
Linear layout below. This layout is aligned parent bottom in a Relative Layout. Problem is I want all buttons to have the same height. I have tried layout_gravity="fill" but that doesn't seem to work.
<LinearLayout android:id="@+id/button_layout"
android:layout_height="wrap_content"
android:layout_width="fill_parent"...
The XML documentation for layouts isn't very good. There are a large number of related variables and it isn't clear at all how they interact or differ. Is there any guide - maybe a book, or blog post ect that would help me understand this?
Related
Is there any Android XML documentation?
...
With Netbeans I've succeded center a jpanel with fixed size, within an other jpanel. Now I can't repeat it - only copy it.
How did I do? (or should I do to center x and y a jpanel with fixed size in another jpanel).
The result differs in code:
Working - search for .addContainerGap( and see next not working:
javax.swing.GroupL...
In Tim Bray's latest Android blog post he mentions the "dashboard" ui pattern (what is used for the Twitter app, Facebook app, etc. Is this layout as simple as a GridView with Buttons or is it something else?
...
I use this code to generate a spinner in my app:
subCatAdapter = new ArrayAdapter<Subcategory>(this, android.R.layout.simple_spinner_item, subCategories);
subCatAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
On my device (Motorola Milestone) and in the emulator this looks like the standard gra...
Hi all!
I´m using a checkbox in my code that when its checked it makes a textview and a editText visibles, but if I uncheck de checkbox they continue being visible instead of dissapear.
Here is the code:
final CheckBox save = (CheckBox) findViewById(R.id.checkbox);
save.setOnClickListener(new OnClickListener() {
pu...
I have been asked by a client to create a site where the content area overlaps the footer. However they also want the footer to be attached to the bottom of the viewport, which I've done, but it seems that I can't find a good way to vertically stretch the content to maintain the overlap should the browser be resized.
I've created a diag...
I have a tower built from blocks like this :
Whole Tower is an array of Towers. Each Tower contains Box[] array containing single Box'es.What layout should I use for this and can you give me any tips on how to create it ?
Would it be easier if I would create Grid[][] containing Box'es? But I guess I can't store Box object inside Grid...
I'm developing a project in .NET (using C# to be more specific).
Using Visual Studio as an IDE.
Using Mercurial for version control.
I'll be using some third-party libraries:
ThirdParty.Foo.dll
ThirdParty.Bar.dll
ThirdParty.Baz.dll
And some in-house libraries:
Company.A
Company.B
Company.C
Company.D (References t...
I have a simple two column layout with a footer at the bottom. When the content in the sidebar is taller than the content in the main column, everything looks great. But when the height of the main column is greater than the sidebar, I need the sidebar to grow to the same height as the main column and for the last <div> in the sidebar ...
I'm using a small CMS for a small site (http://www.ovlu.li/cms/). There I include a JavaScript on the first site to open an image in a popup:
<script type="text/javascript">
function pop(file)
{
helpwindow = window.open(file, "Vaterland", "width=600, height=796", "directories=no", "toolbar=no", "location=no", "status=no", "menubar=no",...
I am using two xml layout file layoutPotrait.xml and layoutLandscape.xml.When device/emulator is in portrait mode i want to set the content view with layoutPortrait.xml file and when I will change the emulator to landscape mode I want to set content view with layoutLandscape.xml file. How can I achieve this?
...
I'm beginning to think this is impossible, but thought I'd ask you guys.
Basically it's a 2 column layout, but the "business" wants the following:
-Always take up the entire browser window
-Accommodate resizing of browser window
-Left column will be fixed width, but that width should be flexible from page-to-page.
-Left column has a...
I have a window with tab control and number of pages - tab items. Each tab item has same grid layout - 6 rows and 4 columns. Now, each tab item contains grid with row and column definitions, so almost half of XAML is definition of grids.
How can I define this grid in one place and reuse that definition in my application? Template? User...
I have created some <div> tags and am setting it to contain two <div> tags that are floated to both sides of the <div>.
I noticed when I tried to set a background color that the containing <div> was not properly wrapping around the <div>s that its supposed to contain.
I would like to know why this happens.
I have seen a similar question...