Android: margin/padding for the ListView without having the margin applied to the header?



Is it possible to have a margin/padding for the ListView without having the margin applied to the header? I want my ListView to be like the Google Now layout. I've got everything working except for this little problem.


Question: Is it possible to not have layout parameters of the ListView apply to its header?


EDIT1:More info


The purple view is the header to the listView.
I have tried adding margin to the list item layout.This doesnt work either.
All i need is a way to apply margin to the listview so that it doesnt apply the margin to the header in the listView.


EDIT2:
My layouts
header.


View Replies

Related to : Android: margin/padding for the ListView without having the margin applied to the header?


Android ListView addFooterView margin/padding issue
Category : Programming Languages
I have a ListView that has a LinearLayout as its footer view that contains a TextView and a ListView initialized like so:mylist = (ListView) findViewById(R.id.mylist);mylistadapter = new MyListAdapter(MainView.this, info);myfooterlistadapter = new MyListAdapter(MainView.this, info);LinearLayout foot

View Replies


Why does <span> break outside <div> when margin and padding is applied?
Category : Web Design

I know this is very basic CSS. How do I keep the span contained within the div? At the moment, the span extends outside the top and bottom of the div.


<style type="text/css">
div {
width: 200px;
margin: 10px;
background-color: #ff0;
}
span {

View Replies


Why do margin and padding widths act differently when applied to a floated item?
Category : Web Design

Why do margin and padding widths act differently when applied to a floated item in Internet Explorer?

View Replies


Header Margin - Padding - Different in IE and Netscape
Category : Web Design

Why is the Menu on my site not aligned right like it is in IE. and the image is to the right of the logo in Netscape, where as it is ok in IE.
http://impactinvesting.loadedtechnologies.com
What do i do???
Thanks

View Replies


programmatically set margin/ padding of textview in a listview
Category : Programming Languages

This is a part of main_alllatestnews.xml


<LinearLayout
android:id="@+id/layout_content"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_above="@id/layout_menu"
android:layout_below="@id/layout_ti

View Replies


trying to align an image to the right margin and text to the left margin (Android application)
Category : Programming Languages

This is the layout I am using:


<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:background="@color/background"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:padding="30dip"
>

View Replies


Android: layout padding, margin, spacing attributes and their defaults for different views
Category : Programming Languages

Is there any resource that has all the default margins, paddings, spacings, etc for the different views in the one spot? Like a layout cheat sheet or something. It would be really handy when doing a layout to know the names of the non-zero spacing attributes for each view so you don't need to go


View Replies


bottom margin or padding doesn't work in relative layout in xml on android
Category : Android

I have a relative layout for a row that goes inside a listview. The row looks like:


<RelativeLayout android:id="@+id/relativeLayout1" android:layout_width="wrap_content" android:layout_height="fill_parent" xmlns:android="http://schemas.android.com/apk/res/android">

View Replies


Will the Screen fit to all devices if i use margin top's and margin bottom's in XML in Android
Category : Android

I am developing an application in which i need to use lot of text-views and i am using a relative layout.Since i positioned my text-views in different coordinates(margintop=20dp),will the layout fit for all the android devices(tabs,Nook color phones,normal devices etc)


Any suggestions


View Replies


Android: AutoCompleteTextView top margin ListView
Category : Programming Languages

The AutoCompleteTextView displays a ListView in a popup for auto completion. On top of the popup, before the ListView begins, there ist a little margin, in effect the first line in ListView looks higher than the other entries. Is there a way to remove the margin. For me it is just a problem becau


View Replies


2012 / 2017 Copyrights BigHow , All Rights Reserved .