Android adapter is loading before fetching details from database












0















// here is my java code
private void loadData() {
try {
FirebaseFirestore db = FirebaseFirestore.getInstance();
db.collection("stylists").get()
.addOnCompleteListener(new OnCompleteListener<QuerySnapshot>() {
@Override
public void onComplete(@NonNull Task<QuerySnapshot> task) {
if (task.isSuccessful()) {
try {
for(DocumentSnapshot documentSnapshot:task.getResult()){
String stylistid=documentSnapshot.getId();
String firstName=documentSnapshot.getString("firstName");
String lastName=documentSnapshot.getString("lastName");
String imageUrl=documentSnapshot.getString("imageUrl");
serviceArray=(ArrayList<String>)documentSnapshot.get("services");
stylistCollection=new StylistCollection(stylistid,firstName,lastName,imageUrl,serviceArray);
stylistDetailsList.add(stylistCollection);
}
downloadImageUrl();
}catch (Exception e){
e.printStackTrace();
}
sharedPreferences.edit().clear().apply();
} else {
Log.d(TAG, "Error getting documents: ", task.getException());
}
}
}).addOnSuccessListener(new OnSuccessListener<QuerySnapshot>() {
@Override
public void onSuccess(QuerySnapshot queryDocumentSnapshots) {
setAdapter();

}
});
}catch (Exception e){
e.printStackTrace();
}

}

private void downloadImageUrl() {
try{
for (int i=0;i<stylistDetailsList.size();i++){
position=i;
FirebaseStorage firebaseStorage = FirebaseStorage.getInstance();
StorageReference storageReference= firebaseStorage.getReference();
storageReference.child(stylistDetailsList.get(i).getImageUrl()).getDownloadUrl().addOnSuccessListener(new OnSuccessListener<Uri>() {
@Override
public void onSuccess(Uri uri) {
Log.e("imageurl", "uri: " + uri.toString());
String strUrl=uri.toString();
stylistDetailsList.get(position).setImageUrl(strUrl);
}
});
}

}catch (Exception e){
e.printStackTrace();
}

}

public void setAdapter(){
StylistAdapter listAdapter = new StylistAdapter(documentId,stylistDetailsList);
RecyclerView.ItemDecoration dividerItemDecoration = new DividerItemDecorator(ContextCompat.getDrawable(getContext(), R.drawable.divider));
recyclerView.addItemDecoration(dividerItemDecoration);
recyclerView.setAdapter(listAdapter);
RecyclerView.LayoutManager layoutManager = new LinearLayoutManager(getActivity());
recyclerView.setLayoutManager(layoutManager);
listAdapter.notifyDataSetChanged();

}


I am fetching data from firestore database and i am having one property called imageurl where the folder name for the image is stored now i want to download url of the particular image by using the folder name from firebase storage.After downloading imageurl i want to populate all data's in recyclerview.Here the issue is before fetching data the adapter is executing i want to execute the adapter after fetching all details.










share|improve this question

























  • Are you sure you are using setAdapter only in onPostExecte?

    – Rohit5k2
    Nov 22 '18 at 11:00











  • yes i am using only in postExecute

    – Deepa Dinesh
    Nov 22 '18 at 11:04











  • I am sure you don't need an AsyncTask to achieve this: addOnCompleteListener and addOnSuccessListener tells me that they run asynchronously already.

    – Aaron
    Nov 22 '18 at 11:22











  • i tried setting adapter in onSuccesListener but adapter is executing before fetching details

    – Deepa Dinesh
    Nov 22 '18 at 11:39











  • please check my updated code

    – Deepa Dinesh
    Nov 22 '18 at 11:45
















0















// here is my java code
private void loadData() {
try {
FirebaseFirestore db = FirebaseFirestore.getInstance();
db.collection("stylists").get()
.addOnCompleteListener(new OnCompleteListener<QuerySnapshot>() {
@Override
public void onComplete(@NonNull Task<QuerySnapshot> task) {
if (task.isSuccessful()) {
try {
for(DocumentSnapshot documentSnapshot:task.getResult()){
String stylistid=documentSnapshot.getId();
String firstName=documentSnapshot.getString("firstName");
String lastName=documentSnapshot.getString("lastName");
String imageUrl=documentSnapshot.getString("imageUrl");
serviceArray=(ArrayList<String>)documentSnapshot.get("services");
stylistCollection=new StylistCollection(stylistid,firstName,lastName,imageUrl,serviceArray);
stylistDetailsList.add(stylistCollection);
}
downloadImageUrl();
}catch (Exception e){
e.printStackTrace();
}
sharedPreferences.edit().clear().apply();
} else {
Log.d(TAG, "Error getting documents: ", task.getException());
}
}
}).addOnSuccessListener(new OnSuccessListener<QuerySnapshot>() {
@Override
public void onSuccess(QuerySnapshot queryDocumentSnapshots) {
setAdapter();

}
});
}catch (Exception e){
e.printStackTrace();
}

}

private void downloadImageUrl() {
try{
for (int i=0;i<stylistDetailsList.size();i++){
position=i;
FirebaseStorage firebaseStorage = FirebaseStorage.getInstance();
StorageReference storageReference= firebaseStorage.getReference();
storageReference.child(stylistDetailsList.get(i).getImageUrl()).getDownloadUrl().addOnSuccessListener(new OnSuccessListener<Uri>() {
@Override
public void onSuccess(Uri uri) {
Log.e("imageurl", "uri: " + uri.toString());
String strUrl=uri.toString();
stylistDetailsList.get(position).setImageUrl(strUrl);
}
});
}

}catch (Exception e){
e.printStackTrace();
}

}

public void setAdapter(){
StylistAdapter listAdapter = new StylistAdapter(documentId,stylistDetailsList);
RecyclerView.ItemDecoration dividerItemDecoration = new DividerItemDecorator(ContextCompat.getDrawable(getContext(), R.drawable.divider));
recyclerView.addItemDecoration(dividerItemDecoration);
recyclerView.setAdapter(listAdapter);
RecyclerView.LayoutManager layoutManager = new LinearLayoutManager(getActivity());
recyclerView.setLayoutManager(layoutManager);
listAdapter.notifyDataSetChanged();

}


I am fetching data from firestore database and i am having one property called imageurl where the folder name for the image is stored now i want to download url of the particular image by using the folder name from firebase storage.After downloading imageurl i want to populate all data's in recyclerview.Here the issue is before fetching data the adapter is executing i want to execute the adapter after fetching all details.










share|improve this question

























  • Are you sure you are using setAdapter only in onPostExecte?

    – Rohit5k2
    Nov 22 '18 at 11:00











  • yes i am using only in postExecute

    – Deepa Dinesh
    Nov 22 '18 at 11:04











  • I am sure you don't need an AsyncTask to achieve this: addOnCompleteListener and addOnSuccessListener tells me that they run asynchronously already.

    – Aaron
    Nov 22 '18 at 11:22











  • i tried setting adapter in onSuccesListener but adapter is executing before fetching details

    – Deepa Dinesh
    Nov 22 '18 at 11:39











  • please check my updated code

    – Deepa Dinesh
    Nov 22 '18 at 11:45














0












0








0








// here is my java code
private void loadData() {
try {
FirebaseFirestore db = FirebaseFirestore.getInstance();
db.collection("stylists").get()
.addOnCompleteListener(new OnCompleteListener<QuerySnapshot>() {
@Override
public void onComplete(@NonNull Task<QuerySnapshot> task) {
if (task.isSuccessful()) {
try {
for(DocumentSnapshot documentSnapshot:task.getResult()){
String stylistid=documentSnapshot.getId();
String firstName=documentSnapshot.getString("firstName");
String lastName=documentSnapshot.getString("lastName");
String imageUrl=documentSnapshot.getString("imageUrl");
serviceArray=(ArrayList<String>)documentSnapshot.get("services");
stylistCollection=new StylistCollection(stylistid,firstName,lastName,imageUrl,serviceArray);
stylistDetailsList.add(stylistCollection);
}
downloadImageUrl();
}catch (Exception e){
e.printStackTrace();
}
sharedPreferences.edit().clear().apply();
} else {
Log.d(TAG, "Error getting documents: ", task.getException());
}
}
}).addOnSuccessListener(new OnSuccessListener<QuerySnapshot>() {
@Override
public void onSuccess(QuerySnapshot queryDocumentSnapshots) {
setAdapter();

}
});
}catch (Exception e){
e.printStackTrace();
}

}

private void downloadImageUrl() {
try{
for (int i=0;i<stylistDetailsList.size();i++){
position=i;
FirebaseStorage firebaseStorage = FirebaseStorage.getInstance();
StorageReference storageReference= firebaseStorage.getReference();
storageReference.child(stylistDetailsList.get(i).getImageUrl()).getDownloadUrl().addOnSuccessListener(new OnSuccessListener<Uri>() {
@Override
public void onSuccess(Uri uri) {
Log.e("imageurl", "uri: " + uri.toString());
String strUrl=uri.toString();
stylistDetailsList.get(position).setImageUrl(strUrl);
}
});
}

}catch (Exception e){
e.printStackTrace();
}

}

public void setAdapter(){
StylistAdapter listAdapter = new StylistAdapter(documentId,stylistDetailsList);
RecyclerView.ItemDecoration dividerItemDecoration = new DividerItemDecorator(ContextCompat.getDrawable(getContext(), R.drawable.divider));
recyclerView.addItemDecoration(dividerItemDecoration);
recyclerView.setAdapter(listAdapter);
RecyclerView.LayoutManager layoutManager = new LinearLayoutManager(getActivity());
recyclerView.setLayoutManager(layoutManager);
listAdapter.notifyDataSetChanged();

}


I am fetching data from firestore database and i am having one property called imageurl where the folder name for the image is stored now i want to download url of the particular image by using the folder name from firebase storage.After downloading imageurl i want to populate all data's in recyclerview.Here the issue is before fetching data the adapter is executing i want to execute the adapter after fetching all details.










share|improve this question
















// here is my java code
private void loadData() {
try {
FirebaseFirestore db = FirebaseFirestore.getInstance();
db.collection("stylists").get()
.addOnCompleteListener(new OnCompleteListener<QuerySnapshot>() {
@Override
public void onComplete(@NonNull Task<QuerySnapshot> task) {
if (task.isSuccessful()) {
try {
for(DocumentSnapshot documentSnapshot:task.getResult()){
String stylistid=documentSnapshot.getId();
String firstName=documentSnapshot.getString("firstName");
String lastName=documentSnapshot.getString("lastName");
String imageUrl=documentSnapshot.getString("imageUrl");
serviceArray=(ArrayList<String>)documentSnapshot.get("services");
stylistCollection=new StylistCollection(stylistid,firstName,lastName,imageUrl,serviceArray);
stylistDetailsList.add(stylistCollection);
}
downloadImageUrl();
}catch (Exception e){
e.printStackTrace();
}
sharedPreferences.edit().clear().apply();
} else {
Log.d(TAG, "Error getting documents: ", task.getException());
}
}
}).addOnSuccessListener(new OnSuccessListener<QuerySnapshot>() {
@Override
public void onSuccess(QuerySnapshot queryDocumentSnapshots) {
setAdapter();

}
});
}catch (Exception e){
e.printStackTrace();
}

}

private void downloadImageUrl() {
try{
for (int i=0;i<stylistDetailsList.size();i++){
position=i;
FirebaseStorage firebaseStorage = FirebaseStorage.getInstance();
StorageReference storageReference= firebaseStorage.getReference();
storageReference.child(stylistDetailsList.get(i).getImageUrl()).getDownloadUrl().addOnSuccessListener(new OnSuccessListener<Uri>() {
@Override
public void onSuccess(Uri uri) {
Log.e("imageurl", "uri: " + uri.toString());
String strUrl=uri.toString();
stylistDetailsList.get(position).setImageUrl(strUrl);
}
});
}

}catch (Exception e){
e.printStackTrace();
}

}

public void setAdapter(){
StylistAdapter listAdapter = new StylistAdapter(documentId,stylistDetailsList);
RecyclerView.ItemDecoration dividerItemDecoration = new DividerItemDecorator(ContextCompat.getDrawable(getContext(), R.drawable.divider));
recyclerView.addItemDecoration(dividerItemDecoration);
recyclerView.setAdapter(listAdapter);
RecyclerView.LayoutManager layoutManager = new LinearLayoutManager(getActivity());
recyclerView.setLayoutManager(layoutManager);
listAdapter.notifyDataSetChanged();

}


I am fetching data from firestore database and i am having one property called imageurl where the folder name for the image is stored now i want to download url of the particular image by using the folder name from firebase storage.After downloading imageurl i want to populate all data's in recyclerview.Here the issue is before fetching data the adapter is executing i want to execute the adapter after fetching all details.







java android






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 22 '18 at 11:45







Deepa Dinesh

















asked Nov 22 '18 at 10:50









Deepa DineshDeepa Dinesh

418




418













  • Are you sure you are using setAdapter only in onPostExecte?

    – Rohit5k2
    Nov 22 '18 at 11:00











  • yes i am using only in postExecute

    – Deepa Dinesh
    Nov 22 '18 at 11:04











  • I am sure you don't need an AsyncTask to achieve this: addOnCompleteListener and addOnSuccessListener tells me that they run asynchronously already.

    – Aaron
    Nov 22 '18 at 11:22











  • i tried setting adapter in onSuccesListener but adapter is executing before fetching details

    – Deepa Dinesh
    Nov 22 '18 at 11:39











  • please check my updated code

    – Deepa Dinesh
    Nov 22 '18 at 11:45



















  • Are you sure you are using setAdapter only in onPostExecte?

    – Rohit5k2
    Nov 22 '18 at 11:00











  • yes i am using only in postExecute

    – Deepa Dinesh
    Nov 22 '18 at 11:04











  • I am sure you don't need an AsyncTask to achieve this: addOnCompleteListener and addOnSuccessListener tells me that they run asynchronously already.

    – Aaron
    Nov 22 '18 at 11:22











  • i tried setting adapter in onSuccesListener but adapter is executing before fetching details

    – Deepa Dinesh
    Nov 22 '18 at 11:39











  • please check my updated code

    – Deepa Dinesh
    Nov 22 '18 at 11:45

















Are you sure you are using setAdapter only in onPostExecte?

– Rohit5k2
Nov 22 '18 at 11:00





Are you sure you are using setAdapter only in onPostExecte?

– Rohit5k2
Nov 22 '18 at 11:00













yes i am using only in postExecute

– Deepa Dinesh
Nov 22 '18 at 11:04





yes i am using only in postExecute

– Deepa Dinesh
Nov 22 '18 at 11:04













I am sure you don't need an AsyncTask to achieve this: addOnCompleteListener and addOnSuccessListener tells me that they run asynchronously already.

– Aaron
Nov 22 '18 at 11:22





I am sure you don't need an AsyncTask to achieve this: addOnCompleteListener and addOnSuccessListener tells me that they run asynchronously already.

– Aaron
Nov 22 '18 at 11:22













i tried setting adapter in onSuccesListener but adapter is executing before fetching details

– Deepa Dinesh
Nov 22 '18 at 11:39





i tried setting adapter in onSuccesListener but adapter is executing before fetching details

– Deepa Dinesh
Nov 22 '18 at 11:39













please check my updated code

– Deepa Dinesh
Nov 22 '18 at 11:45





please check my updated code

– Deepa Dinesh
Nov 22 '18 at 11:45












1 Answer
1






active

oldest

votes


















0














why don't you try this



if(Yourasyctask.isFinshing){
set your recycler view code here also
}


Note-: set your layout manager before setting adapter

like this



  RecyclerView rv_following_me = (RecyclerView) view.findViewById(R.id.rv_following);
LinearLayoutManager linearLayoutManager = new LinearLayoutManager(getActivity());
rv_following_me.setLayoutManager(linearLayoutManager);

followingAdapter = new FollowingAdapter(getActivity(), alMeModel);
rv_following_me.setAdapter(followingAdapter);


Thanks






share|improve this answer
























  • can you please tell me where i have to give if condition

    – Deepa Dinesh
    Nov 22 '18 at 11:11











  • after your async task

    – Jigar Fumakiya
    Nov 22 '18 at 11:18











  • I am calling my asyctask in oncreate also i gave my recyclerview adapter in onPostExecute. now if i give recyclerview code in if condition then what should i mention in onPostExecute

    – Deepa Dinesh
    Nov 22 '18 at 11:24











  • nothing.. that doesn't matter you're attaching your adapter after fetching data. make sure you attaching adapter after you fetch data use debug

    – Jigar Fumakiya
    Nov 22 '18 at 11:48











  • please check my updated code above

    – Deepa Dinesh
    Nov 22 '18 at 11:49











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53429287%2fandroid-adapter-is-loading-before-fetching-details-from-database%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














why don't you try this



if(Yourasyctask.isFinshing){
set your recycler view code here also
}


Note-: set your layout manager before setting adapter

like this



  RecyclerView rv_following_me = (RecyclerView) view.findViewById(R.id.rv_following);
LinearLayoutManager linearLayoutManager = new LinearLayoutManager(getActivity());
rv_following_me.setLayoutManager(linearLayoutManager);

followingAdapter = new FollowingAdapter(getActivity(), alMeModel);
rv_following_me.setAdapter(followingAdapter);


Thanks






share|improve this answer
























  • can you please tell me where i have to give if condition

    – Deepa Dinesh
    Nov 22 '18 at 11:11











  • after your async task

    – Jigar Fumakiya
    Nov 22 '18 at 11:18











  • I am calling my asyctask in oncreate also i gave my recyclerview adapter in onPostExecute. now if i give recyclerview code in if condition then what should i mention in onPostExecute

    – Deepa Dinesh
    Nov 22 '18 at 11:24











  • nothing.. that doesn't matter you're attaching your adapter after fetching data. make sure you attaching adapter after you fetch data use debug

    – Jigar Fumakiya
    Nov 22 '18 at 11:48











  • please check my updated code above

    – Deepa Dinesh
    Nov 22 '18 at 11:49
















0














why don't you try this



if(Yourasyctask.isFinshing){
set your recycler view code here also
}


Note-: set your layout manager before setting adapter

like this



  RecyclerView rv_following_me = (RecyclerView) view.findViewById(R.id.rv_following);
LinearLayoutManager linearLayoutManager = new LinearLayoutManager(getActivity());
rv_following_me.setLayoutManager(linearLayoutManager);

followingAdapter = new FollowingAdapter(getActivity(), alMeModel);
rv_following_me.setAdapter(followingAdapter);


Thanks






share|improve this answer
























  • can you please tell me where i have to give if condition

    – Deepa Dinesh
    Nov 22 '18 at 11:11











  • after your async task

    – Jigar Fumakiya
    Nov 22 '18 at 11:18











  • I am calling my asyctask in oncreate also i gave my recyclerview adapter in onPostExecute. now if i give recyclerview code in if condition then what should i mention in onPostExecute

    – Deepa Dinesh
    Nov 22 '18 at 11:24











  • nothing.. that doesn't matter you're attaching your adapter after fetching data. make sure you attaching adapter after you fetch data use debug

    – Jigar Fumakiya
    Nov 22 '18 at 11:48











  • please check my updated code above

    – Deepa Dinesh
    Nov 22 '18 at 11:49














0












0








0







why don't you try this



if(Yourasyctask.isFinshing){
set your recycler view code here also
}


Note-: set your layout manager before setting adapter

like this



  RecyclerView rv_following_me = (RecyclerView) view.findViewById(R.id.rv_following);
LinearLayoutManager linearLayoutManager = new LinearLayoutManager(getActivity());
rv_following_me.setLayoutManager(linearLayoutManager);

followingAdapter = new FollowingAdapter(getActivity(), alMeModel);
rv_following_me.setAdapter(followingAdapter);


Thanks






share|improve this answer













why don't you try this



if(Yourasyctask.isFinshing){
set your recycler view code here also
}


Note-: set your layout manager before setting adapter

like this



  RecyclerView rv_following_me = (RecyclerView) view.findViewById(R.id.rv_following);
LinearLayoutManager linearLayoutManager = new LinearLayoutManager(getActivity());
rv_following_me.setLayoutManager(linearLayoutManager);

followingAdapter = new FollowingAdapter(getActivity(), alMeModel);
rv_following_me.setAdapter(followingAdapter);


Thanks







share|improve this answer












share|improve this answer



share|improve this answer










answered Nov 22 '18 at 11:08









Jigar FumakiyaJigar Fumakiya

3421212




3421212













  • can you please tell me where i have to give if condition

    – Deepa Dinesh
    Nov 22 '18 at 11:11











  • after your async task

    – Jigar Fumakiya
    Nov 22 '18 at 11:18











  • I am calling my asyctask in oncreate also i gave my recyclerview adapter in onPostExecute. now if i give recyclerview code in if condition then what should i mention in onPostExecute

    – Deepa Dinesh
    Nov 22 '18 at 11:24











  • nothing.. that doesn't matter you're attaching your adapter after fetching data. make sure you attaching adapter after you fetch data use debug

    – Jigar Fumakiya
    Nov 22 '18 at 11:48











  • please check my updated code above

    – Deepa Dinesh
    Nov 22 '18 at 11:49



















  • can you please tell me where i have to give if condition

    – Deepa Dinesh
    Nov 22 '18 at 11:11











  • after your async task

    – Jigar Fumakiya
    Nov 22 '18 at 11:18











  • I am calling my asyctask in oncreate also i gave my recyclerview adapter in onPostExecute. now if i give recyclerview code in if condition then what should i mention in onPostExecute

    – Deepa Dinesh
    Nov 22 '18 at 11:24











  • nothing.. that doesn't matter you're attaching your adapter after fetching data. make sure you attaching adapter after you fetch data use debug

    – Jigar Fumakiya
    Nov 22 '18 at 11:48











  • please check my updated code above

    – Deepa Dinesh
    Nov 22 '18 at 11:49

















can you please tell me where i have to give if condition

– Deepa Dinesh
Nov 22 '18 at 11:11





can you please tell me where i have to give if condition

– Deepa Dinesh
Nov 22 '18 at 11:11













after your async task

– Jigar Fumakiya
Nov 22 '18 at 11:18





after your async task

– Jigar Fumakiya
Nov 22 '18 at 11:18













I am calling my asyctask in oncreate also i gave my recyclerview adapter in onPostExecute. now if i give recyclerview code in if condition then what should i mention in onPostExecute

– Deepa Dinesh
Nov 22 '18 at 11:24





I am calling my asyctask in oncreate also i gave my recyclerview adapter in onPostExecute. now if i give recyclerview code in if condition then what should i mention in onPostExecute

– Deepa Dinesh
Nov 22 '18 at 11:24













nothing.. that doesn't matter you're attaching your adapter after fetching data. make sure you attaching adapter after you fetch data use debug

– Jigar Fumakiya
Nov 22 '18 at 11:48





nothing.. that doesn't matter you're attaching your adapter after fetching data. make sure you attaching adapter after you fetch data use debug

– Jigar Fumakiya
Nov 22 '18 at 11:48













please check my updated code above

– Deepa Dinesh
Nov 22 '18 at 11:49





please check my updated code above

– Deepa Dinesh
Nov 22 '18 at 11:49




















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53429287%2fandroid-adapter-is-loading-before-fetching-details-from-database%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

android studio warns about leanback feature tag usage required on manifest while using Unity exported app?

SQL update select statement

'app-layout' is not a known element: how to share Component with different Modules