android-fragments

how get Result from onActivityResult in Fragment?

爷,独闯天下 提交于 2020-05-25 06:05:16
问题 I have used Navigation drawer in each item click i have called Fragments so in one item i have called one Fragment in this fragment i need to get picture from camera and set it to as canvas background . In this I have captured camera picture but don't know how to get this picture after captured and set it to on canvas background. Fragment code import android.content.ContentValues; import android.content.Context; import android.content.Intent; import android.graphics.Bitmap; import android

how get Result from onActivityResult in Fragment?

a 夏天 提交于 2020-05-25 06:04:11
问题 I have used Navigation drawer in each item click i have called Fragments so in one item i have called one Fragment in this fragment i need to get picture from camera and set it to as canvas background . In this I have captured camera picture but don't know how to get this picture after captured and set it to on canvas background. Fragment code import android.content.ContentValues; import android.content.Context; import android.content.Intent; import android.graphics.Bitmap; import android

how get Result from onActivityResult in Fragment?

本小妞迷上赌 提交于 2020-05-25 06:03:24
问题 I have used Navigation drawer in each item click i have called Fragments so in one item i have called one Fragment in this fragment i need to get picture from camera and set it to as canvas background . In this I have captured camera picture but don't know how to get this picture after captured and set it to on canvas background. Fragment code import android.content.ContentValues; import android.content.Context; import android.content.Intent; import android.graphics.Bitmap; import android

Android Google Places API - PlaceAutocompleteFragment clear button listener

99封情书 提交于 2020-05-25 04:51:05
问题 I am using Google Places API for Android - PlaceAutocompleteFragment API in my project to search locations, when user selects a location then get the records using location lat-long and display it to ListView. Now the problem is whenever user taps on clear button (X) of PlaceAutocompleteFragment I want clear ListView items for which I need to listen to clear button onClick? How to do that? Any help will be appreciated. autocompleteFragment.setOnPlaceSelectedListener(new PlaceSelectionListener

How to make multiple buttons open the same activity?

别等时光非礼了梦想. 提交于 2020-05-24 07:31:13
问题 I am new to Android and Java development and I am wondering how to make the buttons in the dashboard open the same activity but with different data for each fragment . this activity will work the same way for all the buttons the only thing changing is the sortalgorithm.java used 回答1: you can put a flag in your intent when you call startActivity(Intent intent) method. is something like this: //... Intent intent = new Intent(this, DisplayMessageActivity.class); Bundle b = new Bundle(); b

Refresh Fragment data

一世执手 提交于 2020-05-22 09:58:10
问题 I need refresh oncreateview in fragment , for get textview writed in another fragment, when I click on save button, it returns the values ​​of the beginning of the fragment, it does not update them Fragment Save: public class Save extends Fragment implements View.OnClickListener { public Save() { // Required empty public constructor } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View v5 = inflater.inflate(R.layout.fragment_five,

Navigation drawer stuck when offline data loading

痴心易碎 提交于 2020-05-18 20:54:51
问题 I am developing news app user can download video and image. So I developed navigation drawer with different fragment with material design. But I am facing some problem in it when I click gallery (where I show the downloaded video and images) it stuck for some time and then open fragment. it happened only in specific fragment but not all. see Video here. Here is my code: MainActivity.java public class MainActivity extends AppCompatActivity implements FragmentDrawer.FragmentDrawerListener {

Navigation drawer stuck when offline data loading

余生颓废 提交于 2020-05-18 20:54:01
问题 I am developing news app user can download video and image. So I developed navigation drawer with different fragment with material design. But I am facing some problem in it when I click gallery (where I show the downloaded video and images) it stuck for some time and then open fragment. it happened only in specific fragment but not all. see Video here. Here is my code: MainActivity.java public class MainActivity extends AppCompatActivity implements FragmentDrawer.FragmentDrawerListener {

BottomNavView remains hidden onNavigation between Fragments

痞子三分冷 提交于 2020-05-17 07:11:39
问题 Prior to this question, i implemented the HideBottomViewOnScrollBehaviour to the BottomNavVew , and onDestinationChangedListener in each fragment to control the visiblity of the BottomNavView Bug : when i scroll-down and the BottomNavView collapse/hide in FragmentA and i try navigating to the FragmentB , the BottomNavView remains hidden, but if i scroll-up justt for the BNV to re-appear and try switching to the same fragment, the BNV becomes visible, can anyone help with an explanation...?

Why does click Event in Fragment takes back to the last activity without any such instruction given in the setOnClickListener in Android?

江枫思渺然 提交于 2020-05-17 07:05:28
问题 This question is an extension to previous question over here. First Question So the logged in user and chatbuddy names are not returning null any more and data is being inserted in firebase as well. However the setOnClickListener action takes back to previous UsersList.java activity even though no such Intent given in sendImgView.setOnClickListener() function. UserList.java relevant code takes to ChatActivity as you can see and also i finish() it on click- usersList.setOnItemClickListener(new