Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
ramack committed Oct 25, 2018
1 parent f898cef commit d1aec9b
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 16 deletions.
1 change: 1 addition & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 18 additions & 5 deletions app/src/main/java/org/piwigo/io/model/ImageListResponse.java
@@ -1,9 +1,22 @@
package org.piwigo.io.model;

/**
* Created by Jeff on 7/18/2017.
/*
* Piwigo for Android
* Copyright (C) 2017-2018 Piwigo Team http://piwigo.org
* Copyright (C) 2017-2018 Jeff Ayers
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

package org.piwigo.io.model;

import com.google.gson.annotations.SerializedName;

Expand Down
25 changes: 19 additions & 6 deletions app/src/main/java/org/piwigo/io/model/ImageUploadResponse.java
@@ -1,13 +1,26 @@
/*
* Piwigo for Android
* Copyright (C) 2017-2018 Piwigo Team http://piwigo.org
* Copyright (C) 2017-2018 Jeff Ayers
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

package org.piwigo.io.model;

import com.google.gson.annotations.SerializedName;

import java.util.ArrayList;
import java.util.List;

/**
* Created by Jeff on 6/24/2017.
*/

public class ImageUploadResponse {

Expand Down
2 changes: 0 additions & 2 deletions app/src/main/java/org/piwigo/ui/main/AlbumsViewModel.java
Expand Up @@ -103,6 +103,4 @@ private class CategoryViewBinder implements BindingRecyclerViewAdapter.ViewBinde
viewHolder.getBinding().setVariable(BR.viewModel, viewModel);
}
}


}
7 changes: 4 additions & 3 deletions app/src/main/java/org/piwigo/ui/main/MainActivity.java
Expand Up @@ -206,6 +206,8 @@ public void onRequestPermissionsResult(int requestCode,
// permission denied, boo! Disable the
// functionality that depends on this permission.
Toast.makeText(this,"File access denied - go to Settings - Applications - Piwigo to manually give Storage permission",Toast.LENGTH_LONG).show();
//TODO
selectPhoto();
}
return;
}
Expand All @@ -215,16 +217,15 @@ public void onRequestPermissionsResult(int requestCode,
}
}



private void selectPhoto(){
Intent intent = new Intent();
intent.setType("image/*");
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2) {
intent.putExtra(Intent.EXTRA_ALLOW_MULTIPLE, true);
}
intent.setAction(Intent.ACTION_GET_CONTENT);
startActivityForResult(Intent.createChooser(intent,"Select Picture"), SELECT_PICTURES);
startActivityForResult(Intent.createChooser(intent,
getResources().getString(R.string.title_select_image)), SELECT_PICTURES);
}

@Override protected void onActivityResult(int requestCode, int resultCode, Intent data) {
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values/strings.xml
Expand Up @@ -24,6 +24,7 @@
<string name="title_activity_login">Login</string>
<string name="title_activity_accounts">Manage Accounts</string>
<string name="title_activity_about">About</string>
<string name="title_select_image">"Select Image</string>

<!-- Navigation drawer menu items -->
<string name="nav_icon_description">Piwigo logo</string>
Expand Down

0 comments on commit d1aec9b

Please sign in to comment.