Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8186681
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T02:17:46+00:00 2026-06-07T02:17:46+00:00

My app uses the ES File Explorer for loading/saving files using the com.estrongs.action.PICK_FILE intent.

  • 0

My app uses the ES File Explorer for loading/saving files using the com.estrongs.action.PICK_FILE intent.
It goes to the browser ok does its’ stuff and returns the result but on returning to the main activity, the main not visible. It is focused. I can use the fling gesture and the keyboard opens when you press an edittext (hidden). The OnActivityResult() is called and also processed fine.
I do not have any code in my onResume, OnStop etc.
I have added the logcat below but as you can see it doesn’t really show anything.

I don’t know if it is worth mentioning but I also use the SherlockActionBar.

Finally this is the funny bit. My activity has a tabhost with basically 2 main views. 1 is a ListView and 1 is a custom view using OnDraw(). If I load a file which has to be displayed on the listview all is ok. If I load a file for the custom view it is hidden.

Please where is my fatal flaw?

the intent is started like this

intent = new Intent("com.estrongs.action.PICK_FILE");
        intent.putExtra("com.estrongs.intent.extra.TITLE", "Open");
        goingtobrowser = true;
        startActivityForResult(intent, REQUEST_CODE_PICK_FILE_OR_DIRECTORY);

and the OnActivityResult() is like this

if (resultCode == RESULT_OK && data != null) {
            // obtain the filename
            if (D)
                Log.e(TAG, "++ Coming back from Browser ++");
            Uri fileUri = data.getData();
            if (fileUri != null) {
                String filePath = fileUri.getPath();
                if (filePath != null) {
                    //do something with the path
                }
            }
        }

    06-21 11:16:15.421: E/BTUI(12000): ++ ON START ++
    06-21 11:16:15.421: D/BTUI(12000): ++ ON RESUME ++
    06-21 11:16:15.571: W/KeyCharacterMap(12000): No keyboard for id -1
    06-21 11:16:15.571: W/KeyCharacterMap(12000): Using default keymap: /system/usr/keychars/qwerty.kcm.bin
    06-21 11:16:15.801: D/dalvikvm(12000): GC_EXTERNAL_ALLOC freed 435K, 41% free 4138K/6983K, external 3976K/4039K, paused 29ms
    06-21 11:16:15.841: D/dalvikvm(12000): GC_EXTERNAL_ALLOC freed 33K, 42% free 4105K/6983K, external 4000K/4885K, paused 27ms
    06-21 11:16:19.121: E/BTUI(12000): ++ Going to Browser ++
    06-21 11:16:19.171: D/BTUI(12000): ++ ON onSaveInstanceState ++
    06-21 11:16:19.171: D/BTUI(12000): ++ ON PAUSE ++
    06-21 11:16:19.611: D/BTUI(12000): ++ ON STOP ++
    06-21 11:16:35.801: D/BTUI(12000): onActivityResult -1
    06-21 11:16:41.351: E/BTUI(12000): ++ Coming back from Browser ++
    06-21 11:16:42.481: E/BTUI(12000): ++ ON START ++
    06-21 11:16:42.481: D/BTUI(12000): ++ ON RESUME ++
    06-21 11:17:07.751: I/System.out(12000):  in onFling() :: 

**EDIT
After looking more on 1st load up the cusotom views’ onDraw() is called so I put a customview.invalidate() in the main activities onResume(). So when returning from the 2nd activity this should be called and the view invalidates and calls onDraw(). It is not!
I guess this is the problem.
Please some ideas??

**EDIT
the only way i could get rid of the black screen was to invalidate the entire main screen with

ViewGroup vg = (ViewGroup) findViewById (R.id.main);
    vg.invalidate();

in onResume().

BUT this is not suitable enough for me because I need to call view .invalidate() or view.postinvalidate() from other threads and this DOES NOT call the customview.onDraw() and the screen stays blank with these calls.
Anyone??

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T02:17:49+00:00Added an answer on June 7, 2026 at 2:17 am

    I thought I would answer my own question and maybe someone can explain it better than me.
    The problem seem to be related to views surface callback on returning from another activity. I only managed to fix it by using a setContentView(). mainViewGroup.invalidate() I mentioned above didn’t work. I then noticed that the view.invalidate() was inadequate for me so I switched it to a surfaceview. This exposed the callback problem.

    If I removed the surfaceholder’s view callback in surfaceDestroyed() it worked ok, the main returned fine. BUT dynamically re-attaching the callback in the onResume() wasn’t working. The surfaceview was not-reattaching. So I STILL have to do a setContentView() to reset things.
    This works but I would like to hear a “cleaner” solution.
    Thanks for looking.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm comparing two examples of WCF. Microsoft's examples http://msdn.microsoft.com/en-us/library/ms734712.aspx uses app.config file, uses generator
An app uses paperclip to handle file uploads for user avatars. Paperclip currently deletes
Our app uses a component that requires a license file in the directory with
My app uses an API from an external JAR file. This JAR file has
I have an app that uses a transition file to flip from page to
I am working on an app that uses a custom file type, I've figured
I want to create an App that uses a potentially large xml file. It
I have a java app that uses log4j. Config: log4j.rootLogger=info, file log4j.appender.file=org.apache.log4j.DailyRollingFileAppender log4j.appender.file.File=${user.home}/logs/app.log log4j.appender.file.layout=org.apache.log4j.PatternLayout
I have a small Rails 3.2.1 app that uses CarrierWave 0.5.8 for file uploads
My .net app uses an MDB file as a database (JET 4.0). From this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.