How to fix slow loading time while loading long text in Textview?Firebase listeners first time invocation takes timeHow do I center text horizontally and vertically in a TextView?Strange out of memory issue while loading an image to a Bitmap objectWhy is the Android emulator so slow? How can we speed up the Android emulator?Auto Scale TextView Text to Fit within BoundsHow do I fix android.os.NetworkOnMainThreadException?How to fix java.lang.UnsupportedClassVersionError: Unsupported major.minor versionGet children using orderByChild-equalsTo in Firebase-AndroidAdding Social Media Share Logic From Firebase in AndroidUpdated global variables does not reflect inside ValueEventListener's onCancelled methodHow to get the data saved in a USER_ID?

Can fluent English speakers distinguish “steel”, “still” and “steal”?

Can I call 112 to check a police officer's identity in the Czech Republic?

Single word for "refusing to move to next activity unless present one is completed."

How do Windows version numbers work?

Shortest distance around a pyramid?

If the railway suggests a 5-min connection window for changing trains in the Netherlands, does that mean it's definitely doable?

What's the maximum time an interrupt service routine can take to execute on atmega328p?

<schwitz>, <zwinker> etc. Does German always use 2nd Person Singular Imperative verbs for emoticons? If so, why?

Extract an attribute value from XML

Is Trump personally blocking people on Twitter?

Is Arc Length always irrational between two rational points?

Cops: The Hidden OEIS Substring

Why are Hobbits so fond of mushrooms?

Is purchasing foreign currency before going abroad a losing proposition?

Why were Er and Onan punished if they were under 20?

Was I subtly told to resign?

Storming Area 51

What explains 9 speed cassettes price differences?

Is there any word for "disobedience to God"?

Simple LED driver, transistor and GPIO

The monorail explodes before I can get on it

Machine learning and operations research projects

How can one write good dialogue in a story without sounding wooden?

Why do people keep referring to Leia as Princess Leia, even after the destruction of Alderaan?



How to fix slow loading time while loading long text in Textview?


Firebase listeners first time invocation takes timeHow do I center text horizontally and vertically in a TextView?Strange out of memory issue while loading an image to a Bitmap objectWhy is the Android emulator so slow? How can we speed up the Android emulator?Auto Scale TextView Text to Fit within BoundsHow do I fix android.os.NetworkOnMainThreadException?How to fix java.lang.UnsupportedClassVersionError: Unsupported major.minor versionGet children using orderByChild-equalsTo in Firebase-AndroidAdding Social Media Share Logic From Firebase in AndroidUpdated global variables does not reflect inside ValueEventListener's onCancelled methodHow to get the data saved in a USER_ID?






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















I have a textview that will load a long text (5.694 characters) from Firebase, and it makes the activity freeze for about 4 seconds until it displays the whole text.



This is my code:



root = FirebaseDatabase.getInstance().getReference();
parent = root.child("mainland");
parent.child("main").child("name").addValueEventListener(new ValueEventListener()
@Override
public void onDataChange(@NonNull DataSnapshot dataSnapshot)
String value = dataSnapshot.getValue(String.class);
name.setText(value);


@Override
public void onCancelled(@NonNull DatabaseError databaseError)


);


is there a way to make the loading time faster, or maybe is there a library just like glide for textview or something?










share|improve this question
























  • Use background thread to do fetch data and after getting data assign text to textview.

    – Faisal
    Mar 26 at 3:44











  • @Faisal, and how to write it? can you share the code?

    – Hentai Sama
    Mar 26 at 4:51











  • [Solved] Someone's from facebook suggest me this github.com/metalurgus/LongTextView and it's work. thanks!

    – Hentai Sama
    Mar 26 at 5:03











  • cool. have a good day

    – Faisal
    Mar 26 at 5:22











  • Check this out.

    – Alex Mamo
    Mar 26 at 10:21

















0















I have a textview that will load a long text (5.694 characters) from Firebase, and it makes the activity freeze for about 4 seconds until it displays the whole text.



This is my code:



root = FirebaseDatabase.getInstance().getReference();
parent = root.child("mainland");
parent.child("main").child("name").addValueEventListener(new ValueEventListener()
@Override
public void onDataChange(@NonNull DataSnapshot dataSnapshot)
String value = dataSnapshot.getValue(String.class);
name.setText(value);


@Override
public void onCancelled(@NonNull DatabaseError databaseError)


);


is there a way to make the loading time faster, or maybe is there a library just like glide for textview or something?










share|improve this question
























  • Use background thread to do fetch data and after getting data assign text to textview.

    – Faisal
    Mar 26 at 3:44











  • @Faisal, and how to write it? can you share the code?

    – Hentai Sama
    Mar 26 at 4:51











  • [Solved] Someone's from facebook suggest me this github.com/metalurgus/LongTextView and it's work. thanks!

    – Hentai Sama
    Mar 26 at 5:03











  • cool. have a good day

    – Faisal
    Mar 26 at 5:22











  • Check this out.

    – Alex Mamo
    Mar 26 at 10:21













0












0








0


1






I have a textview that will load a long text (5.694 characters) from Firebase, and it makes the activity freeze for about 4 seconds until it displays the whole text.



This is my code:



root = FirebaseDatabase.getInstance().getReference();
parent = root.child("mainland");
parent.child("main").child("name").addValueEventListener(new ValueEventListener()
@Override
public void onDataChange(@NonNull DataSnapshot dataSnapshot)
String value = dataSnapshot.getValue(String.class);
name.setText(value);


@Override
public void onCancelled(@NonNull DatabaseError databaseError)


);


is there a way to make the loading time faster, or maybe is there a library just like glide for textview or something?










share|improve this question
















I have a textview that will load a long text (5.694 characters) from Firebase, and it makes the activity freeze for about 4 seconds until it displays the whole text.



This is my code:



root = FirebaseDatabase.getInstance().getReference();
parent = root.child("mainland");
parent.child("main").child("name").addValueEventListener(new ValueEventListener()
@Override
public void onDataChange(@NonNull DataSnapshot dataSnapshot)
String value = dataSnapshot.getValue(String.class);
name.setText(value);


@Override
public void onCancelled(@NonNull DatabaseError databaseError)


);


is there a way to make the loading time faster, or maybe is there a library just like glide for textview or something?







java android firebase






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 26 at 8:34









Zoe

16.3k9 gold badges63 silver badges95 bronze badges




16.3k9 gold badges63 silver badges95 bronze badges










asked Mar 26 at 3:39









Hentai SamaHentai Sama

1




1












  • Use background thread to do fetch data and after getting data assign text to textview.

    – Faisal
    Mar 26 at 3:44











  • @Faisal, and how to write it? can you share the code?

    – Hentai Sama
    Mar 26 at 4:51











  • [Solved] Someone's from facebook suggest me this github.com/metalurgus/LongTextView and it's work. thanks!

    – Hentai Sama
    Mar 26 at 5:03











  • cool. have a good day

    – Faisal
    Mar 26 at 5:22











  • Check this out.

    – Alex Mamo
    Mar 26 at 10:21

















  • Use background thread to do fetch data and after getting data assign text to textview.

    – Faisal
    Mar 26 at 3:44











  • @Faisal, and how to write it? can you share the code?

    – Hentai Sama
    Mar 26 at 4:51











  • [Solved] Someone's from facebook suggest me this github.com/metalurgus/LongTextView and it's work. thanks!

    – Hentai Sama
    Mar 26 at 5:03











  • cool. have a good day

    – Faisal
    Mar 26 at 5:22











  • Check this out.

    – Alex Mamo
    Mar 26 at 10:21
















Use background thread to do fetch data and after getting data assign text to textview.

– Faisal
Mar 26 at 3:44





Use background thread to do fetch data and after getting data assign text to textview.

– Faisal
Mar 26 at 3:44













@Faisal, and how to write it? can you share the code?

– Hentai Sama
Mar 26 at 4:51





@Faisal, and how to write it? can you share the code?

– Hentai Sama
Mar 26 at 4:51













[Solved] Someone's from facebook suggest me this github.com/metalurgus/LongTextView and it's work. thanks!

– Hentai Sama
Mar 26 at 5:03





[Solved] Someone's from facebook suggest me this github.com/metalurgus/LongTextView and it's work. thanks!

– Hentai Sama
Mar 26 at 5:03













cool. have a good day

– Faisal
Mar 26 at 5:22





cool. have a good day

– Faisal
Mar 26 at 5:22













Check this out.

– Alex Mamo
Mar 26 at 10:21





Check this out.

– Alex Mamo
Mar 26 at 10:21












0






active

oldest

votes










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%2f55349517%2fhow-to-fix-slow-loading-time-while-loading-long-text-in-textview%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes




Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.







Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.



















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%2f55349517%2fhow-to-fix-slow-loading-time-while-loading-long-text-in-textview%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

Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현