我需要垂直移动 ConstraintLayout 中的一些视图,最好具有过渡效果(以避免“跳过”)。
该布局只是一个带有多个小部件(无层次结构)的约束布局,所有小部件都受到父级的约束。
我的布局文件:
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout
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:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="vertical"
android:id="@+id/myLayout"
tools:context="com.example.quant.icarus.MainActivity">
<SurfaceView
android:id="@+id/surfaceView1"
android:layout_width="fill_parent"
android:layout_height="fill_parent" />
<Button
android:id="@+id/button1"
android:layout_width="125dp"
android:layout_height="48dp"
android:alpha="0.5"
android:background="@drawable/button_border"
android:textColor="@color/ret_text"
app:layout_constraintVertical_bias="0.97"
app:layout_constraintHorizontal_bias="0.2"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:text="some text" />
<Button
android:id="@+id/button2"
android:layout_width="125dp"
android:layout_height="48dp"
android:alpha="0.5"
app:layout_constraintVertical_bias="0.97"
app:layout_constraintHorizontal_bias="0.8"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:text="some text" />
<SeekBar
android:id="@+id/prog_bar"
android:layout_width="210dp"
android:layout_height="40dp"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:thumb="@drawable/seekbar_thumb"
android:max="100"
android:progress="0"
android:rotation="270" />
<TextView
android:id="@+id/prog_text"
android:layout_width="wrap_content"
android:layout_height="20dp"
app:layout_constraintVertical_bias="0.1"
app:layout_constraintLeft_toLeftOf="@+id/prog_bar"
app:layout_constraintRight_toRightOf="@+id/prog_bar"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:text="some text"/>
<View
android:id="@+id/viewToMove1" …Run Code Online (Sandbox Code Playgroud) android android-layout android-view android-transitions android-constraintlayout
尝试在Windows 10台式计算机上删除Visual Studio 2015社区版(因为我现在正在使用2017)。
但是,当我转到“应用程序和功能”时,“卸载”按钮被禁用!
在没有破坏2017的情况下如何删除VS 2015社区?
不幸的是,我继承了这个工作站,似乎没人知道原始安装盘(如果有)在哪里!我还发现此工作站上存在Visual Studio 2010和2013。我怀疑VS 2015只是下载并安装的;因此本身没有原始磁盘。
任何建议表示赞赏。
我正在尝试链接这些构造函数:
public class Method1
{
public Method1(string a, string b) : this(a, b, "", "")
{
}
public Method1(string c, string d) : this("", "", c, d)
{
}
public Method1(string a, string b, string c, string d)
{
}
}
Run Code Online (Sandbox Code Playgroud)
我有什么办法可以实现这个目标吗?
目前它显示编译时错误。
我对Boolean返回类型函数做了一些研究,发现使用可为空的检查更安全。
现在编译器不喜欢我所做的。
我也尝试使用 if 语句,但它以某种方式只返回 false。
谁能向我解释一下!
fun check(list:ArrayList<String>): Boolean {
var test: Boolean?= null
for (i in list) {
when (i=="a") {
true -> test == true
false -> test == false
}
}
return test!!
}
Run Code Online (Sandbox Code Playgroud) android ×1
android-view ×1
boolean ×1
c# ×1
c#-4.0 ×1
constructor ×1
function ×1
kotlin ×1
uninstall ×1
windows ×1