質問編集履歴
1
xmlファイル、graidleファイルの追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -10,11 +10,11 @@
|
|
10
10
|
|
11
11
|
```java
|
12
12
|
|
13
|
-
ImageView imageView = (ImageView) findViewById(R.id.
|
13
|
+
ImageView imageView = (ImageView) findViewById(R.id.droidimageid1);
|
14
14
|
|
15
15
|
GlideDrawableImageViewTarget target = new GlideDrawableImageViewTarget(imageView);
|
16
16
|
|
17
|
-
Glide.with(this).load(R.raw.
|
17
|
+
Glide.with(this).load(R.raw.droid1).into(target);
|
18
18
|
|
19
19
|
```
|
20
20
|
|
@@ -43,3 +43,137 @@
|
|
43
43
|
というエラー文だと思うのですがどう定義するのか分かりません。
|
44
44
|
|
45
45
|
分かる方いましたらご教授お願いします。
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
|
50
|
+
|
51
|
+
[追記]
|
52
|
+
|
53
|
+
```xmlファイル
|
54
|
+
|
55
|
+
|
56
|
+
|
57
|
+
<?xml version="1.0" encoding="utf-8"?>
|
58
|
+
|
59
|
+
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
60
|
+
|
61
|
+
xmlns:app="http://schemas.android.com/apk/res-auto"
|
62
|
+
|
63
|
+
xmlns:tools="http://schemas.android.com/tools"
|
64
|
+
|
65
|
+
android:layout_width="match_parent"
|
66
|
+
|
67
|
+
android:layout_height="match_parent"
|
68
|
+
|
69
|
+
tools:context=".DroidSlotActivity">
|
70
|
+
|
71
|
+
|
72
|
+
|
73
|
+
<ImageView
|
74
|
+
|
75
|
+
android:id="@+id/droidimageid1"
|
76
|
+
|
77
|
+
android:layout_width="70dp"
|
78
|
+
|
79
|
+
android:layout_height="70dp"
|
80
|
+
|
81
|
+
android:layout_marginTop="100dp"
|
82
|
+
|
83
|
+
android:layout_toLeftOf="@id/droidimageid2"
|
84
|
+
|
85
|
+
android:src="@drawable/m" />```
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
```build.gradle(:app)
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
plugins {
|
96
|
+
|
97
|
+
id 'com.android.application'
|
98
|
+
|
99
|
+
}
|
100
|
+
|
101
|
+
|
102
|
+
|
103
|
+
android {
|
104
|
+
|
105
|
+
compileSdkVersion 30
|
106
|
+
|
107
|
+
buildToolsVersion "30.0.2"
|
108
|
+
|
109
|
+
|
110
|
+
|
111
|
+
defaultConfig {
|
112
|
+
|
113
|
+
applicationId "sample.example.droidslot4"
|
114
|
+
|
115
|
+
minSdkVersion 19
|
116
|
+
|
117
|
+
targetSdkVersion 30
|
118
|
+
|
119
|
+
versionCode 1
|
120
|
+
|
121
|
+
versionName "1.0"
|
122
|
+
|
123
|
+
|
124
|
+
|
125
|
+
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
126
|
+
|
127
|
+
}
|
128
|
+
|
129
|
+
|
130
|
+
|
131
|
+
buildTypes {
|
132
|
+
|
133
|
+
release {
|
134
|
+
|
135
|
+
minifyEnabled false
|
136
|
+
|
137
|
+
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
138
|
+
|
139
|
+
}
|
140
|
+
|
141
|
+
}
|
142
|
+
|
143
|
+
compileOptions {
|
144
|
+
|
145
|
+
sourceCompatibility JavaVersion.VERSION_1_8
|
146
|
+
|
147
|
+
targetCompatibility JavaVersion.VERSION_1_8
|
148
|
+
|
149
|
+
}
|
150
|
+
|
151
|
+
}
|
152
|
+
|
153
|
+
|
154
|
+
|
155
|
+
dependencies {
|
156
|
+
|
157
|
+
|
158
|
+
|
159
|
+
implementation 'androidx.appcompat:appcompat:1.2.0'
|
160
|
+
|
161
|
+
implementation 'com.google.android.material:material:1.2.1'
|
162
|
+
|
163
|
+
implementation 'androidx.constraintlayout:constraintlayout:2.0.1'
|
164
|
+
|
165
|
+
testImplementation 'junit:junit:4.+'
|
166
|
+
|
167
|
+
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
|
168
|
+
|
169
|
+
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
|
170
|
+
|
171
|
+
implementation 'com.github.bumptech.glide:glide:4.11.0'
|
172
|
+
|
173
|
+
annotationProcessor 'com.github.bumptech.glide:compiler:4.11.0'
|
174
|
+
|
175
|
+
}
|
176
|
+
|
177
|
+
|
178
|
+
|
179
|
+
```
|