将三个按钮放在一起但分别将它们分成三排

时间:2018-01-22 01:09:03

标签: android



PdfReader reader=new PdfReader(src);
PdfStamper stamper = new PdfStamper(reader,new FileOutputStream(dest),'\0', true);
PdfWriter writer=stamper.getWriter();
File file = new File(src);
String fileName=file.getName();
PdfAction action = null;
action = PdfAction.javaScript(readJsFileTostring(jsFileName), writer);
writer.setOpenAction(action);
stamper.setPageAction(PdfWriter.PAGE_OPEN, action, 1);
AcroFields form = stamper.getAcroFields();
XfaForm xfa = form.getXfa();
xfa.fillXfaForm(new FileInputStream(xmlData));
stamper.close();




继承我的代码我希望将这些行分隔开来,我想知道如何实现它? enter image description here

3 个答案:

答案 0 :(得分:0)

在你的包装器上,LinearLayout添加layout_gravity =“center_vertical”

<LinearLayout
    android:id="@+id/wrapper"
    android:layout_width="300dp"
    android:layout_gravity="center_vertical"
    android:weightSum="1"
    android:orientation="vertical"
    android:layout_height="300dp">

答案 1 :(得分:0)

使用GridView获取此功能。

    <GridView
    android:id="@+id/gridView"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:columnWidth="60dp"
    android:horizontalSpacing="5dp"
    android:numColumns="auto_fit"
    android:stretchMode="columnWidth"
    android:verticalSpacing="15dp"/>

答案 2 :(得分:0)

尝试在主LinearLayout中使用 <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="match_parent" android:gravity="center" android:layout_height="match_parent"> <LinearLayout android:id="@+id/wrapper" android:layout_width="300dp" android:weightSum="1" android:orientation="vertical" android:layout_height="300dp"/> </LinearLayout> ,如下面的代码:

SELECT
    COUNT(DISTINCT Col1)
    FROM YourTable YT
        WHERE NOT EXISTS
        (
            SELECT
                1
                FROM YourTable Y2
                    WHERE Col1 = YT.Col1
                        AND Col2 <> YT.Col2
        ) AND Col2 = 'True'