mirror of
https://github.com/xdsopl/robot36.git
synced 2026-01-09 17:50:21 +01:00
show the filename in a toast after saving the image
This commit is contained in:
parent
09581214d6
commit
a92663be5e
|
|
@ -32,11 +32,13 @@ import android.os.Bundle;
|
|||
import android.os.Environment;
|
||||
import android.provider.MediaStore;
|
||||
import android.support.v4.app.NotificationCompat;
|
||||
import android.view.Gravity;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.ShareActionProvider;
|
||||
import android.widget.Toast;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
|
|
@ -114,6 +116,9 @@ public class MainActivity extends Activity {
|
|||
intent.putExtra(Intent.EXTRA_STREAM, uri);
|
||||
intent.setType("image/png");
|
||||
share.setShareIntent(intent);
|
||||
Toast toast = Toast.makeText(getApplicationContext(), file.getName(), Toast.LENGTH_SHORT);
|
||||
toast.setGravity(Gravity.CENTER_HORIZONTAL | Gravity.CENTER_VERTICAL, 0, 0);
|
||||
toast.show();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue