layout

Multiple Custom View (derived from RelativeLayout) in one line

I have created a custom view by extending Relative Layout and it looks like this: The layout for the view: <?xml version="1.0" encoding="utf-8"?> <merge xmlns:android="http://schemas.android.com/apk/res/android"&gt; <RelativeLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="ce...

Android: how do i make a View's background invisible?

I am working with a ListActivity, and I'm trying to add images/backgrounds, ext to make everything look nice. However i have run into a little snag. The layout for the activity defines a background image, but the list items are not always transparent, and therefore cover up the background. If i am scrolling, or have otherwise touched a ...

Why is my wpf grid not being contained in its container?

I have a user control and within it I have two controls: 1) a search criteria control (custom user control) and 2) a Telerik RadGridView. Apart from that I have a window that is the shell for my application and in it exists three regions. When this window opens I click a button and the user control mentioned above gets inserted into on...

Qt4. Why no sizePolicy virtual method in QLayoutItem?

I want to implement own QLayoutItem successor, but I can't provide QSizePolicy to layout, because no sizePolicy virtual method in QLayoutItem. I looked into Qt sources and found that QLayout takes sizePolicy directly from QWidget avoiding QWidgetItem. Why trolls have done so? And what I can do? ...

In Android how to add a view at particular x-y co-ordinates on the screen

This is what I want to achieve. When ever a user taps at any point on the screen, I would like to show an image at that point for say 2 seconds. Is it possible ? ...

How to use automatic layout while retaining some control?

I have two panels and a button nested within an hbox. I want the panels to appear side-by-side and the button to appear under both panels equi-distant from the sides of the hbox (i.e. in the center). Getting the panels side-by-side was easy, but how do I get the button below both panels and in the center. Currently, the button show up ...

Elliminate gap between last div and page end in firefox/opera/Safari

I have a web page with large div(for example white) and another div that is follows the previous one. The problem is that if white block is big enough and it height is almost or even bigger than the browser window(and scroll bars appear), the red block is in the bottom of the page there is still gap between red div and end of the window ...

How can I change layout params while program is running

I have an ImageView sitting on a FrameLayout. I want to be able to move this imageView by setting a margin: LayoutParams lp = new FrameLayout.LayoutParams(WRAP_CONTENT, WRAP_CONTENT); lp.setMargins(left, top, 0, 0); imageView.setLayoutParams(lp); imageView.invalidate(); However nothing changes and my imageView does not move. What am I do...

Android: add new view with a XML Layout file

I am beginning developing android application. What I need to know is how to associated a xml layout file with a new class (not the activity). For example the class needs to have a table with an image and some texts. thanks! ...

Best approach for building a dynamic widget perspective using QT ?

I am building an interface similar in features to the Eclipse IDE for a telemetry project. I'll be showing many different widgets and each of them needs to be resizable / moveable / popped_out / popped_in / hideable / "fullscreen-able" / etc... like a "perspective" of the Eclipse IDE. What would be the best approach using QT? Which clas...

how to set marginBottom in android listview or linearlayout Dynamically?

friends, i want to set layout_marginBottom using java code or dynamically in list view or linearlayout any one guide me how to achieve this? any help would be appreciated. ...

C++ project layout

I am completely confused as to the proper way to layout a C++ project. I had all my classes in separate .cpp files, with their definitions in .h files. I then had one "header.h" which contained all the class headers, external dependencies and a few other things. But I wasn't able to use class names in the header files, where I needed to...

findViewById returns null when moved into a library file

I'm new to Java and Android. I have a piece of code that is used for multiple activities so I moved it into its own library .java file. However, now my findViewById return null where they used to return the right stuff when they were part of the main Activity file with onCreate() and setContentView() calls. How do I make it work inside m...

Layout design for HTC desire

Hello , I designed an app for htc desire.The background image used for the app looks good in ecipse layout, when installed in phone it is stretched.Please Help on this... Thanks , Dheepak ...

CSS Beginner Question – the header didnt adopt the assigned color

Hi Guys, I hope you can help my with a exercise I have been stacking. I am wondering why the header is not appears in blue - as I actually have assigned: Please not the header area. I have assigned color "blue". BUt I have tried any color as well. The header keeps white This is the CSS Code. (HTML is ok according to Dreamwaver) Thanks ...

magento cutom module to edit product tab

Ok so i built a module now I need to move it so it shows up as a tab in edit product I tried creating directory app/code/local/mycompanyname/adminhtml/Catalog/Product with all the same sub directories and file structure of my original module and in each of the files change the classes for example edit.php from class <myCompany>_...

Div's overlapping

I have a list of div pairs: MainDiv's and infPanel Divs. I need to put infPanel div's upon MainDiv and eliminate distance between MainDiv's. The best decision that I see is to set image in MainDiv with background option and just put infPanel inside MainDiv, but because of some technical requirements it is better to post image through jus...

Can you center a Button in RelativeLayout?

I'm trying to center a button in relative layout, is this possible? I've tried the Gravity and Orientation functions but they don't do anything. ...

wrap_content with layout_column for Button in TableLayout not working

I'm new to android development and just testing some things out. I have a button in a tablelayout. I want the button to wrap_content. But if I tell said button to stay in a certain layout_column it doesn't wrap_content. Is there a way to have these both active? Or do I have to align the button using pixels? Heres my code: <TableRow...

Can't get IgnoreGravity within RelativeLayout to work

I have two buttons. I want one to be aligned at the top center of the application. I want to get the other button to ignore the gravity settings and go where I tell it. How do I do this? <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/relative_la...