Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
yotta
/
pictogram
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
60
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
10ba73be
authored
Feb 21, 2017
by
German Callejas
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Issue #960 arreglado
parent
b6af742c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
13 deletions
android/Pictogram/tabletlibrary/src/main/java/com/yottacode/pictogram/tabletlibrary/gui/communicator/PictogramActivity.java
android/Pictogram/tabletlibrary/src/main/java/com/yottacode/pictogram/tabletlibrary/gui/communicator/cropper/EditPictoActivity.java
android/Pictogram/tabletlibrary/src/main/java/com/yottacode/pictogram/tabletlibrary/gui/communicator/PictogramActivity.java
View file @
10ba73be
...
...
@@ -1114,17 +1114,13 @@ protected void showOnlyTape(boolean onlyTape) {
case
GALLERY_PIC_REQUEST:
//Galeria
if
(
data
!=
null
){
Uri
selectedImage
=
data
.
getData
();
String
[]
filePathColumn
=
{
MediaStore
.
Images
.
Media
.
DATA
};
Cursor
cursor
=
getContentResolver
().
query
(
selectedImage
,
filePathColumn
,
null
,
null
,
null
);
cursor
.
moveToFirst
();
int
columnIndex
=
cursor
.
getColumnIndex
(
filePathColumn
[
0
]);
String
filePath
=
cursor
.
getString
(
columnIndex
);
cursor
.
close
();
imagen
=
BitmapFactory
.
decodeFile
(
filePath
);
this
.
launchEditPictoActivity
(
imagen
);
Bitmap
bitmap
=
null
;
try
{
bitmap
=
MediaStore
.
Images
.
Media
.
getBitmap
(
this
.
getContentResolver
(),
selectedImage
);
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
this
.
launchEditPictoActivity
(
bitmap
);
}
break
;
case
EditPictoActivity
.
EDIT_PICTO_REQUEST
:
...
...
@@ -1179,6 +1175,7 @@ protected void showOnlyTape(boolean onlyTape) {
* @param image
*/
public
void
launchEditPictoActivity
(
Bitmap
image
){
Intent
intent
=
new
Intent
(
this
,
EditPictoActivity
.
class
);
if
(
image
!=
null
)
{
...
...
@@ -1199,7 +1196,6 @@ protected void showOnlyTape(boolean onlyTape) {
intent
.
putExtra
(
EditPictoActivity
.
IMAGE_PICTO
,
byteArray
);
intent
.
putExtra
(
Picto
.
JSON_ATTTRS
.
EXPRESSION
,
getIntent
().
getStringExtra
(
Picto
.
JSON_ATTTRS
.
EXPRESSION
));
startActivityForResult
(
intent
,
EditPictoActivity
.
EDIT_PICTO_REQUEST
);
}
...
...
android/Pictogram/tabletlibrary/src/main/java/com/yottacode/pictogram/tabletlibrary/gui/communicator/cropper/EditPictoActivity.java
View file @
10ba73be
...
...
@@ -44,7 +44,7 @@ public class EditPictoActivity extends Activity {
super
.
onCreate
(
savedInstanceState
);
requestWindowFeature
(
Window
.
FEATURE_NO_TITLE
);
setContentView
(
R
.
layout
.
edit_picto_layout
);
DisplayMetrics
metrics
=
new
DisplayMetrics
();
getWindowManager
().
getDefaultDisplay
().
getMetrics
(
metrics
);
LinearLayout
ll
=
(
LinearLayout
)
findViewById
(
R
.
id
.
image_layout
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment