diadia

興味があることをやってみる。自分のメモを残しておきます。

2020-01-23から1日間の記事一覧

レイアウトファイルのエラー原因

LinearLayout 自分がよく起こすレイアウトファイルのエラーはLinearLayoutに/をつけることが問題であった。 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical"> 省略 </LinearLayout> これが正しい書き方であるが、最初のタグに"/>"を書くとエラーが出てしまう。 …

画像を横スクロールできるように設定する

参考: http://hakoniwadesign.com/?p=8205

エラー対処:Exception android.util.AndroidRuntimeException: Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag.

参考: https://www.lanches.co.jp/blog/9776 要するにIntent.FLAG_ACTIVITY_NEW_TASKを設定すれば良いみたい。 このsetFlagsについてはまだ理解していないので次回の機会で。。。 intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK) コーディングイメージ val…

kotlin android studio Manifestファイルについて

ドキュメント https://developer.android.com/guide/topics/manifest/manifest-intro?hl=ja https://developer.android.com/guide/components/fundamentals?hl=ja#Manifest