小编And*_*slo的帖子

Git Pull 失败:调用失败来自服务器的文件意外结束

git pull我正在尝试使用 Android Studio 的内置按钮执行,但失败并显示以下消息:

Git Pull Failed
                Invocation failed Unexpected end of file from server
                java.lang.RuntimeException: Invocation failed Unexpected end of file from server
                at org.jetbrains.git4idea.http.GitAskPassXmlRpcClient.askUsername(GitAskPassXmlRpcClient.java:55)
                at org.jetbrains.git4idea.http.GitAskPassApp.main(GitAskPassApp.java:66)
                Caused by: java.net.SocketException: Unexpected end of file from server
                at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:851)
                at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:678)
                at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:848)
                at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:678)
                at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1593)
                at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1498)
                at org.apache.xmlrpc.DefaultXmlRpcTransport.sendXmlRpc(DefaultXmlRpcTransport.java:87)
                at org.apache.xmlrpc.XmlRpcClientWorker.execu... (show balloon)
Run Code Online (Sandbox Code Playgroud)

这可能失败的原因是什么?

git pull android-studio

89
推荐指数
7
解决办法
5万
查看次数

MotionLayout 忽略填充

我正在尝试在滑动时对文本视图的边距、填充和 alpha 进行动画处理。一开始,textview没有padding,alpha为1。最后,我希望alpha为0,padding为100dp,两侧边距为16dp dp,alpha为0.5 一切正常,除了padding是没有改变。MotionLayout 支持填充吗?我正在使用 androidx.constraintlayout:constraintlayout:2.0.0-beta4。

添加更多文本,因为 SO 说我的帖子看起来主要是代码...添加更多文本,因为 SO 说我的帖子看起来主要是代码...添加更多文本,因为 SO 说我的帖子看起来主要是代码.. 。

布局 XML:

    <androidx.constraintlayout.motion.widget.MotionLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/layoutParent"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    app:layoutDescription="@xml/test">

    <TextView
        android:id="@+id/fakenavigationBar"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        android:text="hello world">
    </TextView>
</androidx.constraintlayout.motion.widget.MotionLayout>
Run Code Online (Sandbox Code Playgroud)

运动场景:

<?xml version="1.0" encoding="utf-8"?>
<MotionScene xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:motion="http://schemas.android.com/apk/res-auto">

    <ConstraintSet android:id="@+id/start">
        <Constraint
            android:id="@id/fakenavigationBar"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:alpha="1"
            android:padding="100dp"
            motion:layout_constraintTop_toTopOf="parent"
            motion:layout_constraintStart_toStartOf="parent">
        </Constraint>

    </ConstraintSet>

    <ConstraintSet android:id="@+id/end">
        <Constraint
            android:id="@id/fakenavigationBar"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginStart="16dp"
            android:layout_marginEnd="16dp"
            android:alpha="0.5"
            motion:layout_constraintStart_toStartOf="parent"
            motion:layout_constraintEnd_toEndOf="parent"
            motion:layout_constraintBottom_toBottomOf="parent">
        </Constraint>

    </ConstraintSet>

    <Transition
        motion:constraintSetStart="@+id/start"
        motion:constraintSetEnd="@+id/end"
        motion:duration="2000"
        motion:motionInterpolator="linear">

        <OnSwipe
            motion:touchAnchorId="@+id/fakenavigationBar"
            motion:touchAnchorSide="top"
            motion:dragDirection="dragDown"/>
    </Transition>
</MotionScene>
Run Code Online (Sandbox Code Playgroud)

在此输入图像描述在此输入图像描述

animation android padding android-motionlayout

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