小编And*_*y D的帖子

我的gofmt是错误地工作还是我不明白?

我想我的gofmt作品不是它应该如何,我是对的吗?

原始档案:

package main


import "fmt"


func main() {
    fmt.Printf("hello, world\n")
}
Run Code Online (Sandbox Code Playgroud)

然后我做了:

gofmt -r 'h -> H' -w "hello.go"
Run Code Online (Sandbox Code Playgroud)

文件内容:

package H


import "fmt"


func H() {
 H
}
Run Code Online (Sandbox Code Playgroud)

go gofmt

2
推荐指数
1
解决办法
198
查看次数

Android Studio:我不能让按钮位于屏幕底部

我用红色标记它应该如何,我需要更改组件树当前元素的属性,我不想删除它们或添加另一个。 在此处输入图片说明

文本视图:

    <?xml version="1.0" encoding="utf-8"?>
<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/topLayout"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:keepScreenOn="true">
    <com.camera.test.ui.camera.CameraSourcePreview
        android:id="@+id/preview"
        android:layout_width="match_parent"
        android:layout_height="match_parent">
        <com.camera.test.ui.camera.GraphicOverlay
            android:id="@+id/graphicOverlay"
            android:layout_width="match_parent"
            android:layout_height="match_parent" />
        <RelativeLayout
            android:id="@+id/content"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            android:layout_above="@+id/footer"
            android:gravity="center">
            <Button
                android:id="@+id/button"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_alignParentLeft="true"
                android:layout_alignParentRight="true"
                android:layout_centerHorizontal="true"
                android:background="@drawable/icon"
                android:onClick="Categories"
                android:text="BUTTON"
                android:textColor="#228496"
                android:textSize="21sp" />
        </RelativeLayout>
    </com.camera.test.ui.camera.CameraSourcePreview>
</LinearLayout>
Run Code Online (Sandbox Code Playgroud)

layout user-interface android android-layout android-studio

1
推荐指数
1
解决办法
1184
查看次数

为什么页面上没有div元素?

我仅使用html和ccs制作了一个简单的页面,它包含两个未在页面上呈现的彩色div块:页面上应该出现黄色和绿色的div,而应显示空白页面。我检查了错误-浏览器未显示任何错误。

HTML:

<html>
<head>
<link rel="stylesheet" href="styles.css">
<meta charset="UTF-8">
<title>Keyboard Test</title>
</head>
<body>
<div class="field"></div>
<div class="key" id="a key"></div>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)

CSS:

.field {
 background-color:yellow; 
}

.key {
 background-color: green;
}
Run Code Online (Sandbox Code Playgroud)

它们都在同一个文件夹中,包含html和css的文件的名称是index.html 和styles.css。

html css

1
推荐指数
1
解决办法
63
查看次数