マップ生成のボタン
This commit is contained in:
parent
a5ab646f29
commit
9d385dd87a
|
@ -19,20 +19,10 @@ public class MainActivity extends AppCompatActivity implements View.OnClickListe
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
setContentView(R.layout.activity_main);
|
setContentView(R.layout.activity_main);
|
||||||
|
findViewById(R.id.mapmapcreate).setOnClickListener(
|
||||||
|
view->{
|
||||||
|
|
||||||
button = findViewById(R.id.button1);
|
}
|
||||||
button.setOnClickListener(this);
|
);
|
||||||
editText = findViewById(R.id.textview1);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onClick(View v) {
|
|
||||||
if (v == button){
|
|
||||||
editText.setText("押した");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -8,8 +8,8 @@
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/button1"
|
android:id="@+id/mapmapcreate"
|
||||||
android:text="押せよ"
|
android:text="マップ生成"
|
||||||
android:textSize="50px"
|
android:textSize="50px"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user