質問編集履歴

2

コードを追加しました。

2019/01/01 13:20

投稿

emiri_py
emiri_py

スコア17

test CHANGED
@@ -1 +1 @@
1
- Kotlin ImageViewの画像をユーザーが変更できるようにしたい
1
+ koKotlin ImageViewの画像をユーザーが変更できるようにしたい
test CHANGED
@@ -21,3 +21,89 @@
21
21
  Kotlin Java
22
22
 
23
23
  ```
24
+
25
+
26
+
27
+
28
+
29
+ ### コード (Activity)
30
+
31
+
32
+
33
+ ```
34
+
35
+ package com.example.user.memo
36
+
37
+
38
+
39
+ import android.support.v7.app.AppCompatActivity
40
+
41
+ import android.os.Bundle
42
+
43
+
44
+
45
+ class TestActivity : AppCompatActivity() {
46
+
47
+
48
+
49
+ override fun onCreate(savedInstanceState: Bundle?) {
50
+
51
+ super.onCreate(savedInstanceState)
52
+
53
+ setContentView(R.layout.activity_test)
54
+
55
+ }
56
+
57
+ }
58
+
59
+
60
+
61
+
62
+
63
+ ```
64
+
65
+
66
+
67
+ ### コード (Layout)
68
+
69
+
70
+
71
+ ```
72
+
73
+ <?xml version="1.0" encoding="utf-8"?>
74
+
75
+ <android.support.constraint.ConstraintLayout
76
+
77
+ xmlns:android="http://schemas.android.com/apk/res/android"
78
+
79
+ xmlns:tools="http://schemas.android.com/tools"
80
+
81
+ xmlns:app="http://schemas.android.com/apk/res-auto"
82
+
83
+ android:layout_width="match_parent"
84
+
85
+ android:layout_height="match_parent"
86
+
87
+ tools:context=".TestActivity">
88
+
89
+
90
+
91
+ <ImageView
92
+
93
+ android:src="@mipmap/ic_launcher_round"
94
+
95
+ android:layout_width="wrap_content"
96
+
97
+ android:layout_height="wrap_content"
98
+
99
+ tools:layout_editor_absoluteY="100dp"
100
+
101
+ tools:layout_editor_absoluteX="100dp"
102
+
103
+ android:id="@+id/imageView2"/>
104
+
105
+ </android.support.constraint.ConstraintLayout>
106
+
107
+
108
+
109
+ ```

1

2019/01/01 13:20

投稿

emiri_py
emiri_py

スコア17

test CHANGED
File without changes
test CHANGED
@@ -7,3 +7,17 @@
7
7
  どのようなコードを記載すればよろしいのでしょうか?
8
8
 
9
9
  KotlinもしくはJavaでご教示いただけますと幸いです。
10
+
11
+
12
+
13
+
14
+
15
+ ### 言語
16
+
17
+
18
+
19
+ ```
20
+
21
+ Kotlin Java
22
+
23
+ ```