android - Use margin on an include layout -


this follow question question:

margin not impact in "include"

i trying add margin include layout. have added layout_width , layout_height include element, margin still ignored. furthermore, when try auto complete word "margin" in layout xml file, attribute not recognized.

so how can add margin include tag?

the layout:

<!-- drawerlayout intended used top-level content view using match_parent both width , height consume full space available. --> <android.support.v4.widget.drawerlayout xmlns:android="http://schemas.android.com/apk/res/android"     xmlns:tools="http://schemas.android.com/tools"     android:id="@+id/drawer_layout"     android:layout_width="match_parent"     android:layout_height="match_parent">  <include     android:layout_width="match_parent"     android:layout_height="wrap_content"     layout="@layout/main_status"      />  <!--      main content view, view below consumes entire      space available using match_parent in both dimensions. -->  <linearlayout     android:id="@+id/container"     android:layout_width="match_parent"     android:layout_height="match_parent"     android:orientation="vertical" >  </linearlayout>  <!--      android:layout_gravity="start" tells drawerlayout treat      sliding drawer on left side left-to-right      languages , on right side right-to-left languages.      if you're not building against api 17 or higher, use      android:layout_gravity="left" instead. --> <!--      drawer given fixed width in dp , extends full height of      container. -->  <fragment     android:id="@+id/navigation_drawer"     android:layout_width="@dimen/navigation_drawer_width"     android:layout_height="match_parent"     android:layout_gravity="left"     tools:layout="@layout/fragment_navigation_drawer" /> 

as can see, linearlayout's height set match_parent. still want that, that's caused included layout , container layout on top of each other when trying add margin inside layout wanted include.

so did got me effect wanted setting paddingtop attribute of linear layout container. created space between included layout , linear layout.


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -