我在我的Windows 7机器上安装了cygwin,我遇到了一个问题,当我键入命令时,它偶尔会被包回到同一行,删除bash提示符.这是一个例子:

有问题的命令是命令"201"(从底部开始的4行).我把其他人包括在内.
我输入的命令的文本是
git commit -m "Forced LF line endings."
(注意:我发布的主要是git命令,但任何命令都会出现问题.我还没有注意到模式.)
它跳到了行的开头并开始覆盖我的提示.
当我按下向上箭头(查看历史记录)时,结果甚至更奇怪:

(注意光标是命令末尾的许多字符.) 当我尝试从该位置退格光标时,我只能回到这一步:

然后当我从那个退格线进入历史时,我得到了这个:

该命令从显示的文本末尾开始.(这对于整个历史是一致的)但是当我在历史记录中出现错误时,git commit ...它会像以前一样显示覆盖的文本但是当我经过它时,它会删除提示行并显示上一个条目历史与以前一样(图像2).
当我创建我的PS1变量时,我有这样的奇数输出,但我已经关闭了我的括号和东西,并且不认为这导致了问题.但是,如果你想看到我的.bash_profile(设置PS1)随意在GitHub上看到它.它真的很短.
我已经尝试过搜索这个问题,并且只能在xterm中找到一些有关换行的cygwin电子邮件档案,但没有解决方案.
PS:当我推动最新版本时.bash_profile,为了链接它,当我键入git add .bash_profile并按Enter键时,我再次遇到问题,它运行命令但是将光标返回到相同命令的开头而不是打印新提示.然后,当我写另一个提交行时,它的作用与第一个图像相同,但是它会使行的其余部分变黑(它包裹了行,但覆盖了整行,而不仅仅是前几个字符.)
TL;DR:我想创建一个视图来响应 Google Maps API 中地图的移动。是否有内置于 Google Map API 中的方法来检测相机是否已完成移动?/是否有方法检测相机是否静止?
我正在制作一个应用程序,其设计与Uber应用程序非常相似。在 Uber 中,屏幕中央有一个小的弹出气泡,当地图移动时它会消失,而当它静止时又会回来。我想复制这种效果。
这是我的应用程序中的气泡。它是在一个 xml 布局中定义的,该布局存在于带有地图的框架视图中。

我有动画功能,我只需要一种方法来感知地图的运动。
我找到了一种通过分配 CameraUpdateCallback来查看相机的编程移动是否已完成的方法,但是我找不到将这些回调分配给正常的、用户启动的相机移动的方法。
另一种方法是创建一个线程,每 X 毫秒检查一次相机的位置,并在地图位置不变时淡入气泡,但这对我来说感觉非常“hacky”,似乎需要额外的处理,不应该没必要。
是否有内置于 Google Map API 中的方法来检测相机是否已完成移动?/是否有方法检测相机是否静止?
我使用Android Studio中的默认模板使用CoordinatorLayout.
但是,当我向下滚动时,通知栏(状态栏)将滚出屏幕.这个效果可以在这个视频中看到. https://youtu.be/1oAqEpg7N4I
我已经包含了相关部分,但其余代码可以在这里找到:https: //github.com/vidia/MaterialDiningCourts/blob/master/app/src/main/res/layout/activity_meal_view.xml
在演示(cheesesquare)中,行为是我所期望的,将通知栏留在原位并且工具栏在其下方滚动.我已经搜索了这些布局并对我的代码进行了更改以匹配它们,但是无法找到必要的更改.
是什么导致通知栏滚动页面,为什么Android Studio中的示例有这种不正确的行为?
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout 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/main_content"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:context=".MealViewActivity">
<android.support.v4.view.ViewPager
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
<android.support.design.widget.AppBarLayout
android:id="@+id/appbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
app:layout_scrollFlags="scroll|enterAlways|snap"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light">
<Spinner
android:id="@+id/meal_chooser_spinner"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
</android.support.v7.widget.Toolbar>
<android.support.design.widget.TabLayout
android:id="@+id/tabs"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/AppTabLayout"
android:foregroundGravity="top"
app:tabIndicatorColor="@color/tabSelectedIndicatorColor"/>
</android.support.design.widget.AppBarLayout>
Run Code Online (Sandbox Code Playgroud)
和styles.xml,虽然我已经从这个文件中删除了我的自定义主题,但它没有帮助解决这个问题.
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="@style/Theme.AppCompat.Light">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item> …Run Code Online (Sandbox Code Playgroud)