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
938efbbd
authored
Feb 15, 2017
by
Sebastián Collado Montañez
Browse files
Options
_('Browse Files')
Download
Plain Diff
Merge branch 'develop' of
http://scm.ujaen.es/softuno/pictogram
into develop
parents
e1dcf372
5856a859
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
9 additions
and
51 deletions
android/Pictogram/tabletlibrary/src/main/java/com/yottacode/pictogram/tabletlibrary/gui/communicator/PictoMenu.java
android/Pictogram/tabletlibrary/src/main/java/com/yottacode/pictogram/tabletlibrary/gui/communicator/PictogramActivity.java
android/Pictogram/tabletlibrary/src/main/res/drawable-hdpi/camera.png
android/Pictogram/tabletlibrary/src/main/res/drawable-hdpi/edit_picture.png
android/Pictogram/tabletlibrary/src/main/res/drawable-hdpi/gallery.png
android/Pictogram/tabletlibrary/src/main/java/com/yottacode/pictogram/tabletlibrary/gui/communicator/PictoMenu.java
View file @
938efbbd
...
...
@@ -45,7 +45,7 @@ public class PictoMenu {
* @param col
* @param expression
*/
public
void
createMenuForNewPicto
(
final
int
row
,
final
int
col
,
final
int
cat
,
final
String
expression
,
boolean
is_picto_big
)
{
public
void
createMenuForNewPicto
(
final
int
row
,
final
int
col
,
final
int
cat
,
final
String
expression
)
{
ll
=
new
RelativeLayout
(
PCBcontext
.
getContext
());
RelativeLayout
.
LayoutParams
params
=
new
RelativeLayout
.
LayoutParams
(
RelativeLayout
.
LayoutParams
.
MATCH_PARENT
,
...
...
@@ -58,58 +58,20 @@ public class PictoMenu {
int
centerX
=
activity
.
getResources
().
getDisplayMetrics
().
widthPixels
/
2
;
int
centerY
=
activity
.
getResources
().
getDisplayMetrics
().
heightPixels
/
2
;
if
(!
is_picto_big
){
centerY
+=
100
;
detail
.
setMaxWidth
(
90
);
}
else
{
centerY
+=
135
;
detail
.
setMaxWidth
(
115
);
}
PieMenu
=
new
RadialMenuWidget
(
PCBcontext
.
getContext
());
PieMenu
.
setAnimationSpeed
(
0L
);
PieMenu
.
setCenterLocation
(
centerX
-
(
PieMenu
.
getcRadius
()*
2
)
-
50
,
centerY
-
(
PieMenu
.
getcRadius
()*
2
));
PieMenu
.
setCenterLocation
(
centerX
,
centerY
+
(
PieMenu
.
getcRadius
()*
2
));
PieMenu
.
setIconSize
(
20
,
35
);
//Tamaño del icono
Picto
picto
=
null
;
PieMenu
.
setCenterCircle
(
new
Close
());
PieMenu
.
addMenuEntry
(
new
newPickFromCamera
(
row
,
col
,
cat
,
expression
));
PieMenu
.
addMenuEntry
(
new
newPickFromGallery
(
row
,
col
,
cat
,
expression
));
ll
.
addView
(
PieMenu
);
detail
.
setImageResource
(
R
.
color
.
black
);
detail
.
setMaxWidth
(
96
);
detail
.
setMaxHeight
(
96
);
detail
.
setX
(
centerX
+
10
);
detail
.
setY
(
centerY
-
96
);
ll
.
addView
(
detail
);
/*final String[] items = new String[]{activity.getString(R.string.dialogCamera), activity.getString(R.string.dialogGallery)};
ArrayAdapter<String> adapter = new ArrayAdapter<>(activity, android.R.layout.select_dialog_item, items);
AlertDialog.Builder builder = new AlertDialog.Builder(activity);
builder.setTitle(activity.getString(R.string.dialogTitle));
builder.setAdapter(adapter, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int item) {
addPicto(row,col,cat,expression,item);
}
});
builder.setNegativeButton(activity.getString(R.string.dialogCancel), new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
// if this button is clicked, just close
// the dialog box and do nothing
dialog.cancel();
}
});
final AlertDialog dialog = builder.create();
dialog.show();*/
}
...
...
@@ -138,10 +100,6 @@ public class PictoMenu {
}
/**Function for build a radial menu
*
* @param is_picto_big
...
...
@@ -222,7 +180,7 @@ public class PictoMenu {
}
public
String
getName
()
{
return
"disable"
;
}
public
String
getLabel
()
{
return
null
;
}
public
int
getIcon
()
{
return
android
.
R
.
drawable
.
ic_delete
;
}
public
int
getIcon
()
{
return
R
.
drawable
.
disabled_picto
;
}
public
List
<
RadialMenuWidget
.
RadialMenuEntry
>
getChildren
()
{
return
null
;
}
public
void
menuActiviated
()
{
...
...
@@ -287,7 +245,7 @@ public class PictoMenu {
}
public
String
getName
()
{
return
"edit"
;
}
public
String
getLabel
()
{
return
null
;
}
public
int
getIcon
()
{
return
android
.
R
.
drawable
.
ic_menu_edit
;
}
public
int
getIcon
()
{
return
R
.
drawable
.
edit_picture
;
}
private
List
<
RadialMenuWidget
.
RadialMenuEntry
>
children
;
public
List
<
RadialMenuWidget
.
RadialMenuEntry
>
getChildren
()
{
return
children
;
}
public
void
menuActiviated
()
...
...
@@ -309,7 +267,7 @@ public class PictoMenu {
}
public
String
getName
()
{
return
"editText"
;
}
public
String
getLabel
()
{
return
null
;
}
public
int
getIcon
()
{
return
android
.
R
.
drawable
.
ic_menu_
camera
;
}
public
int
getIcon
()
{
return
R
.
drawable
.
camera
;
}
public
List
<
RadialMenuWidget
.
RadialMenuEntry
>
getChildren
()
{
return
null
;
}
public
void
menuActiviated
()
{
...
...
@@ -329,7 +287,7 @@ public class PictoMenu {
}
public
String
getName
()
{
return
"editImage"
;
}
public
String
getLabel
()
{
return
null
;
}
public
int
getIcon
()
{
return
android
.
R
.
drawable
.
ic_menu_
gallery
;
}
public
int
getIcon
()
{
return
R
.
drawable
.
gallery
;
}
public
List
<
RadialMenuWidget
.
RadialMenuEntry
>
getChildren
()
{
return
null
;
}
public
void
menuActiviated
()
{
...
...
@@ -352,7 +310,7 @@ public class PictoMenu {
}
public
String
getName
()
{
return
""
;
}
public
String
getLabel
()
{
return
null
;
}
public
int
getIcon
()
{
return
android
.
R
.
drawable
.
ic_menu_
camera
;
}
public
int
getIcon
()
{
return
R
.
drawable
.
camera
;
}
public
List
<
RadialMenuWidget
.
RadialMenuEntry
>
getChildren
()
{
return
null
;
}
public
void
menuActiviated
()
{
...
...
@@ -376,7 +334,7 @@ public class PictoMenu {
}
public
String
getName
()
{
return
""
;
}
public
String
getLabel
()
{
return
null
;
}
public
int
getIcon
()
{
return
android
.
R
.
drawable
.
ic_menu_
gallery
;
}
public
int
getIcon
()
{
return
R
.
drawable
.
gallery
;
}
public
List
<
RadialMenuWidget
.
RadialMenuEntry
>
getChildren
()
{
return
null
;
}
public
void
menuActiviated
()
{
...
...
android/Pictogram/tabletlibrary/src/main/java/com/yottacode/pictogram/tabletlibrary/gui/communicator/PictogramActivity.java
View file @
938efbbd
...
...
@@ -841,7 +841,7 @@ public class PictogramActivity extends Activity implements VocabularyTalk.iVocab
if
(
p
==
null
)
{
// No tengo pictograma. Abro una nueva ventana de selección desde el Carrete del device si no es categoria
if
(
getCurrentCategory
()
!=
null
||
!
PCBcontext
.
getPcbdb
().
getCurrentUser
().
has_categories
())
{
new
PictoMenu
(
PictogramActivity
.
this
).
createMenuForNewPicto
(
position
%
maxColumns
,
(
int
)
(
position
/
maxColumns
),
currentCategory
.
get_id
(),
null
,
PCBcontext
.
getPcbdb
().
getCurrentUser
().
is_picto_size_big
()
);
new
PictoMenu
(
PictogramActivity
.
this
).
createMenuForNewPicto
(
position
%
maxColumns
,
(
int
)
(
position
/
maxColumns
),
currentCategory
.
get_id
(),
null
);
}
else
Toast
.
makeText
(
PictogramActivity
.
this
,
PictogramActivity
.
this
.
getResources
().
getString
(
R
.
string
.
notNewCats
),
Toast
.
LENGTH_SHORT
).
show
();
...
...
android/Pictogram/tabletlibrary/src/main/res/drawable-hdpi/camera.png
0 → 100644
View file @
938efbbd
1.14 KB
android/Pictogram/tabletlibrary/src/main/res/drawable-hdpi/edit_picture.png
View file @
938efbbd
851 Bytes
|
W:
|
H:
1.21 KB
|
W:
|
H:
2-up
Swipe
Onion skin
android/Pictogram/tabletlibrary/src/main/res/drawable-hdpi/gallery.png
0 → 100644
View file @
938efbbd
1.02 KB
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