AndroidにおいてViewをBindする方法はいくつかあります。 今回は、その手法の紹介および比較をしたいと思います。 この比較の話はGoogle I/O 2019で紹介されていたものです。 https://www.youtube.com/watch?v=Qxj2eBmXLHg その話を各手法を具体的に紹介しつつ、実際にどういったところに良し悪しがあるのかを説明したいと思います。 各サンプルコードは一部抜粋したものになっていますのでご了承ください。 実際に動くコードはGitHubに上げていますのでそちらをご参照ください。 前提の環境は以下の通りです Android Studio 3.6 Beta 5 Kotlin 1.3.50 その他ライブラリについては各種Branchに上がってるapp/build.gradleをご参照ください findViewById 入門書にも乗ってる一番基本的な
FragmentでViewの参照を持つとメモリリークする話と実装 Updated at Sat, Jan 18, 2020 View Bindingのドキュメントが更新され、onDestroyViewのタイミングで保持しているBindingの参照を解放する節が追記されました。 Use view binding in fragments Fragment自体のライフサイクルのほうが、FragmentのViewのライフサイクルより長いので、FragmentでBindingの参照を保持するとリークしてしまうためです。 この記事では、メモリリークをしないために、どのような実装が考えられるかを紹介していきます。 1. onDestoryViewで解放する 公式ドキュメントに載っている方法です。 // onCreatedViewで初期化 private var _binding: ResultProf
数年前からMicrosoftは、Windows onlyから脱却して、マルチプラットフォーム戦略を打ち出しています。その戦略は、デスクトップ向けのGUIアプリにもおよび、マルチプラットフォームで動作するアプリの開発ができる、さまざまなライブラリやフレームワークが提供されるようになってきました。本連載では、Windows環境におけるマルチプラットフォームGUI技術(.NET以外も含む)について、(主にC#の)サンプルコードをまじえて解説します。 はじめに 本連載では、Windows環境で開発可能なマルチプラットフォームGUI技術を解説します。本稿では、マルチプラットフォームに対応したUIフレームワークである、.NET MAUI(.NET マルチプラットフォームアプリ UI)をとりあげます。デスクトップとモバイル(Android)に対応した、簡単なアプリを作成してフレームワークの使い方を解説し
Android 開発環境の最新化 Android Studio を最新化します。 あんまり普段使わないので、立ち上げるたびに更新してる印象。 Android SDK の最新化 Android SDK 系もアップデートとかあるやつは最新にしました。 あんまり普段使わないので(略 Flutter のダウンロードと展開 基本的に以下のサイトに従ってやりました。 Windows install - Flutter ダウンロードした zip を解凍してできた flutter フォルダーを c:\SDKs\flutter に移動させて C:\SDKs\flutter\bin にパスを通しました。 そして flutter doctor を実行しました。結果は…? Doctor summary (to see all details, run flutter doctor -v): [√] Flutter
はじめに クロスプラットフォームとして語られるFlutterですが、実は、「Android開発だけでもFlutterでやった方がよくね?」 となんとなく思い始めています。 「FlutterってGoogleがAndroid開発を再定義した画期的なものになるんじゃないか」と。 自分は、おっさんなので古い話をしますが、Java開発でEJB2が存在していた頃です。まだ、バージョンが1.1になったばかりのSpring Frameworkを使った案件にたまたま参加したときの衝撃と同じなんです。「何これ? めっちゃわかりやすい。標準のEJBなんて駄目じゃん。」 今ではEJBは廃れ、Springがデファクトスタンダードになっていますよね。 ただ、使ったことがない人に伝えるのは本当に難しく、納得できない人も多いはずです。 自分でもなんでそう思うのかうまく伝えられる気もしないのですが、言語化してみます。 自分
ついに「Xperia XZ Premium(SO-04J)」にも、Android 8.0へのバージョンアップが提供されました。もちろん筆者が使用している端末も「ソフトウェアのアップデート」でバージョンアップしました! ちなみにWi-Fi環境でアップデートしましたが、大体20分くらいで完了。特に操作することもなく、作業自体はカンタンなのでXperia XZ Premiumのユーザーなら即アップデートをオススメします。 今回の更新では、OSのバージョンアップも大きいですが、いろいろと機能が追加されているのもうれしいところ。たとえばカメラ機能を利用して人物の顔などを3Dデータとしてスキャンする「3Dクリエーター」。これはXperia XZ Premiumのあとに発売された「Xperia XZ1」に搭載されていた機能。Xperia XZ1発表時にXperia XZ Premiumでも提供すると予告
This webpage was generated by the domain owner using Sedo Domain Parking. Disclaimer: Sedo maintains no relationship with third party advertisers. Reference to any specific service or trade mark is not controlled by Sedo nor does it constitute or imply its association, endorsement or recommendation.
Googleは米国時間10月25日、「Android Oreo 8.1」の開発者プレビュー版をリリースした。一般リリースは12月に予定されている。 この開発者プレビュー版は、「Nexus 5X」「Nexus 6P」「Pixel C」「Pixel」「Pixel XL」「Pixel 2」「Pixel 2 XL」のみをサポートする。これらのデバイスにダウンロードするか、「Android」エミュレータを通して読み込むこともできる。 GoogleはAndroid 8.1の新機能について、ブログの記事で詳しく説明した。 「Android Go」向けのメモリ最適化およびターゲティング:Android Goの構成(メモリ容量が1Gバイト以下)向けの一連のメモリ最適化が含まれる。 「Neural Networks API」:サポート対象のデバイス上で、ハードウェアアクセラレーションによる推論演算を可能にする
Open Wonder Android 8.0 Oreo™ Smarter, faster, more powerful and sweeter than ever. The world's favorite cookie is your new favorite Android release. Swift moves, behind the scenes 2x faster: Get started on your favorite tasks more quickly with 2x the boot speed when powering up* *boot time as measured on Google Pixel Background limits: Android Oreo helps minimize background activity in the apps y
Google I/O 2017で発表されたAndroid O。これによって一体何がどう変わるのか?まとめてみました。 そもそもAndroid Oって? Android OSの最新バージョンです。Oというのは暫定的な名前であり、正式な愛称は異なるものとなります。 K itKat、 L ollipop、 M arshmallow、 N ougat、といった具合に、「頭文字がアルファベット順」「お菓子の名前」という法則に則って命名されてきているので、Android Oの名称も、Oから始まるお菓子の名前を冠することになるでしょうね。 ピクチャー・イン・ピクチャーでマルチタスク これまで作業中だったアプリが小窓表示に。カレンダーのチェック中に友達とビデオ通話したり、料理ビデオを見ながらレシピ情報を読むなど、マルチタスキングがスムーズになります。 多数の便利機能 ホーム画面のアイコンの右上に表示される
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く