teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

1

コードの追加

2020/04/26 08:11

投稿

ankomike
ankomike

スコア1

title CHANGED
File without changes
body CHANGED
@@ -15,9 +15,8 @@
15
15
 
16
16
  ### 該当のソースコード
17
17
 
18
-
19
- ```ZukanOpenHelper
18
+ ZukanOpenHelper
20
-
19
+ ```java
21
20
  package…
22
21
 
23
22
  import…
@@ -56,7 +55,8 @@
56
55
  }
57
56
 
58
57
  ```
59
- ```MainActivity
58
+ MainActivity
59
+ ```java
60
60
  package…
61
61
 
62
62
  import …
@@ -107,6 +107,45 @@
107
107
  }
108
108
 
109
109
  ```
110
+ list_item
111
+ ```xml
112
+ <?xml version="1.0" encoding="utf-8"?>
113
+ <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
114
+ xmlns:app="http://schemas.android.com/apk/res-auto"
115
+ android:padding = "16dp"
116
+ android:orientation="horizontal"
117
+ android:layout_width="match_parent"
118
+ android:layout_height="wrap_content">
110
119
 
120
+ <ImageView
121
+ android:id="@+id/icon"
122
+ android:layout_width="0dp"
123
+ android:layout_height="match_parent"
124
+ android:layout_weight="1"
125
+ android:layout_marginRight="16dp"
126
+ android:src="@mipmap/ic_launcher_round" />
127
+
128
+ <LinearLayout
129
+ android:layout_width="0dp"
130
+ android:layout_height="wrap_content"
131
+ android:layout_weight="5"
132
+ android:orientation="vertical">
133
+
134
+ <TextView
135
+ android:id="@+id/name"
136
+ android:textSize="24sp"
137
+ android:layout_width="match_parent"
138
+ android:layout_height="wrap_content"/>
139
+ <TextView
140
+ android:id="@+id/loc"
141
+ android:textSize="16sp"
142
+ android:textColor="#999999"
143
+ android:layout_width="match_parent"
144
+ android:layout_height="wrap_content"/>
145
+
146
+ </LinearLayout>
147
+ </LinearLayout>
148
+ ```
149
+
111
150
  ### 補足情報
112
151
  Java初心者であり、ドットインストールの「Androidでメモアプリを作ろう」を参考に作成しました。