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
7606be25
authored
Jul 28, 2017
by
Fernando Martínez Santiago
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
issue
#291
to be validated
parent
af48dda2
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
10 additions
and
8 deletions
android/Pictogram/build.gradle
android/Pictogram/tabletlibrary/src/main/java/com/yottacode/pictogram/tabletlibrary/gui/session/PictoAdapter.java
android/Pictogram/tabletlibrary/src/main/java/com/yottacode/pictogram/tabletlibrary/gui/session/SessionActivity.java
android/Pictogram/tabletlibrary/src/main/java/com/yottacode/pictogram/tabletlibrary/gui/session/SessionFragment.java
android/Pictogram/tabletlibrary/tabletlibrary.iml
android/Pictogram/build.gradle
View file @
7606be25
...
...
@@ -5,7 +5,7 @@ buildscript {
jcenter
()
}
dependencies
{
classpath
'com.android.tools.build:gradle:2.3.
2
'
classpath
'com.android.tools.build:gradle:2.3.
3
'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
...
...
android/Pictogram/tabletlibrary/src/main/java/com/yottacode/pictogram/tabletlibrary/gui/session/PictoAdapter.java
View file @
7606be25
...
...
@@ -7,6 +7,7 @@ import android.graphics.Canvas;
import
android.graphics.Color
;
import
android.graphics.Paint
;
import
android.graphics.PorterDuff
;
import
android.util.Log
;
import
android.util.TypedValue
;
import
android.view.Gravity
;
import
android.view.LayoutInflater
;
...
...
@@ -51,9 +52,11 @@ class PictoAdapter extends BaseAdapter {
return
secs
;
}
public
String
getMsg
()
{
return
sentence
.
toString
();}
public
void
setImg
(
Bitmap
currmsg
,
String
word
,
boolean
eval
)
{
this
.
img
=
currmsg
;
if
(
eval
)
sentence
=
": "
+
word
;
if
(
eval
)
sentence
+=
":"
;
sentence
+=
" "
+
word
;
}
}
Context
context
;
...
...
android/Pictogram/tabletlibrary/src/main/java/com/yottacode/pictogram/tabletlibrary/gui/session/SessionActivity.java
View file @
7606be25
...
...
@@ -78,7 +78,7 @@ public class SessionActivity extends FragmentActivity implements ListInstruction
SessionWrapper
.
evaluateTry
(
currentMsgId
,
msg_pos
==
this
.
msgs
.
size
()-
1
,
evaluation_value
,
new
SessionWrapper
.
iTryUpdated
()
{
@Override
public
void
update
(
int
next_try_id
)
{
addLogMsg
(
"
añadiendo
"
+
sessionFragment
.
get_current_msg_text
()+
"."
);
addLogMsg
(
"
Msg:
"
+
sessionFragment
.
get_current_msg_text
()+
"."
);
Bitmap
bitmap
=
BitmapFactory
.
decodeResource
(
getResources
(),
evaluation_bitmap
);
sessionFragment
.
evaluateMsg
(
bitmap
,
getString
(
evaluation_translation
),
msg_pos
);
addLogMsg
(
"#"
+(
msg_pos
<
9
?
"0"
:
""
)+(
msg_pos
+
1
)+
sessionFragment
.
get_msg_text
(
msg_pos
));
...
...
@@ -136,7 +136,6 @@ public class SessionActivity extends FragmentActivity implements ListInstruction
Drawable
draw
=
getDrawable
(
button
);
v
.
setBackground
(
draw
);
v
.
setAlpha
(
event
.
getAction
()
==
MotionEvent
.
ACTION_UP
?
(
float
)
1
:
(
float
)
0.5
);
if
(
event
.
getAction
()
==
MotionEvent
.
ACTION_UP
)
{
final
SessionFragment
sessionFragment
=
(
SessionFragment
)
getSupportFragmentManager
().
findFragmentByTag
(
SessionActivity
.
FRAGMENT_SESSION
);
final
int
msg_pos
=
sessionFragment
.
get_current_msg_pos
();
...
...
@@ -152,6 +151,7 @@ public class SessionActivity extends FragmentActivity implements ListInstruction
@Override
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
...
...
android/Pictogram/tabletlibrary/src/main/java/com/yottacode/pictogram/tabletlibrary/gui/session/SessionFragment.java
View file @
7606be25
...
...
@@ -122,11 +122,10 @@ public class SessionFragment extends Fragment implements ActionTalk.iActionListe
bmp
=
bmp
.
copy
(
bmp
.
getConfig
(),
true
);
new
BitmapTools
(
bmp
).
paint
((
BitmapDrawable
)
getActivity
().
getResources
().
getDrawable
(
R
.
drawable
.
disabled_picto
,
null
),
1
);
}
else
if
(
PCBcontext
.
getVocabulary
().
get_picto
(
picto_cat
,
picto_id
).
is_category
())
{
Log
.
e
(
"CAT"
,
"catcat"
);
bmp
=
bmp
.
copy
(
bmp
.
getConfig
(),
true
);
new
BitmapTools
(
bmp
).
paint
((
BitmapDrawable
)
getActivity
().
getResources
().
getDrawable
(
R
.
drawable
.
session_category
,
null
),
0.5
);
}
if
(
paused
)
{
if
(
paused
)
{
bmp
=
bmp
.
copy
(
bmp
.
getConfig
(),
true
);
new
BitmapTools
(
bmp
).
paintPause
();
}
...
...
android/Pictogram/tabletlibrary/tabletlibrary.iml
View file @
7606be25
...
...
@@ -100,7 +100,6 @@
<orderEntry
type=
"library"
exported=
""
name=
"animated-vector-drawable-24.2.1"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
name=
"support-fragment-24.2.1"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
name=
"play-services-base-9.2.1"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
name=
"androidasync-2.1.9"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
name=
"play-services-clearcut-9.2.1"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
name=
"android-gif-drawable-1.1.7"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
name=
"support-v4-23.0.0"
level=
"project"
/>
...
...
@@ -116,9 +115,10 @@
<orderEntry
type=
"library"
exported=
""
name=
"play-services-basement-9.2.1"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
name=
"play-services-tasks-9.2.1"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
name=
"support-annotations-24.2.1"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
name=
"androidasync-2.2.1"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
name=
"play-services-auth-9.2.1"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
name=
"ion-2.2.1"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
name=
"play-services-ads-9.2.1"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
name=
"ion-2.1.9"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
name=
"play-services-ads-lite-9.2.1"
level=
"project"
/>
<orderEntry
type=
"module"
module-name=
"commonlibrary"
exported=
""
/>
<orderEntry
type=
"library"
exported=
""
name=
"android-android-24"
level=
"project"
/>
...
...
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