android - runOnUiThread in Presentation class


How can I update TextView in Presentation class if RunOnUiThread is not available in this class.

Here is my example

private final class DemoPresentation extends Presentation {

    public DemoPresentation(Context context, Display display) {
        super(context, display);

    protected void onCreate(Bundle savedInstanceState) {
        // Be sure to call the super class.

        // Inflate the layout.

    private void TimerMethod()

1 Answer: 

Call post() on the TextView, passing in the same Runnable as you would to runOnUiThread().


More Articles

presentation - Replacing particular text in all sides of a ppt using python-pptx

I am new with python-pptx. But I am familiar with its basic working. I have searched a lot but I could not find a way to change a particular text by another text in all slides. That text may be in any text_frame of a slide. like all slides in a ppt have 'java' keyword, I want to change it by 'python

c# - Retrieving the image name from a powerpoint file

I need to retrieve the image file name from an image in a pptx file. I already got the stream from the image but i didn't got the name of the image file... Here is my code:private static Stream GetParagraphImage(DocumentFormat.OpenXml.Presentation.Picture picture, DocumentFormat.OpenXml.Packagin

output - Let User Re-type The Input Without Interfering With Other Strings (C#)

My input gets checked by "TryParse". And if it is false I want to let the user retype it correctly. But when I click any key after the check it deletes everything above cause of "Console.Clear();". - I want to delete only the input part and nothing above it.namespace Practice{ class Program {

c# - Error when execute storyboard to close a window open in showdialog

I have get back this error when the Storyboard close the window 'This Visual is not connected to a PresentationSource.'my scenario consist in two window and one UserControlthis is window1's xaml code:<Window x:Name="LWindow" x:Class="WpfAppXtesting.WindowTest1" xmlns="

Can't we copy shape(s) from a PPT slide to word document in the orginal format in C#?

I tried to copy autoshape from PPT to word. but its copying as picture format. We cant edit the text or shape in word. How to avoid this?Code I m using not giving expected esult:foreach (Microsoft.Office.Interop.PowerPoint.Shape shape in slide.Shapes){ if (targetDoc != null) { shape.Copy();

r - Include googleVis chart in ioslides RStudio

I have a following chart:library(googleVis)df = data.frame(models = c("PLAT", "LC", "APC", "CBD", "M6", "M7", "M8"), val = 1:7)Column <- gvisColumnChart(df)plot(Column)I would like to place it in ioslides in RStudio.Can anyone instruct me how to do it?

Using Android Presentation class with a Bluetooth mouse

I am attempting to use the Presentation class for Android to display a secondary app on another display which can be navigated with the mouse; however, when I connect a Bluetooth mouse to the phone it only shows the cursor and allows for click inputs on the phone's primary display. Is there a way to

Best iPhone/iOS framework for Presentation Apps

Which framework do you suggest for building an application to manage presentation, like an interactive and multimedia brochure?Do you think the iOS is enough?

android - Expression of time difference

Given a number of seconds/milliseconds, what is the best method to gracefully/cleanly express this time interval in the user's language, using the Android values/strings.xml API?I am not asking for how to get the days/hours/minutes -- answers for that can be found in how to show milliseconds in days

android - How to prevent AlertDialog using custom theme from appearing fullscreen?

I am using a custom style for my AlertDialogs, but it is making them appear fullscreen. I've searched around, but I could only seem to find people wanting to make it fullscreen... Here is my style <style name="MyDialog" parent="AlertDialog.AppCompat"> <item name="android:background">