小编igo*_*die的帖子

在 TextView 内打字会导致整个布局/屏幕“振动”

我有以下布局:

<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    >

  
    <androidx.core.widget.NestedScrollView
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        app:layout_behavior="@string/appbar_scrolling_view_behavior">

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical"
            android:paddingStart="@dimen/side_margin"
            android:paddingTop="@dimen/layout_margin_large"
            android:paddingEnd="@dimen/side_margin"
            android:paddingBottom="@dimen/layout_margin_default">

      
            <!-- Some oother stuff....-->
            
            <com.google.android.material.textview.MaterialTextView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="@dimen/layout_margin_default"
                android:text="@string/optional_data" />

            <com.google.android.material.textfield.TextInputLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:hint="@string/brand"
                android:layout_marginTop="@dimen/layout_margin_default"
                app:startIconDrawable="@drawable/baseline_store_24">
                <com.google.android.material.textfield.TextInputEditText
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:inputType="text" />
            </com.google.android.material.textfield.TextInputLayout>


            <com.google.android.material.textfield.TextInputLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:hint="@string/model"
                android:layout_marginTop="@dimen/layout_margin_default"
                app:startIconDrawable="@drawable/baseline_directions_car_24">
                <com.google.android.material.textfield.TextInputEditText
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:inputType="text" />
            </com.google.android.material.textfield.TextInputLayout>

            <com.google.android.material.textfield.TextInputLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:hint="@string/build_year"
                android:layout_marginTop="@dimen/layout_margin_default"
                app:startIconDrawable="@drawable/baseline_event_24">
                <com.google.android.material.textfield.TextInputEditText
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:inputType="date" />
            </com.google.android.material.textfield.TextInputLayout>

            <com.google.android.material.textfield.TextInputLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:hint="@string/license_plate"
                android:layout_marginTop="@dimen/layout_margin_default"
                app:startIconDrawable="@drawable/baseline_pin_24">
                <com.google.android.material.textfield.TextInputEditText
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:inputType="text" />
            </com.google.android.material.textfield.TextInputLayout>

            <com.google.android.material.textfield.TextInputLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content" …
Run Code Online (Sandbox Code Playgroud)

android textview android-layout material-design android-textinputedittext

5
推荐指数
0
解决办法
71
查看次数

变量未找到shell

if [ "$1" = "" ]
then
       echo -n "Gib das Startkapital ein: "
       read kapital
else
       kapital  = $1
fi

echo $kapital
Run Code Online (Sandbox Code Playgroud)

当我说kapital = $ 1时它说这个变量不存在:

$ sh zins.sh
zins.sh: 16: zins.sh kapital: not found
Run Code Online (Sandbox Code Playgroud)

variables shell initialization

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

如果JComboBox是可编辑的,如何将输入的字符串转换为对象?

所以我有这个班级"会员":

package pkgData;

import java.io.Serializable;

public class Member implements Comparable<Member>, Serializable{
  /**
  * 
  */
  private static final long serialVersionUID = 1L;
  private String name;
  private String city;

  public Member(String nameOfMember,String location) {
      super();
      this.name = nameOfMember;
      this.city=location;
  }


  public String getNameOfMember() {
      return name;
  }

  public String getLocationOfMember() {
      return city;
  }

  public void setNameOfMember(String nameOfMember) {
      this.name = nameOfMember;
  }


  @Override
  public String toString() {
      return name +", " + city;
  }


  @Override
  public int compareTo(Member o) {
      int …
Run Code Online (Sandbox Code Playgroud)

java casting jframe jcombobox

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