margins

Android GridView imperfection, how to remove extra white space to the right

ε祈祈猫儿з 提交于 2019-12-04 07:47:58
I have a GridView based calendar. I have the following XML layout with the selector set to null thus android:listSelector="@null" in accordance with advise I have got from this site. Now I am getting a few pixels wide strip to the right of the GridView. Why? I have tried everything I can but to avail. Here is my XML layout: <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="match_parent" android:orientation="vertical" > <GridView android:id="@+id/calendar" android:layout_width="fill_parent" android:layout_height=

Java - JPanel with margins and JTextArea inside

爱⌒轻易说出口 提交于 2019-12-04 00:17:28
I want to create something like this: Main panel has its margins (x), and TextArea in the center of that panel which almost fills up the panel. At the bottom is another panel with custom size (height y), which can be toggled visible and unvisible with some shortcut. Bottom Panel has FlowLayout and few elements. The problem is I have no idea how to do this. BoxLayout has no margins. I tried with GridBagLayout but I doesn't work or I can't understand it enough :( I tried also with setting JTextArea margins textMain.setMargin(new Insets(insetTop, insetLeft, insetBottom, insetRight)); but when

Reduce left-margin in Visual Studio 2015

核能气质少年 提交于 2019-12-03 22:57:22
Please can anyone tell me how I can get rid of the margin at the left edge of the editor in VS2015? I don't mind the "indicator margin", but there is now a large space between that and the start of my code. In Tools-Options - Text-Editor - General - Display, I have the "Selection margin" turned off. Turning it on makes the gap even wider. I believe that the additional margin is used by the new "code assistance" light-bulb, which I would gladly turn off, but I cannot find an option for it. I have the Productivity Power Tools extension installed, but I don't think that this is responsible. I

Set a Margin between two buttons programmatically from a linearlayout

爷,独闯天下 提交于 2019-12-03 16:21:40
问题 How can i set a margin of 20dp between the button "regler" and "decommender" programmatically. Here is my workings LinearLayout lytmain = new LinearLayout(Mcontex); lytmain.setOrientation(LinearLayout.VERTICAL); LinearLayout lytdate = new LinearLayout(Mcontex); LinearLayout lytbutton = new LinearLayout(Mcontex); lytbutton.setBackgroundResource(R.color.black); lytbutton.setBackgroundResource(R.color.black); lytdate.setBackgroundResource(R.color.black); lytmain.setBackgroundResource(R.color

CSS 2.1 spec: 8.3.1 Collapsing margins: cannot properly interpret special case: clarification sought

喜欢而已 提交于 2019-12-03 12:53:04
问题 Section 8.3.1 of the CSS 2.1 spec on collapsing margins states: If the top and bottom margins of an element with clearance are adjoining, its margins collapse with the adjoining margins of following siblings but that resulting margin does not collapse with the bottom margin of the parent block. Here is my, surely erratic, attempt at making something out of this statement: The statement considers an element X for which: X has clearance, therefore either of the "clear: left;", "clear: right;"

What does “Constrain to margins” mean in Interface Builder in Xcode 6.0.1

我的梦境 提交于 2019-12-03 11:51:11
I understand the purpose of "Spacing to the nearest neighbor" (in Xcode 6, more especially in Interface Builder) but what is the point of "Constrain to margins"? Is there a link between "Spacing to the nearest neighbor" an edge of a particular control button, and the fact of at the same time checking the checkbox named "Constrain to margins"? What is the role of this feature in Autolayout? Please find a screenshot with the checkbox and the label that I am talking about surrounded in red below: ( Screenshot above in bigger format ) Thank you in advance for your answers to my three questions.

To use layout_marginLeft in a button style applied as a theme?

[亡魂溺海] 提交于 2019-12-03 07:33:00
问题 I used an attribute layout_marginLeft="30dip" in a style defined for buttons. When I apply this style individually for each button, the left margin is placed as I wanted. But then I defined a theme, where I assigned my button style to the attribute android:buttonStyle and applied it to my project. However, the left margin property is ignored. Any idea what I must do here? style.xml as follows: <style name="btnstyle" parent="@android:style/Widget.Button"> <item name="android:layout_height"

Set a Margin between two buttons programmatically from a linearlayout

走远了吗. 提交于 2019-12-03 06:22:38
How can i set a margin of 20dp between the button "regler" and "decommender" programmatically. Here is my workings LinearLayout lytmain = new LinearLayout(Mcontex); lytmain.setOrientation(LinearLayout.VERTICAL); LinearLayout lytdate = new LinearLayout(Mcontex); LinearLayout lytbutton = new LinearLayout(Mcontex); lytbutton.setBackgroundResource(R.color.black); lytbutton.setBackgroundResource(R.color.black); lytdate.setBackgroundResource(R.color.black); lytmain.setBackgroundResource(R.color.black); Button btnset = new Button(Mcontex); Button btncancel = new Button(Mcontex); btncancel

Android set navigation drawer list to open exact half of the screen for all device screen

孤街醉人 提交于 2019-12-03 05:38:41
问题 I want to open the drawerlist to the half of the screen for all different device. i tried hard coded values for layout_margineleft 200dp or 100dp to the drawerlist. but it doesn't work in all device it different from device to device. so how can i maintain the exactly half of the screen for drawerlist. i also tried various function like setLeft(int) etc.but some of them doesn't work due to i use minimum version 8. So please help me. thanks in advance. mDrawerLayout = (DrawerLayout) view

marginal total in tables

人走茶凉 提交于 2019-12-03 04:14:20
问题 I have a data frame with a number of infections identified from clinical isolates at different dates. So far I have organised the data into a shape that I want to start working with. I am trying to prepare a series of tables of tables for the descriptive statistics of the report. I have been using ftable and get the following: onset.types <- ftable(SAB$Onset,SAB$MRSA.Type,year(SAB$Collection.Date)) 2005 2006 2007 2008 2009 2010 Community 454 472 512 499 525 512 AUS-2/3-like 28 23 27 29 32 38