android-architecture-components

is it normal if my image from camera in ImageView disappear after segue to another fragment using navigation component?

☆樱花仙子☆ 提交于 2021-01-25 01:58:19
问题 I try to capture an image using camera then the image result will be placed on my ImageView in a fragmentA like the code below, so it it NOT fetching an image path from Server then place it in ImageView using Glide Library, I take an image from camera. val image_uri = Uri.fromFile(photoFile) photoImageView.setImageURI(image_uri) and then, I move to next destination using this code (from fragmentA to fragmentB) val toFragmentB = AFragmentDirections.actionGlobalBFragment() findNavController()

is it normal if my image from camera in ImageView disappear after segue to another fragment using navigation component?

非 Y 不嫁゛ 提交于 2021-01-25 01:55:49
问题 I try to capture an image using camera then the image result will be placed on my ImageView in a fragmentA like the code below, so it it NOT fetching an image path from Server then place it in ImageView using Glide Library, I take an image from camera. val image_uri = Uri.fromFile(photoFile) photoImageView.setImageURI(image_uri) and then, I move to next destination using this code (from fragmentA to fragmentB) val toFragmentB = AFragmentDirections.actionGlobalBFragment() findNavController()

is it normal if my image from camera in ImageView disappear after segue to another fragment using navigation component?

空扰寡人 提交于 2021-01-25 01:48:15
问题 I try to capture an image using camera then the image result will be placed on my ImageView in a fragmentA like the code below, so it it NOT fetching an image path from Server then place it in ImageView using Glide Library, I take an image from camera. val image_uri = Uri.fromFile(photoFile) photoImageView.setImageURI(image_uri) and then, I move to next destination using this code (from fragmentA to fragmentB) val toFragmentB = AFragmentDirections.actionGlobalBFragment() findNavController()

is it normal if my image from camera in ImageView disappear after segue to another fragment using navigation component?

拥有回忆 提交于 2021-01-25 01:47:25
问题 I try to capture an image using camera then the image result will be placed on my ImageView in a fragmentA like the code below, so it it NOT fetching an image path from Server then place it in ImageView using Glide Library, I take an image from camera. val image_uri = Uri.fromFile(photoFile) photoImageView.setImageURI(image_uri) and then, I move to next destination using this code (from fragmentA to fragmentB) val toFragmentB = AFragmentDirections.actionGlobalBFragment() findNavController()

is it normal if my image from camera in ImageView disappear after segue to another fragment using navigation component?

若如初见. 提交于 2021-01-25 01:46:46
问题 I try to capture an image using camera then the image result will be placed on my ImageView in a fragmentA like the code below, so it it NOT fetching an image path from Server then place it in ImageView using Glide Library, I take an image from camera. val image_uri = Uri.fromFile(photoFile) photoImageView.setImageURI(image_uri) and then, I move to next destination using this code (from fragmentA to fragmentB) val toFragmentB = AFragmentDirections.actionGlobalBFragment() findNavController()

How to get value from LiveData synchronously?

青春壹個敷衍的年華 提交于 2021-01-21 07:45:06
问题 For LiveData , is there something similar to blockingNext or blockingSingle in RxJava's Observable to get the value synchronously? if not, how can i achieve the same behavior? 回答1: You can call getValue() to return the current value, if there is one. However, there is no "block until there is a value" option. Mostly, that is because LiveData is meant to be consumed on the main application thread, where indefinitely-blocking calls are to be avoided. If you need "block until there is a value",

How to get value from LiveData synchronously?

只谈情不闲聊 提交于 2021-01-21 07:44:07
问题 For LiveData , is there something similar to blockingNext or blockingSingle in RxJava's Observable to get the value synchronously? if not, how can i achieve the same behavior? 回答1: You can call getValue() to return the current value, if there is one. However, there is no "block until there is a value" option. Mostly, that is because LiveData is meant to be consumed on the main application thread, where indefinitely-blocking calls are to be avoided. If you need "block until there is a value",

Failed to resolve: support-fragment error when add google architecture component dependency

假如想象 提交于 2021-01-21 03:59:26
问题 I want to use Google architecture components in my app, but after updating android studio to version 3.1.1 when I add android.arch.lifecycle:extensions:1.1.1 dependency into app.gradle file, it will show Failed to resolve: support-fragment My gradle version is 4.4 This is app gardle: apply plugin: 'com.android.application' android { compileSdkVersion 27 defaultConfig { applicationId "ir.apptori.myapplication" minSdkVersion 17 targetSdkVersion 27 versionCode 1 versionName "1.0"

How to delete/remove PagedListAdapter item

折月煮酒 提交于 2021-01-21 00:10:20
问题 Currently I am using Android Architecture Components for App development everything is working along with paging library Now I want to remove recyclerview Item using PagedListAdapter to populate this we required to add a data source and from data source list is updating using LiveData no I want to remove a item from list notifyItemRemoved() is working from PagedList I am getting this exception: java.lang.UnsupportedOperationException java.util.AbstractList.remove(AbstractList.java:638) 回答1:

How to delete/remove PagedListAdapter item

拈花ヽ惹草 提交于 2021-01-21 00:09:20
问题 Currently I am using Android Architecture Components for App development everything is working along with paging library Now I want to remove recyclerview Item using PagedListAdapter to populate this we required to add a data source and from data source list is updating using LiveData no I want to remove a item from list notifyItemRemoved() is working from PagedList I am getting this exception: java.lang.UnsupportedOperationException java.util.AbstractList.remove(AbstractList.java:638) 回答1: