ui-thread Questions
2
Solved
The Qt doc says,
As mentioned, each program has one thread when it is started. This
thread is called the "main thread" (also known as the "GUI thread" in
Qt applications). The Qt GUI must run ...
Reiterant asked 2/8, 2012 at 7:11
8
I am trying to delay code in Kotlin I have tried
Thread.sleep(1000)
But its freezes the UI.
Does somebody know why this is happening
And how to delay without freezing the UI?
Lh asked 24/1, 2019 at 14:18
13
Solved
I'm trying to use the UI-Thread, so I've written a simple test activity. But I think I've misunderstood something, because on clicking the button - the app does not respond anymore
public class Tes...
4
Solved
I want to schedule an action to change automatically my ViewPager pages.
I've tried:
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
...
swip...
Discursion asked 18/6, 2013 at 11:30
6
Solved
For the sake of argument, consider a UI thread as a thread that has had a call to Application.Run() or one of it's overloads called on it and has an active message loop running.
Is there a way of ...
Smashandgrab asked 19/7, 2009 at 7:15
2
I have gone through the official documentation of react-native and some other medium sources and blogs, I came to know that there is UI Thread and JavaScript Thread in react-native. Javascript thre...
Disyllable asked 9/1, 2020 at 12:31
30
Solved
What does the following exception mean; how can I fix it?
This is the code:
Toast toast = Toast.makeText(mContext, "Something", Toast.LENGTH_SHORT);
This is the exception:
java.lang.RuntimeExc...
Yield asked 6/10, 2010 at 17:18
3
Solved
I'm trying to call an API and when my variables are ready, update UI components respectively.
This is my Network singleton who is launching the coroutine:
object MapNetwork {
fun getRoute(reques...
Claudication asked 31/10, 2018 at 8:34
1
Solved
when I run my instrumentation tests against the debug version of my app, leak canary will block the UI thread and cause the instrumentation test to fail. I had to revert to the old version. Is ther...
Goles asked 12/9, 2019 at 23:51
2
Solved
Consider this example:
async Task Foo()
{
button.Text = "This is the UI context!";
await BarA();
button.Text = "This is still the UI context!";
await BarB();
button.Text = "Oh no!"; // ex...
Tacnode asked 13/2, 2019 at 11:28
2
I have a Bound Service which responsible for downloading files and thus it knows the downloading status/progress. And the UI (Fragment or Activity) has to show/update download progress from the ser...
Exit asked 20/11, 2015 at 21:11
4
Solved
I need to write a wrapper around a third party api that peruses message pumps and hence needs to be handled very differently depending on whether the wrapper is instantiated on a UI thread (such as...
Wellchosen asked 18/12, 2017 at 14:50
3
Solved
Is there a difference between
new Handler.post(Runnable r);
and
activity.runOnUiThread(Runnable r)
3
I have a TextView in my application that works fine until I pause the application (by pressing home) and launch it again. It should just resume the activity, but for some reason the TextView doesn'...
1
Solved
I am working on creating activity that has too many animations, and when starting this activity the logcat shows me this message again and again during the life time of this activity:
I/Choreograp...
Kaylakayle asked 21/4, 2015 at 9:21
0
I got in Android Vital a warning that my UI render time is slow.
As they explained in vital page:
Frozen UI frames:
Percentage of daily sessions during which users
experienced more than 0.1% ...
Chilli asked 23/8, 2017 at 13:15
3
Solved
When you have a button, and do something like:
Private Function Button_OnClick
Button.Enabled = False
[LONG OPERATION]
End Function
Then the button will not be grayed, because the long ope...
Dossier asked 14/11, 2011 at 21:50
2
Solved
public class AddStudentActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_ad...
3
When you need to perform something on the main thread in the completion block of a networking task or an operation, which of these ways to get it would be the most appropriate and why?:
Operation...
Spake asked 23/11, 2016 at 12:7
3
Solved
I'm writing small app and now I discovered a problem.
I need to call one(later maybe two) method (this method loads something and returns the result) without lagging in window of app.
I found clas...
Indiscrimination asked 7/4, 2013 at 19:55
1
Recently, I had to implement infinite scrolling / lazy loading on my PCL ListView. I will leave out most of the code, but the most important part was:
ViewModel
var countries = // get countries
...
Analgesia asked 4/9, 2016 at 19:18
3
Solved
I have been writing AsyncTask's for short background operations in android for quite some time and had a very basic question. If I start an AsyncTask from a separate thread and not the main UI thre...
Niles asked 23/8, 2016 at 12:52
1
It seems that the api replaceCurrentItemWithPlayerItem: will stuck the main thread for some seconds, I understand that replacing the item need the information of the new item which might take some ...
7
Solved
Hi I want to make Toast available to me no-matter-what and available from any thread whenever I like within my application. So to do this I extended the Activity class:
import android.app.Activity...
Purpurin asked 6/12, 2012 at 15:29
4
Solved
I have an app with two activities. From the main activity I start a secondary activity using startActivityForResult(). The secondary activity returns data (in the form of an Intent object) to the m...
1 Next >
© 2022 - 2024 — McMap. All rights reserved.