我很难搞清楚SQLAlchemy构造函数http://docs.sqlalchemy.org/en/latest/orm/constructors.html我想要的是将一个模式参数传递给一个类构造函数,如下所示,但我得到的是“自我”。没有定义错误。
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout 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/activity_main"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#fff"
tools:context="com.archimedia.appToYours.MainActivity">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:ignore="UselessParent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:weightSum="1">
<!-- this is what I want to shift up out of the screen -->
<ScrollView android:layout_height="wrap_content"
android:layout_width="match_parent">
<ImageView
android:id="@+id/upToYoursImageView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:contentDescription=""
app:srcCompat="@drawable/_title"/>
<EditText
android:id="@+id/code"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/targa"
android:ems="15"
android:fontFamily="sans-serif-condensed"
android:hint="Some text..."
android:inputType="textCapCharacters"
android:maxLength="15"
android:paddingLeft="60dp"
android:textColor="#222"
android:textColorHint="#222"
android:textColorLink="@android:color/holo_blue_bright"
android:textColorSecondary="#222"
android:textCursorDrawable="@drawable/cursor"
android:textSize="40sp"
android:textStyle="bold"
tools:ignore="HardcodedText,RtlHardcoded,RtlSymmetry" />
</ScrollView>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="130dp"
android:layout_marginBottom="50dp"
android:layout_weight="0.50"
tools:ignore="InefficientWeight">
<Button
android:id="@+id/send_button"
style="@style/Widget.AppCompat.Button.Colored"
android:layout_width="170dp"
android:layout_height="170dp"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:background="@drawable/rounded_button"
android:foregroundGravity="center_vertical|center_horizontal"
android:text="Go!"
android:textAppearance="@style/TextAppearance.AppCompat.Display3"
android:textSize="38sp"
tools:ignore="HardcodedText" />
</RelativeLayout>
</LinearLayout>
</LinearLayout>
</RelativeLayout>