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
5fb8e46c
authored
Jul 19, 2017
by
Sebastián Collado Montañez
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
some comments on getPictoView
parent
5b062401
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
17 deletions
android/Pictogram/tabletlibrary/src/main/java/com/yottacode/pictogram/tabletlibrary/gui/communicator/PictoItemViewGenerator.java
android/Pictogram/tabletlibrary/src/main/java/com/yottacode/pictogram/tabletlibrary/gui/communicator/VOCA.java
android/Pictogram/tabletlibrary/src/main/java/com/yottacode/pictogram/tabletlibrary/gui/communicator/VocabularyManager.java
android/Pictogram/tabletlibrary/src/main/java/com/yottacode/pictogram/tabletlibrary/gui/communicator/PictoItemViewGenerator.java
View file @
5fb8e46c
...
...
@@ -24,6 +24,7 @@ import java.util.ArrayList;
* or a picto tape.
*/
public
class
PictoItemViewGenerator
{
public
static
final
int
LAYOUT
=
R
.
layout
.
picto_grid_item
;
public
static
final
int
LAYOUT_BIG
=
R
.
layout
.
picto_grid_item_big
;
private
static
final
byte
MAX_LINE_LENGTH
=
12
;
...
...
@@ -31,7 +32,6 @@ public class PictoItemViewGenerator {
private
static
final
String
LOG_TAG
=
PictoItemViewGenerator
.
class
.
getCanonicalName
();
public
static
int
mirror_color
=
0
;
/**
*
* @param picto Pictogram to set the legend text
...
...
@@ -61,19 +61,24 @@ public class PictoItemViewGenerator {
}
/**
*
* @param picto
* @param convertView
* @param parent
* @return
*/
public
static
View
getPictoView
(
Picto
picto
,
View
convertView
,
ViewGroup
parent
)
{
return
getPictoView
(
picto
,
convertView
,
parent
,
false
);
}
/**
* Establece la visibilidad de los pictogramas
* Pictogramas no habilitados se muestran sólo en VocabularyManager
* @param picto
* @param convertView
* @param picto
Pictogram to show
* @param convertView
View object
* @param parent
* @param preventMirror
* @return
* @return
Picto view
*/
public
static
View
getPictoView
(
Picto
picto
,
View
convertView
,
ViewGroup
parent
,
boolean
preventMirror
)
{
...
...
@@ -84,12 +89,15 @@ public class PictoItemViewGenerator {
TextView
legend
;
TextView
legend_full
;
// View init
if
(
convertView
==
null
)
convertView
=
LayoutInflater
.
from
(
parent
.
getContext
()).
inflate
(
PCBcontext
.
getPcbdb
().
getCurrentUser
().
is_picto_size_big
()
?
LAYOUT_BIG
:
LAYOUT
,
parent
,
false
);
if
(
parent
.
getId
()==
R
.
id
.
tape_grid_view
)
// Padding respect to the tape
if
(
parent
.
getId
()
==
R
.
id
.
tape_grid_view
)
convertView
.
setPadding
(
0
,
0
,
0
,
0
);
// Picto size
if
(
PCBcontext
.
getPcbdb
().
getCurrentUser
().
is_picto_size_big
())
{
layoutWrapper
=
(
RelativeLayout
)
convertView
.
findViewById
(
R
.
id
.
picto_grid_item_layout_wrapper_big
);
layout
=
(
FrameLayout
)
convertView
.
findViewById
(
R
.
id
.
picto_grid_item_layout_big
);
...
...
@@ -116,6 +124,7 @@ public class PictoItemViewGenerator {
pictoImage
.
setImageBitmap
(
null
);
layoutWrapper
.
setAlpha
(
1
f
);
// Picto visibility
if
(
PCBcontext
.
getActivityContext
().
getClass
().
getSimpleName
().
equals
(
"VocabularyManager"
)
||
(
picto
!=
null
&&
!
picto
.
is_invisible
()))
{
layoutWrapper
.
setVisibility
(
View
.
VISIBLE
);
pictoImage
.
setVisibility
(
View
.
VISIBLE
);
...
...
android/Pictogram/tabletlibrary/src/main/java/com/yottacode/pictogram/tabletlibrary/gui/communicator/VOCA.java
View file @
5fb8e46c
package
com
.
yottacode
.
pictogram
.
tabletlibrary
.
gui
.
communicator
;
import
android.util.Log
;
import
android.widget.Toast
;
import
com.yottacode.pictogram.tools.PCBcontext
;
/**
* Created by scollado on 17/07/17.
*/
public
class
VOCA
extends
VocabularyViewer
{
@Override
protected
void
onResume
()
{
super
.
onResume
();
PCBcontext
.
setActivityContext
(
this
);
}
}
android/Pictogram/tabletlibrary/src/main/java/com/yottacode/pictogram/tabletlibrary/gui/communicator/VocabularyManager.java
0 → 100644
View file @
5fb8e46c
package
com
.
yottacode
.
pictogram
.
tabletlibrary
.
gui
.
communicator
;
/**
* Created by scollado on 19/07/17.
*/
public
class
VocabularyManager
extends
VocabularyViewer
{
}
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