プログラミング初心者です。
Android studioを用いてアプリを開発したいのですが、その際に、LINEやFacebookのプロフィール画像みたいにユーザーが自由に画像を変更できるようにしたいです。
どのようなコードを記載すればよろしいのでしょうか?
KotlinもしくはJavaでご教示いただけますと幸いです。
言語
Kotlin Java
コード (Activity)
package com.example.user.memo import android.support.v7.app.AppCompatActivity import android.os.Bundle class TestActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_test) } }
コード (Layout)
<?xml version="1.0" encoding="utf-8"?> <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent" tools:context=".TestActivity"> <ImageView android:src="@mipmap/ic_launcher_round" android:layout_width="wrap_content" android:layout_height="wrap_content" tools:layout_editor_absoluteY="100dp" tools:layout_editor_absoluteX="100dp" android:id="@+id/imageView2"/> </android.support.constraint.ConstraintLayout>
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2019/01/01 13:21