質問編集履歴
1
該当のソースコードを実装しました。
title
CHANGED
|
File without changes
|
body
CHANGED
|
@@ -1,3 +1,19 @@
|
|
|
1
1
|
###前提・実現したいこと
|
|
2
2
|
トグルボタンを実装したのですが、縦向きにしたいと思いました。
|
|
3
|
-
縦向きに実装するには、どのようにしたらよいでしょうか。
|
|
3
|
+
縦向きに実装するには、どのようにしたらよいでしょうか。
|
|
4
|
+
|
|
5
|
+
###該当のソースコード
|
|
6
|
+
```xml
|
|
7
|
+
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
8
|
+
xmlns:tools="http://schemas.android.com/tools"
|
|
9
|
+
android:layout_width="match_parent"
|
|
10
|
+
android:layout_height="match_parent"
|
|
11
|
+
tools:context=".MainActivity">
|
|
12
|
+
|
|
13
|
+
<ToggleButton
|
|
14
|
+
android:id="@+id/togglebutton"
|
|
15
|
+
android:layout_width="wrap_content"
|
|
16
|
+
android:layout_height="wrap_content" />
|
|
17
|
+
|
|
18
|
+
</RelativeLayout>
|
|
19
|
+
```
|