並び順

ブックマーク数

期間指定

  • から
  • まで

1 - 39 件 / 39件

新着順 人気順

LiveDataの検索結果1 - 39 件 / 39件

  • データ復旧なら東京秋葉原で16年、安心と復旧スピード業界No.1のLIVEDATA(ライブデータ)

    LIVEDATAが選ばれる理由REASON LIVEDATAは、専門的でわかりにくいデータ復旧業界の中で最もわかりやすいサービスを提供し、納得してご依頼を 判断いただけるようHP表記、電話対応等、お客様に対し正直かつ誠実に対応しております。 復旧費用に納得できる ※ 問い合わせ段階でも上限設定可能 ※ 依頼後に費用があがることはありません ※ NAS等は定額費用をHPで公開 ※ 高い理由・安い理由をしっかり説明 ※ どこから費用がかかるのかが明確 ※ 成功報酬のデータを指定できる ※ 復旧費用以外の不明な請求一切なし 重度障害が復旧できる ※ エンジニアは17年間復旧一筋 ※ 重度物理も2日で結果報告 ※ データ復旧パートナー、全国に300社以上 ※ 警察庁採用、弊社復旧ソリューションを活用 ※ ドナーパーツ保有数、12,375個 ※ クリーン環境を自社ラボワンフロアに完備 ※ 1,296

    • [Android Architecture Components] Lifecycle, LiveData and ViewModel 詳解 | PSYENCE:MEDIA

      [Android Architecture Components] Lifecycle, LiveData and ViewModel 詳解 Jumpei Matsuda 2017.05.24 155 28194464 こんにちは。daruma です。 Google I/O 2017 で Android Architecture Components をテーマとした以下の3セッションが行われました。 Introduction Solving the Lifecycle Problem Persistence and Offline そのセッションでは Google が 公式に Androidアプリにおけるアーキテクチャの指針と支援ライブラリを提供する ことを発表しました。すでにガイド及びライブラリは公開されており、こちらから試すことが可能です。ただし まだ正式版ではなく、1.0.0-alp

        [Android Architecture Components] Lifecycle, LiveData and ViewModel 詳解 | PSYENCE:MEDIA
      • Androidのライフサイクルの基礎からViewModel, LiveData, Kotlin Coroutinesまでを流れるように説明したい - Qiita

        Androidのライフサイクルの基礎からViewModel, LiveData, Kotlin Coroutinesまでを流れるように説明したいAndroidlifecycleJetpackAndroidX 先日、Google Developer Expert for Androidになりました。 これからもよろしくおねがいいたします。 Androidの初心者がステップアップできるような記事を書いてみます。 なにかツッコミがあればコメントしてください🙏 ライフサイクルについて少し学んだ後に、ViewModel, LiveData, Kotlin Coroutinesについて、ライフサイクルに関連する課題とその解決策という位置づけで話していきます。 1. ライフサイクルの基礎 ライフサイクルとは生き物の蝶でいうと生まれて、卵から幼虫になってさなぎになって、蝶になって死んでいく感じですが、A

          Androidのライフサイクルの基礎からViewModel, LiveData, Kotlin Coroutinesまでを流れるように説明したい - Qiita
        • Android Architecture Components 初級 ( MVVM + LiveData + Coroutines 編 ) - Qiita

          Android Architecture Components 初級 ( MVVM + LiveData + Coroutines 編 )AndroidKotlinAndroidStudiocoroutinearchitecture-components MVVM + LiveData + Coroutines入門 最近の主流の流れに沿い、記事 + ソースをアップデート(Kotlin化、Android XやCoroutinesや古い部分のアップデート)しました!(2020/07/16) MVVM( Model-View-ViewModel )設計 まず、MVVM(Model-View-ViewModel)設計とはなんだ、と。 私みたいなMVC( Model-View-Controller )のWebフレームワークしか触ったことのなかった人間は、某カンファレンスでこの設計について熱弁する方々

            Android Architecture Components 初級 ( MVVM + LiveData + Coroutines 編 ) - Qiita
          • GDG Tokyo Android Architecture Components - LiveData

            GDG Tokyo Techtalk Android Architecture Components - LiveData on Jan 24, 2018.

              GDG Tokyo Android Architecture Components - LiveData
            • LiveData with SnackBar, Navigation and other events (the SingleLiveEvent case)

              2021 Update: This guidance is deprecated in favor of the official guidelines. A convenient way for a view (activity or fragment) to communicate with a ViewModel is to use LiveData observables. The view subscribes to changes in LiveData and reacts to them. This works well for data that is displayed in a screen continuously. However, some data should be consumed only once, like a Snackbar message, a

              • LiveDataとStateFlowの違い

                Photo by Ussama Azam on UnsplashCoroutines 1.3.6 から StateFlow が導入されました。これは使い方等がLiveDataと似ているため、どういった違いがあるのか調べてみました。 これを書いてるときはまだ Exprimental なので、今後変更があるかもしれません。今回は1.3.7を使っています。 使い方まずは StateFlow の簡単な使い方です。 LiveDataと同じように定義してあげます。 MutableStateFlow をprivateにして、 StateFlow として外からは変更不可で公開してあげるのが丁寧ですね。 この例では数値をインクリメントしていくような処理になっています。 この StateFlow の変更通知を受け取る方法です。 見ての通り LiveData と使い方は非常に似ています。これらの違いについて分か

                  LiveDataとStateFlowの違い
                • Unit test for ViewModel and LiveData

                  DroidKaigi 2019 で発表した資料です。

                    Unit test for ViewModel and LiveData
                  • DataBindingでLiveDataが使えるようになった

                    Android Studio 3.1 Canary 6 is now available in the Canary and Dev channels. If you are upgrading from 3.1 Canary 1, 2…

                    • RxJava の Observable と LiveData と ObservableField をいい感じで使おう - Qiita

                      LiveData について勘違いしていたことをいくつか からの続きです。 前記事では LiveData は、 購読解除を自動でやってくれるので便利 DataBinding(=ObservableField)としては使えない 最低限の合成しかできないので物足りない という事を書きました。 今回の記事では、上で挙げた微妙な3つの点を解消すべく、RxJava と LiveData と DataBinding をいい感じで併用してみたいと思います。今回もコードは Kotlin です。 RxJava with Android DataBinding RxProperty を使おう! RxPropertyでRxJavaとAndroid Data Bindingを連携する - Qiita はい終了。 RxProperty について書くの何度目なんだ、自分。 作者の @k-kagurazaka@githu

                        RxJava の Observable と LiveData と ObservableField をいい感じで使おう - Qiita
                      • ViewModels and LiveData: Patterns + AntiPatterns

                        Typical interaction of entities in an app built with Architecture ComponentsIdeally, ViewModels shouldn’t know anything about Android. This improves testability, leak safety and modularity. A general rule of thumb is to make sure there are no android.* imports in your ViewModels (with exceptions like android.arch.*). The same applies to presenters. ❌ Don’t let ViewModels (and Presenters) know abou

                          ViewModels and LiveData: Patterns + AntiPatterns
                        • Lifecycle, ViewModel, LiveData の復習

                          Android Architecture Components 勉強会

                            Lifecycle, ViewModel, LiveData の復習
                          • LiveData について勘違いしていたことをいくつか - Qiita

                            Android Architecture Components(以下 AAC) に含まれる 「LiveData」 のサンプルを Kotlin で書いてみました。 LiveData とは LiveData とは、「ライフサイクルに応じて自動的に購読解除してくれる通知プロパティ」です。 モダン(と呼ぶにはもはや古い?)なUIパターンでは、UI側はデータの変更を検知して自身を書き換えます。 すなわちUI側では、「データを購読する」というコードを書くわけですが、「購読をやめる」というコードも合わせて考えなければなりません。しかし Android の Activity や Fragment はライフサイクルが複雑で、購読を管理するのも一苦労であり、不具合の温床になりがちです。 LiveData は AAC に含まれる Lifecycle と深く結びつき、この「購読解除」をほとんど自動的に行なってくれ

                              LiveData について勘違いしていたことをいくつか - Qiita
                            • DroidKaigi 2019 で「LiveData と Coroutines で 実装する DDD の戦術的設計」について話してきました。

                              DroidKaigi 2019 で「LiveData と Coroutines で 実装する DDD の戦術的設計」について話してきました。 みなさん、こんにちは。あんざいゆきです。 Y.A.Mの雑記帳というブログを書いています。Android の Google Developer Experts もしています。あと TechBooster というところで Android の同人誌書いてます。 twitter の id は yanzm でやんざむと読みます。 あんざいでも、やんざむでもお好きな方で呼んでください。 DroidKaigi でドメイン駆動設計について話をするのは3回目になります。はじめて聞くよという方も、いままで続けて聞いているよ、という方もどうもありがとうございます。

                                DroidKaigi 2019 で「LiveData と Coroutines で 実装する DDD の戦術的設計」について話してきました。
                              • Migrating from LiveData to Kotlin’s Flow

                                LiveData was something we needed back in 2017. The observer pattern made our lives easier, but options such as RxJava were too complex for beginners at the time. The Architecture Components team created LiveData: a very opinionated observable data holder class, designed for Android. It was kept simple to make it easy to get started and the recommendation was to use RxJava for more complex reactive

                                  Migrating from LiveData to Kotlin’s Flow
                                • SharedFlow、StateFlow、Channelなどを比較して、LiveDataやEvent通知の置き換えを考える - Qiita

                                  SharedFlow、StateFlow、Channelなどを比較して、LiveDataやEvent通知の置き換えを考えるAndroidKotlinKotlinCoroutines (ちょっと早いですが、時間が取れなかった場合、これをアドベントカレンダーのネタにするかもです) このパターンでこれだとうまく動かない、こういう方法があるなど、何か指摘などあればぜひ教えて下さい。 どうやら、これからはStateFlowやSharedFlowの時代のようです。 新しいコードで意図的にLiveDataを選択する理由はありません。ということが書かれていました。 Twitterなどで話題になっていました。 https://twitter.com/codinginflow/status/1326628159077412866 (Kotlin LangのSlackより) 最初にまとめ 以下にLifecycl

                                    SharedFlow、StateFlow、Channelなどを比較して、LiveDataやEvent通知の置き換えを考える - Qiita
                                  • LiveData: 2.2.0-alpha1のliveData {}によるコルーチン対応についてドキュメントやGoogle I/Oの動画とコードを読む - Qiita

                                    LiveData: 2.2.0-alpha1のliveData {}によるコルーチン対応についてドキュメントやGoogle I/Oの動画とコードを読むAndroidKotlincoroutineGoogleIO2019 Google I/Oで発表されており、割とKotlin Coroutinesを使ったアプリの作り方に影響するよう内容だったので、調べてみました。 利用例として、Kotlin CoroutiensでAPIやDBを操作して、LiveDataで返したいというのはかなりよくあるパターンです。 これを利用すると単純になるだけでなく、よくあるうまく動かないパターンなどを解決してくれるみたいです。 ここにソースコードがあります。 https://android.googlesource.com/platform/frameworks/support/+/7a4525ac3c56adff5

                                      LiveData: 2.2.0-alpha1のliveData {}によるコルーチン対応についてドキュメントやGoogle I/Oの動画とコードを読む - Qiita
                                    • Android Architecture ComponentsのViewModelとLiveDataを使えば画面回転も怖くない - Qiita

                                      ViewModelとかLiveDataのサンプルってAPI通信とかのわりと複合的なのが多いけど、もっと単純に使っていけるんではないか、という話。 ほぼ自分用のメモ。 ViewModelは、内部的にはRetained Fragmentをうまく利用して、Activityが"本当にDestroy"されるまで居残り続けられる土台みたいなもの。 これ、データバインディングを使うとだいぶありがたみがある。 たとえば、画像処理をやるアプリだと... これ、何も考えずにActivityとsavedInstanceStateでやろうとすると結構めんどくさい。 class ImageProcessingActivity .... { private int seekBarPosition; public void onCreate(Bundle savedInstanceState) { super.onCr

                                        Android Architecture ComponentsのViewModelとLiveDataを使えば画面回転も怖くない - Qiita
                                      • 【Android Architecture Components】LiveData 和訳 - Qiita

                                        注意 LiveDataの和訳になります。 わかりづらい表現を意訳したり、回りくどいところを端折ったりしています。 和訳に自信がないところもあるため、間違いを見つけた場合は指摘してください。 ・・・・・ LiveDataはライフサイクルを意識した監視可能なデータホルダークラスです。 通常の観測とは異なり、LiveDataはLifecycleによって、観測するアプリケーションコンポーネントのライフサイクルを考慮します。 注:LiveDataをプロジェクトにインポートする方法についてはAdding Components to your Project を参照してください。 ObserverのLifecycleがSTARTEDかRESUMEDの状態の場合、LiveDataはObserverをアクティブ状態とします。 public class LocationLiveData extends Liv

                                          【Android Architecture Components】LiveData 和訳 - Qiita
                                        • Kotlin Coroutines Flow + LiveData + Two-way Data Binding - Qiita

                                          Kotlin Coroutines 1.2.0からFlowというCold Streamを実現する仕組みが導入されました。これまではChannelというHot Streamの仕組みがあったのでRxにだいぶ近づいてきた感じがあります。 この記事では、FlowとLiveData、双方向データバインディングを使っていい感じにUIのイベントを処理してみます。 LiveData as Flow まずは、LiveDataにセットされた値をFlowとして扱うための拡張関数を作ります。Channelを作るときはchannelやproduceといったChannel Builderで作っていましたが、FlowではflowやflowViaChannelというFlow Builderが用意されています。 flowではFlowに値を流す処理emitがsuspend関数になっており、ObserverのonChanged

                                            Kotlin Coroutines Flow + LiveData + Two-way Data Binding - Qiita
                                          • SingleLiveEvent (LiveData) with multi observers

                                            UPDATE⚠️Sorry, This article is not recommended!! Do not use this!!⚠️ SingleLiveEvent has a problem that it’s restricted to one observer. I created NEW SingleLiveEvent which can be observed multi observers in a simple way. This is easier than Event which is mentioned in this article. (Sorry, it’s bad class name🙇) Using this new class is just the same using SingleLiveEvent. val event = SingleLiveEv

                                            • LiveData を UnitTest でテストする

                                              デザートの文字列を保持して、追加・削除されたタイミングで保持数を LiveData で通知する DessertsHolder を UnitTest でテストしてみましょう。 class DessertsHolder { private val counter = MutableLiveData<Int>() private val list = mutableListOf<String>() init { counter.value = 0 } fun getCounter(): LiveData<Int> = counter fun add(item: String) { list.add(item) counter.value = list.size } fun remove(item: String) { list.remove(item) counter.value = list.

                                              • 【Android Architecture Components】LiveData 和訳 - Qiita

                                                注意 LiveDataの和訳になります。 わかりづらい表現を意訳したり、回りくどいところを端折ったりしています。 和訳に自信がないところもあるため、間違いを見つけた場合は指摘してください。 ・・・・・ LiveDataはライフサイクルを意識した監視可能なデータホルダークラスです。 通常の観測とは異なり、LiveDataはLifecycleによって、観測するアプリケーションコンポーネントのライフサイクルを考慮します。 注:LiveDataをプロジェクトにインポートする方法についてはAdding Components to your Project を参照してください。 ObserverのLifecycleがSTARTEDかRESUMEDの状態の場合、LiveDataはObserverをアクティブ状態とします。 public class LocationLiveData extends Liv

                                                  【Android Architecture Components】LiveData 和訳 - Qiita
                                                • LiveDataの基礎的な性質を整理する。 - Qiita

                                                  LiveDataの初期値はnull。一度もsetValueしていないならば、onChanged()は通知されない。 setValue()毎の通知は、登録中のObserver別に一度だけ通知される。6 複数のObserverを登録している時は、それぞれのObserverのアクティブ状態に応じて通知される。 MediatorLiveData編 MediatorLiveDataのaddSource()で設定したLiveDataとObserverについて、アクティブとなる条件やObserverへの通知タイミングを整理します。7 addSource()でObserverを設定するコード例 本章ではLiveDataの役者を明確にするため、以下のコード例を元に説明します。 LiveData<SourceValueType> sourceData = (略); MediatorLiveData<XXX>

                                                    LiveDataの基礎的な性質を整理する。 - Qiita
                                                  • Android Jetpack 初級 ( Paging library + LiveData + Retrofitで、簡単無限スクロール) - Qiita

                                                    Android Jetpack 初級 ( Paging library + LiveData + Retrofitで、簡単無限スクロール)AndroidKotlinAndroidStudioMVVM Intro ※Paging3についてはこちら (2020/07/16) 今回は、Android Jetpackの一部、Architecture Components Paging library を使っていきたいと思います。(長い) LiveDataを取り扱ったことのある人にとってはお茶の子さいさいだと思います。むしろ意外とさいさいで可能性を感じたので、記事にしました。 初歩的なAACの理念や、DataBinding、LiveDataに関しては、以前の記事をご覧いただけますと幸いです。 ↓ Android Architecture Components 初級 ( MVVM + LiveData

                                                      Android Jetpack 初級 ( Paging library + LiveData + Retrofitで、簡単無限スクロール) - Qiita
                                                    • Android Data Binding Library — From Observable Fields to LiveData in two steps

                                                      One of the most important features of Data Binding is observability. It allows you to bind data and UI elements so that when the data changes, the pertinent elements are updated on screen. Plain primitives and Strings are not observable by default so if you use them in your Data Binding layouts, their values will be used when the binding is created but subsequent changes to them will be ignored. T

                                                        Android Data Binding Library — From Observable Fields to LiveData in two steps
                                                      • Android Architecture Components — Room, LiveData and ViewModel

                                                        During the concluded Google I/O 2017, there were some amazing announcements about Android. Say hello to Android Architecture Components. For once, these are announcements that ease our lives as Android Developers. Android Architecture ComponentsA new collection of libraries that help you design robust, testable, and maintainable apps. — developer.android.com It helps us developers address two pain

                                                          Android Architecture Components — Room, LiveData and ViewModel
                                                        • Substituting Android's LiveData: StateFlow or SharedFlow?

                                                          Kotlin Coroutines recently introduced two Flow types, SharedFlow and StateFlow, and Android’s community started wondering about the possibilities and implications of substituting LiveData with one of those new types, or both. The two main reasons for that are: LiveData is closely bound to UI (no natural way to offload work to worker threads), andLiveData is closely bound to the Android platform.We

                                                            Substituting Android's LiveData: StateFlow or SharedFlow?
                                                          • LiveDataの監視にktxを使わなくなったら起きたこと

                                                            はじめに これは Mobility Technologies Advent Calendar 2020 の11日目の記事です。 t_sofueです。よろしくお願いします。 今年、Androidアプリを開発している中で遭遇した問題について書きたいと思います。 具体的にはLiveDataのobserve関数についてです。 遭遇した問題 まずはどのような問題に遭遇したかです。簡単に言うとFragmentを表示して閉じて、再度表示すると例外が発生してクラッシュするという問題でした。 発生した例外は以下になります。 java.lang.IllegalArgumentException: Cannot add the same observer with different lifecycles 例外を投げているのはこちら 問題が起きたクラスについて 今回の問題が発生したクラスはざっくりと以下のような

                                                              LiveDataの監視にktxを使わなくなったら起きたこと
                                                            • GitHub - Shopify/livedata-ktx: Kotlin extension for LiveData, chaining like RxJava

                                                              You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert

                                                                GitHub - Shopify/livedata-ktx: Kotlin extension for LiveData, chaining like RxJava
                                                              • No more LiveData in Your Repository: There are better options.

                                                                Three years ago at a Google I/O that every Android developer remembers, Google announced Android Architecture Components and we were all excited about it. ACC has definitely changed the way we build Android Applications. ViewModel and LiveData have both taken an important place in our day-to-day app design. LiveData is the main topic of this post. Don’t get me wrong LiveData is a very powerful and

                                                                  No more LiveData in Your Repository: There are better options.
                                                                • Android Architecture Components 1.0 リリース - Lifecycle、LiveData、ViewModel、Room

                                                                  Spring BootによるAPIバックエンド構築実践ガイド 第2版 何千人もの開発者が、InfoQのミニブック「Practical Guide to Building an API Back End with Spring Boot」から、Spring Bootを使ったREST API構築の基礎を学んだ。この本では、出版時に新しくリリースされたバージョンである Spring Boot 2 を使用している。しかし、Spring Boot3が最近リリースされ、重要な変...

                                                                    Android Architecture Components 1.0 リリース - Lifecycle、LiveData、ViewModel、Room
                                                                  • Learn advanced coroutines with Kotlin Flow and LiveData

                                                                    In this codelab, you'll learn how to use the LiveData builder to combine Kotlin coroutines with LiveData in an Android app. We'll also use Coroutines Asynchronous Flow to implement the same thing, which is a coroutines library for representing an async sequence, or stream, of values. You'll start with an existing app, built using Android Architecture Components, that uses LiveData to get a list of

                                                                    • LiveDataのUnitTest

                                                                      ちょっとやっかいな部分もあったので、LiveDataのテストをどう書くのかまとめました。 build.gradle必要なものを追加します。LiveDataを使うので、もちろんArchitectureComponentを追加してます。 mockito-kotlin はmockitoをkotlinでいい感じに使うやつです。mockitoをそのまま使うとNull Safetyが影響したりするので、入れておくと良いと思います。 core-testing はLiveDataをテストする上で必要なものがあります。 同期処理テスト対象単純なViewModelをテストしてみます。この例だと、 fetchNameが呼ばれたらLiveDataに文字列を流してるだけです。 16行目: ここでは、Observerのmockを作成しています。mockitoを使って最後にverifyで値をチェックするためです。 17

                                                                      • Chaining LiveData like RxJava with Kotlin extension

                                                                        If you haven’t read my article about NonNull LiveData, you need to read it. Same idea will be reused here. If you don’t know about RxJava, you also need to read about it from https://github.com/ReactiveX/RxJava. In this article, we will talk about how we can borrow some ideas from RxJava and apply them to LiveData. Of course, thanks to Kotlin extension. It helps developer life easier. Sorry Java!

                                                                        • LiveData vs Flow vs RxJava - Blog - Mori Atsushi

                                                                          Kotlin Coroutinesの進化はすざましく、とどまるところを知りません。 状態やイベントを扱いやすくなったStateFlowやSharedFlowが登場し、さらには、Lifecycleをより扱いやすくなったLifecycleOwner.addRepeatingJobやLifecycleOwner.repeatOnLifecycle、Flow.flowWithLifecycleが追加されました。 RoomやDataStore等Jetpackの各種ライブラリでもCoroutinesが使われており、Jetpack Composeでも様々なところでCoroutinesが活用されています。 そういった中で、一部LiveDataやRxJavaからCoroutinesに書き直す動きが見られ、多少混乱を招いていると感じています。 結論から言うと、現時点において積極的にCoroutinesに移行す

                                                                            LiveData vs Flow vs RxJava - Blog - Mori Atsushi
                                                                          • RecyclerViewにLiveDataをDataBindingしたい - TRY ANDROID DEV

                                                                            状況 List型のデータを取得し、画面にRecyclerViewで表示させたい。 だけどobserve書きたくないし、RecyclerViewのAdapterクラスをViewModelで持ちたくないし。 LiveDataに値をpostしたらいい感じに紐づいてくれないだろうか 実装 以下のように実装した。 主に4つのクラスで構成される。 ViewModel Fragment RecyclerView.Adapter Fragmentのxml ViewModel /** * メイン画面のViewModel */ class MainViewModel constructor(private val showNovelListUseCase: ShowNovelListUseCase) : ViewModel() { // 小説リスト val novelList = MutableLiveDat

                                                                              RecyclerViewにLiveDataをDataBindingしたい - TRY ANDROID DEV
                                                                            • DataBinding + LiveData + RxJava2

                                                                              これはReactiveStreamsのPublisherをLiveDataに変換したり、逆にLiveDataをReactiveStreamsに変換したりできます。 これを使うことで、RxJava2のFlowableをちょっといじるだけで、そのままDataBindingで使うことができます。 サンプルbuild.gradleimplementation "android.arch.lifecycle:extensions:1.0.0" implementation "android.arch.lifecycle:reactivestreams:1.0.0" implementation "io.reactivex.rxjava2:rxjava:2.1.7"ViewModelボタンを押すとカレントミリ秒を表示するだけです。(RxJava使う必要性はまったくないですが…)

                                                                              • Level Up with LiveData (JP) - Speaker Deck

                                                                                Android Dev Summit 2018 報告会

                                                                                  Level Up with LiveData (JP) - Speaker Deck
                                                                                1