FAQ Database Discussion Community


Margins of ImageView inside LinearLayout inside inherited RelativeLayout not working

android,android-layout,inheritance,margins
<br.application.component.HexagonGrid android:id="@+id/hexagonGrid" android:layout_width="match_parent" android:layout_height="match_parent" > <LinearLayout android:id="@+id/searchResultList" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginTop="12dp" android:orientation="vertical" > </LinearLayout> </br.application.component.HexagonGrid> HexagonGrid was created to put elements inside, like a RelativeLayout, this way: public class HexagonGrid extends...

RelativeLayout programmatically margins not working

android,relativelayout,padding,margins
LinearLayout usersPlaceholder = Main.lay_found_users; //Found Users Placeholder //RelativeLayout Params RelativeLayout userlay = new RelativeLayout(mCtx); //Create new Element userlay.setBackgroundResource(R.drawable.btn_useritem); //Background userlay.setGravity(RelativeLayout.CENTER_HORIZONTAL); //Gravity userlay.setClickable(true); //Clickable RelativeLayout.LayoutParams relativeParams = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.MATCH_PARENT, dp(80)); relativeParams.setMargins(dp(80), dp(80), dp(80),...

Why are there spaces between
  • 's? [duplicate]
  • html,css,html5,css3,margins
    This question already has an answer here: How to remove the space between inline-block elements? 15 answers Why is there a space before all these <li>'s Please Help. HTML <div class="links"> <ul> <li><a href="page1.html">Page 1</a></li> <li><a href="page2.html">Page 2</a></li> <li><a href="page3.html">Page 3</a></li> </ul> </div> CSS .links ul{ display: inline; }...

    Initilizer-list cannot convert to const MARGINS*

    c++,margins
    Today I jumped to Visual Studio (C++) 2013, I was using Codeblocks a lot of time but I realized that codeblocks starts to fail at compiling some codes like this: //#define _WIN32_WINNT 0x0500 #include "hMain.h" #include <windows.h> #include <Uxtheme.h> int Width = 800; int Height = 600; const MARGINS* Margin...

    CSS spurious margins

    css,margins
    I could do with a bit of help on this one. This page; http://fredericacards.co.uk/greetings-cards.php has a bunch of divs for products with an h3 heading. That h3 has a 20px top margin in Safari and a 20px top and bottom margin in Firefox that doesn't appear to originate from anywhere...

    How do I set margins with NReco.PdfGenerator?

    asp.net,c#-4.0,pdf-generation,margins
    I succeeded at changing many settings with NReco.PDFGenerator, but I do not understand how to set the margins. I found a .Margins option, yet it wants the type to be PageMargins. Below are some things I tried. How do I set the top, left, bottom, and right margins? HtmlToPdfConverter pdfConverter...

    manipulating top and bottom margins in pyplot horizontal stacked bar chart (barh)

    python,matplotlib,margins
    I'm trying to plot a horizontal stacked bar chart but get annoyingly big margins on top and bottom. I would like to get rid of that or control the size. Here is an example code and fig: from random import random Y = ['A', 'B', 'C', 'D', 'E','F','G','H','I','J', 'K'] y_pos...

    How to set margins as percentage of parent layout's size?

    android,percentage,margins
    I wanna set the margins as percentage. like this.. ViewGroup.MarginLayoutParams margin = new ViewGroup.MarginLayoutParams(iv_Dot.getLayoutParams()); margin.setMargins(30%, 20%, 0, 0); But, setMargins method is to support only int type. How can i set margins as percentage?. If, I get parent size. and then, calculate percentage. I can solve this problem. Is there...

    Set margin to “standalone” view

    android,android-layout,margins
    This might be just bad practice, but android gui keeps frustrating me as always. I have this standalone view called primary_button under res/layout: <?xml version="1.0" encoding="utf-8"?> <Button xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@drawable/primary_button" android:textColor="@color/light_warm_gray"/> and its custom background "primary_button" shape under res/drawable: <?xml version="1.0"...

    Green margins in Eclipse (luna)?

    eclipse,xhtml,margins,eclipse-luna
    I'm seeing these green margins on all of my .xhtml files - in addition, Eclipse seems to be running a little more slowly when the files are first opened. In addition, Eclipse is updating classloader often and slowly while working in these files. Any ideas as to what's going on?...