Skip to content
This repository was archived by the owner on Jul 27, 2019. It is now read-only.

Commit a25cb3f

Browse files
committed
Added click listener to Send to Photoshop button.
1 parent 8f099f0 commit a25cb3f

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

send-to-desktop-api/app/src/main/java/com/adobe/sendtodesktopapi/MainActivity.java

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ private void showAuthenticatedUI() {
9393

9494
Log.i(MainActivity.class.getSimpleName(), "User is logged in!");
9595

96-
View.OnClickListener mOpenGalleryButtonListener = new View.OnClickListener() {
96+
View.OnClickListener openGalleryButtonListener = new View.OnClickListener() {
9797
@Override
9898
public void onClick(View v) {
9999
Intent galleryPickerIntent = new Intent();
@@ -103,7 +103,19 @@ public void onClick(View v) {
103103
startActivityForResult(Intent.createChooser(galleryPickerIntent, "Select an Image"), 203); // Can be any int
104104
}
105105
};
106-
mOpenGalleryButton.setOnClickListener(mOpenGalleryButtonListener);
106+
mOpenGalleryButton.setOnClickListener(openGalleryButtonListener);
107+
108+
View.OnClickListener sendToPhotoshopButtonListener = new View.OnClickListener() {
109+
@Override
110+
public void onClick(View v) {
111+
try {
112+
sendToDesktop();
113+
} catch (IOException e) {
114+
e.printStackTrace();
115+
}
116+
}
117+
};
118+
mSendToPhotoshopButton.setOnClickListener(sendToPhotoshopButtonListener);
107119

108120
}
109121

0 commit comments

Comments
 (0)