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
a49af2cb
authored
Dec 01, 2017
by
Fernando Martínez Santiago
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Pictogram 1.6, Beta 1
parent
d5c40671
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
14 additions
and
13 deletions
android/Pictogram/commonlibrary/src/main/java/com/yottacode/net/RestapiWrapper.java
android/Pictogram/commonlibrary/src/main/java/com/yottacode/pictogram/dao/UserLogin.java
android/Pictogram/commonlibrary/src/main/java/com/yottacode/pictogram/net/VocabularyDownloader.java
android/Pictogram/supervisor/supervisor.iml
android/Pictogram/tabletlibrary/src/main/java/com/yottacode/pictogram/tabletlibrary/gui/communicator/VOCA.java
android/Pictogram/commonlibrary/src/main/java/com/yottacode/net/RestapiWrapper.java
View file @
a49af2cb
...
...
@@ -142,6 +142,7 @@ public class RestapiWrapper {
StringBuilder
response
=
new
StringBuilder
(
""
);
String
line
;
JSONObject
JSONresponse
;
BufferedReader
br
=
new
BufferedReader
(
new
InputStreamReader
(
responseCode
==
HttpURLConnection
.
HTTP_OK
?
urlConnection
.
getInputStream
()
:
urlConnection
.
getErrorStream
()));
...
...
@@ -194,7 +195,6 @@ public class RestapiWrapper {
urlConnection
.
setRequestMethod
(
"GET"
);
urlConnection
.
setDoInput
(
true
);
urlConnection
.
connect
();
return
RestapiWrapper
.
resultToJSON
(
urlConnection
);
}
...
...
@@ -289,7 +289,6 @@ public class RestapiWrapper {
// onPostExecute displays the results of the AsyncTask.
@Override
protected
void
onPostExecute
(
HttpAsyncTaskParams
params
)
{
if
(
params
.
error
!=
null
)
{
if
(
silentLogin
!=
null
&&
!
silentLogin
.
isValidToken
(
params
.
error
,
params
.
result
))
{
silentLogin
.
login
();
...
...
android/Pictogram/commonlibrary/src/main/java/com/yottacode/pictogram/dao/UserLogin.java
View file @
a49af2cb
...
...
@@ -243,7 +243,8 @@ public class UserLogin {
public
void
loadComplete
()
{
PCBcontext
.
getDevice
().
insertUser
(
student
);
if
(
progressDialog
.
isShowing
())
progressDialog
.
dismiss
();
activity
.
startActivity
(
pictogramActivity
);
activity
.
startActivity
(
pictogramActivity
);
}
...
...
android/Pictogram/commonlibrary/src/main/java/com/yottacode/pictogram/net/VocabularyDownloader.java
View file @
a49af2cb
...
...
@@ -52,8 +52,10 @@ public class VocabularyDownloader {
grids_reamining
.
remove
(
0
);
downloaded_scenes
.
add
(
id_grid
);
synchronize
(
next_grid
,
grids_reamining
,
downloaded_scenes
);
}
else
}
else
{
this
.
imgListener
.
loadComplete
();
TransactionMonitor
.
endTransaction
(
true
);
}
}
private
void
synchronize
(
final
int
id_grid
,
final
Vector
<
Integer
>
grids_reamining
,
final
Vector
<
Integer
>
downloaded_scenes
)
{
if
(
downloaded_scenes
.
contains
(
id_grid
))
...
...
@@ -159,8 +161,8 @@ public class VocabularyDownloader {
}
Log
.
d
(
this
.
getClass
().
getName
(),
"Vocabulary size: "
+
updated_collection
.
length
);
ImgDownloader
downloader
=
new
ImgDownloader
(
PCBcontext
.
getContext
(),
imgListener
,
ImgDownloader
.
tsource
.
remote
);
downloader
.
executeOnExecutor
(
AsyncTask
.
THREAD_POO
L_EXECUTOR
,
imgs
);
ImgDownloader
downloader
=
new
ImgDownloader
(
PCBcontext
.
getContext
(),
null
,
ImgDownloader
.
tsource
.
remote
);
downloader
.
executeOnExecutor
(
AsyncTask
.
SERIA
L_EXECUTOR
,
imgs
);
}
/**
...
...
android/Pictogram/supervisor/supervisor.iml
View file @
a49af2cb
...
...
@@ -174,6 +174,5 @@
<orderEntry
type=
"library"
exported=
""
scope=
"TEST"
name=
"hamcrest-core-1.3"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
scope=
"TEST"
name=
"junit-4.12"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
scope=
"TEST"
name=
"json-20090211"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
name=
"tabletlibrary-unspecified"
level=
"project"
/>
</component>
</module>
\ No newline at end of file
android/Pictogram/tabletlibrary/src/main/java/com/yottacode/pictogram/tabletlibrary/gui/communicator/VOCA.java
View file @
a49af2cb
...
...
@@ -295,11 +295,11 @@ public abstract class VOCA extends Activity implements VocabularyTalk.iVocabular
}
@Override
protected
void
onStart
()
{
super
.
onStart
();
onWindowFocusChanged
(
true
);
protected
void
onResume
()
{
super
.
onResume
();
Log
.
e
(
LOG_TAG
,
"onResume**************"
);
//onWindowFocusChanged(true);
if
(!
PCBcontext
.
getVocabulary
().
isVisibleAnyPicto
())
{
onResumeWhenEmptyScene
();
...
...
@@ -420,6 +420,7 @@ public abstract class VOCA extends Activity implements VocabularyTalk.iVocabular
super
.
onPause
();
this
.
pictoCategoryGridAdapter
.
allPictosInGrid
();
this
.
pictoMainGridAdapter
.
allPictosInGrid
();
Log
.
e
(
LOG_TAG
,
"onPause*********************"
);
}
@Override
...
...
@@ -749,7 +750,7 @@ public abstract class VOCA extends Activity implements VocabularyTalk.iVocabular
p
.
set_mirror
(
false
,
false
);
// If the picto is a category
Log
.
e
(
LOG_TAG
,
"CHILD?"
+
p
.
has_child_grid
()+
" p id:"
+
p
.
get_stupicto_id
());
if
(
p
.
has_child_grid
())
{
currentCategory
=
p
;
PCBcontext
.
getActionLog
().
log
(
new
TalkAction
(
TalkAction
.
SELECT
,
p
));
...
...
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