Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Falcon misses DialogFragments and AlertDialogs #11

Closed
arkus7 opened this issue Jul 20, 2016 · 4 comments
Closed

Falcon misses DialogFragments and AlertDialogs #11

arkus7 opened this issue Jul 20, 2016 · 4 comments
Labels
Milestone

Comments

@arkus7
Copy link

arkus7 commented Jul 20, 2016

I'm trying to use Falcon in my app, but it seems to don't save the view of DialogFragments and AlertDialogs. It seems strange, but my app looks nearly same as your sample.

public class MyActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
        setSupportActionBar(toolbar);

        Toast.makeText(this, "Asd", Toast.LENGTH_LONG).show();
        Snackbar.make(findViewById(android.R.id.content), "snackbar", Snackbar.LENGTH_LONG);
        AlertDialog.Builder builder = new AlertDialog.Builder(this);
        builder.setTitle("Falcon");
        builder.setMessage("Click button below to take screenshot with dialog");
        builder.setPositiveButton("Screenshot", new DialogInterface.OnClickListener() {
            @Override
            public void onClick(DialogInterface dialog, int which) {
                try {
                    Falcon.takeScreenshot(this, File.createTempFile("asd", "asd"));
                } catch(IOException e) {
                    e.printStackTrace();
                }
            }
        });
        builder.show();

        // new DialogFragment().show(getSupportFragmentManager(), "DIALOG");
    }

Screenshot has view of activity, with Toast and Snackbar, but the dialog is missing. Same for DialogFragment (commented out).

@jraska
Copy link
Owner

jraska commented Jul 25, 2016

Hi, that seems strange, capturing dialogs works and it is the main feature of Falcon. Is my sample working with your device?

@arkus7
Copy link
Author

arkus7 commented Jul 26, 2016

Yes, sample is working, but when I copied code from your sample to my app
it wasn't working.

On Jul 25, 2016 02:43, "jraska" [email protected] wrote:

Hi, that seems strange, capturing dialogs work and it is the main feature
of Falcon. Is my sample working with your device?


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#11 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AI5JRQEBnZBG85ZcrzXgKaKNYkpyZxoVks5qZAaWgaJpZM4JQ2b1
.

@jraska
Copy link
Owner

jraska commented Jul 26, 2016

Ok so I finally found the problem. When the dialog is shown directly in onCreate method of Activity it is missed in screenshot, because it is overdrawn by activity layout, which is added to global layout manager after the dialog in this case. I will have a look if it is possible to fix it somehow.

Thank you for reporting it.

@jraska jraska added the bug label Jul 26, 2016
@jraska jraska added this to the 1.0.3 milestone Jul 26, 2016
@jraska jraska closed this as completed in c148903 Jul 27, 2016
@jraska
Copy link
Owner

jraska commented Jul 28, 2016

Fix was released now, please give a try version 1.0.3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants