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
4cb773c3
authored
Jul 20, 2017
by
Sebastián Collado Montañez
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
VOCA class defined
parent
5fb8e46c
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
52 additions
and
50 deletions
android/Pictogram/supervisor_tablet/src/main/AndroidManifest.xml
android/Pictogram/tabletlibrary/src/main/java/com/yottacode/pictogram/tabletlibrary/gui/communicator/PictoAnimation.java
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/PictoMenu.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/VocabularyViewer.java
android/Pictogram/tabletlibrary/src/main/java/com/yottacode/pictogram/tabletlibrary/gui/login/SerialActivity.java
android/Pictogram/tabletlibrary/src/main/java/com/yottacode/pictogram/tabletlibrary/gui/login/StudentFragmentGrid.java
android/Pictogram/tabletlibrary/src/main/java/com/yottacode/pictogram/tabletlibrary/gui/session/ListInstructionsFragment.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/net/NetServiceTablet.java
android/Pictogram/tabletlibrary/src/main/res/layout/activity_pictogram.xml
android/Pictogram/tabletlibrary/src/main/res/layout/activity_pictogram_big.xml
android/Pictogram/tabletlibrary/tabletlibrary.iml
android/Pictogram/yotta_tablet/src/main/AndroidManifest.xml
android/Pictogram/supervisor_tablet/src/main/AndroidManifest.xml
View file @
4cb773c3
...
@@ -49,7 +49,7 @@
...
@@ -49,7 +49,7 @@
android:label=
"@string/title_activity_login_activity_fragments"
android:label=
"@string/title_activity_login_activity_fragments"
android:screenOrientation=
"landscape"
/>
android:screenOrientation=
"landscape"
/>
<activity
<activity
android:name=
"com.yottacode.pictogram.tabletlibrary.gui.communicator.V
ocabularyViewer
"
android:name=
"com.yottacode.pictogram.tabletlibrary.gui.communicator.V
OCA
"
android:exported=
"true"
android:exported=
"true"
android:label=
"@string/app_name"
android:label=
"@string/app_name"
android:launchMode=
"singleTop"
android:launchMode=
"singleTop"
...
...
android/Pictogram/tabletlibrary/src/main/java/com/yottacode/pictogram/tabletlibrary/gui/communicator/PictoAnimation.java
View file @
4cb773c3
...
@@ -31,7 +31,7 @@ public class PictoAnimation {
...
@@ -31,7 +31,7 @@ public class PictoAnimation {
private
final
static
String
LOG_TAG
=
PictoAnimation
.
class
.
getCanonicalName
();
private
final
static
String
LOG_TAG
=
PictoAnimation
.
class
.
getCanonicalName
();
public
void
animateTapeView
(
final
V
ocabularyViewer
activity
,
final
int
position
,
final
ViewGroup
view
)
{
public
void
animateTapeView
(
final
V
OCA
activity
,
final
int
position
,
final
ViewGroup
view
)
{
final
GridView
gridview
=
(
GridView
)
view
.
getChildAt
(
1
);
final
GridView
gridview
=
(
GridView
)
view
.
getChildAt
(
1
);
final
TapeAdapter
tapeAdapter
=(
TapeAdapter
)
gridview
.
getAdapter
();
final
TapeAdapter
tapeAdapter
=(
TapeAdapter
)
gridview
.
getAdapter
();
...
@@ -104,7 +104,7 @@ public class PictoAnimation {
...
@@ -104,7 +104,7 @@ public class PictoAnimation {
return
argb
(
alpha
,
red
,
green
,
blue
);
return
argb
(
alpha
,
red
,
green
,
blue
);
}
}
public
void
animateTapeViewVertical
(
final
V
ocabularyViewer
activity
,
final
boolean
up
)
{
public
void
animateTapeViewVertical
(
final
V
OCA
activity
,
final
boolean
up
)
{
final
View
v
=
activity
.
findViewById
(
R
.
id
.
pictogramLayout
);
final
View
v
=
activity
.
findViewById
(
R
.
id
.
pictogramLayout
);
int
y
=
v
.
getHeight
()/
2
-
activity
.
tapeGridView
.
getHeight
()/
2
;
int
y
=
v
.
getHeight
()/
2
-
activity
.
tapeGridView
.
getHeight
()/
2
;
final
ValueAnimator
moveAnim
=
up
final
ValueAnimator
moveAnim
=
up
...
@@ -147,7 +147,7 @@ public class PictoAnimation {
...
@@ -147,7 +147,7 @@ public class PictoAnimation {
public
void
animateOnDeleteView
(
final
V
ocabularyViewer
activity
,
View
view
,
final
int
position
)
{
public
void
animateOnDeleteView
(
final
V
OCA
activity
,
View
view
,
final
int
position
)
{
if
(
activity
.
deleting
)
return
;
if
(
activity
.
deleting
)
return
;
View
borderlayout
=((
RelativeLayout
)
view
).
getChildAt
(
0
);
View
borderlayout
=((
RelativeLayout
)
view
).
getChildAt
(
0
);
...
@@ -222,7 +222,7 @@ public class PictoAnimation {
...
@@ -222,7 +222,7 @@ public class PictoAnimation {
public
static
void
animateOnGridView
(
final
RelativeLayout
layout
)
{
public
static
void
animateOnGridView
(
final
RelativeLayout
layout
)
{
final
V
ocabularyViewer
activity
=(
VocabularyViewer
)
PCBcontext
.
getActivityContext
();
final
V
OCA
activity
=(
VOCA
)
PCBcontext
.
getActivityContext
();
if
(
activity
.
inserting
)
return
;
if
(
activity
.
inserting
)
return
;
FrameLayout
borderlayout
=(
FrameLayout
)
layout
.
getChildAt
(
0
);
FrameLayout
borderlayout
=(
FrameLayout
)
layout
.
getChildAt
(
0
);
...
@@ -275,7 +275,7 @@ public class PictoAnimation {
...
@@ -275,7 +275,7 @@ public class PictoAnimation {
public
static
void
animateOutGridView
(
final
PictoGridAdapter
pictoGridAdapter
,
final
Picto
picto
,
RelativeLayout
layout
,
final
Vector
<
Picto
>
pictoLinkedList_inTape
)
{
public
static
void
animateOutGridView
(
final
PictoGridAdapter
pictoGridAdapter
,
final
Picto
picto
,
RelativeLayout
layout
,
final
Vector
<
Picto
>
pictoLinkedList_inTape
)
{
final
V
ocabularyViewer
activity
=(
VocabularyViewer
)
PCBcontext
.
getActivityContext
();
final
V
OCA
activity
=(
VOCA
)
PCBcontext
.
getActivityContext
();
if
(
activity
.
inserting
)
return
;
if
(
activity
.
inserting
)
return
;
FrameLayout
borderlayout
=(
FrameLayout
)
layout
.
getChildAt
(
0
);
FrameLayout
borderlayout
=(
FrameLayout
)
layout
.
getChildAt
(
0
);
...
...
android/Pictogram/tabletlibrary/src/main/java/com/yottacode/pictogram/tabletlibrary/gui/communicator/PictoItemViewGenerator.java
View file @
4cb773c3
...
@@ -73,7 +73,7 @@ public class PictoItemViewGenerator {
...
@@ -73,7 +73,7 @@ public class PictoItemViewGenerator {
}
}
/**
/**
*
Pictogramas no habilitados se muestran sólo en VocabularyManager
*
* @param picto Pictogram to show
* @param picto Pictogram to show
* @param convertView View object
* @param convertView View object
* @param parent
* @param parent
...
...
android/Pictogram/tabletlibrary/src/main/java/com/yottacode/pictogram/tabletlibrary/gui/communicator/PictoMenu.java
View file @
4cb773c3
...
@@ -26,7 +26,7 @@ public class PictoMenu {
...
@@ -26,7 +26,7 @@ public class PictoMenu {
public
static
final
String
IMAGE_PICTO
=
"imagePicto"
;
public
static
final
String
IMAGE_PICTO
=
"imagePicto"
;
public
static
final
String
PATH_SOUND
=
"pathSound"
;
public
static
final
String
PATH_SOUND
=
"pathSound"
;
V
ocabularyViewer
activity
;
V
OCA
activity
;
//Variables used on the picto menu (only supervisors)
//Variables used on the picto menu (only supervisors)
private
static
final
int
CAMERA_PIC_REQUEST
=
1
;
private
static
final
int
CAMERA_PIC_REQUEST
=
1
;
...
@@ -40,7 +40,7 @@ public class PictoMenu {
...
@@ -40,7 +40,7 @@ public class PictoMenu {
// TODO describe this variable
// TODO describe this variable
static
final
int
SELECT_PICTURE
=
1
;
static
final
int
SELECT_PICTURE
=
1
;
public
PictoMenu
(
V
ocabularyViewer
activity
)
{
public
PictoMenu
(
V
OCA
activity
)
{
this
.
activity
=
activity
;
this
.
activity
=
activity
;
}
}
...
@@ -81,7 +81,7 @@ public class PictoMenu {
...
@@ -81,7 +81,7 @@ public class PictoMenu {
public
void
addPicto
(
int
row
,
int
col
,
int
cat
,
int
source
)
{
public
void
addPicto
(
int
row
,
int
col
,
int
cat
,
int
source
)
{
//Enviar al V
ocabularyViewer
los datos necesarios para crear el picto despues
//Enviar al V
OCA
los datos necesarios para crear el picto despues
if
(
/*PCBcontext.getPcbdb().getCurrentUser().has_categories()*/
PCBcontext
.
getVocabulary
().
has_categories
())
{
if
(
/*PCBcontext.getPcbdb().getCurrentUser().has_categories()*/
PCBcontext
.
getVocabulary
().
has_categories
())
{
activity
.
getIntent
().
putExtra
(
Picto
.
JSON_ATTTRS
.
CATEGORY
,
cat
);
activity
.
getIntent
().
putExtra
(
Picto
.
JSON_ATTTRS
.
CATEGORY
,
cat
);
activity
.
getIntent
().
putExtra
(
Picto
.
JSON_ATTTRS
.
ROW
,
row
);
activity
.
getIntent
().
putExtra
(
Picto
.
JSON_ATTTRS
.
ROW
,
row
);
...
@@ -107,7 +107,7 @@ public class PictoMenu {
...
@@ -107,7 +107,7 @@ public class PictoMenu {
Intent
intent
=
new
Intent
(
activity
,
EditPictoActivity
.
class
);
Intent
intent
=
new
Intent
(
activity
,
EditPictoActivity
.
class
);
intent
.
putExtra
(
ID_PICTO_IMAGE
,
id_picto
);
intent
.
putExtra
(
ID_PICTO_IMAGE
,
id_picto
);
//Enviar al V
ocabularyViewer
los datos necesarios para editar el picto despues
//Enviar al V
OCA
los datos necesarios para editar el picto despues
if
(
/*PCBcontext.getPcbdb().getCurrentUser().has_categories()*/
PCBcontext
.
getVocabulary
().
has_categories
())
{
if
(
/*PCBcontext.getPcbdb().getCurrentUser().has_categories()*/
PCBcontext
.
getVocabulary
().
has_categories
())
{
intent
.
putExtra
(
Picto
.
JSON_ATTTRS
.
CATEGORY
,
cat
);
intent
.
putExtra
(
Picto
.
JSON_ATTTRS
.
CATEGORY
,
cat
);
intent
.
putExtra
(
Picto
.
JSON_ATTTRS
.
ROW
,
row
);
intent
.
putExtra
(
Picto
.
JSON_ATTTRS
.
ROW
,
row
);
...
...
android/Pictogram/tabletlibrary/src/main/java/com/yottacode/pictogram/tabletlibrary/gui/communicator/VOCA.java
View file @
4cb773c3
This diff is collapsed.
Click to expand it.
android/Pictogram/tabletlibrary/src/main/java/com/yottacode/pictogram/tabletlibrary/gui/communicator/VocabularyManager.java
deleted
100644 → 0
View file @
5fb8e46c
package
com
.
yottacode
.
pictogram
.
tabletlibrary
.
gui
.
communicator
;
/**
* Created by scollado on 19/07/17.
*/
public
class
VocabularyManager
extends
VocabularyViewer
{
}
android/Pictogram/tabletlibrary/src/main/java/com/yottacode/pictogram/tabletlibrary/gui/communicator/VocabularyViewer.java
deleted
100644 → 0
View file @
5fb8e46c
This diff is collapsed.
Click to expand it.
android/Pictogram/tabletlibrary/src/main/java/com/yottacode/pictogram/tabletlibrary/gui/login/SerialActivity.java
View file @
4cb773c3
...
@@ -23,7 +23,6 @@ import com.yottacode.pictogram.dao.User;
...
@@ -23,7 +23,6 @@ import com.yottacode.pictogram.dao.User;
import
com.yottacode.pictogram.dao.UserLogin
;
import
com.yottacode.pictogram.dao.UserLogin
;
import
com.yottacode.pictogram.tabletlibrary.R
;
import
com.yottacode.pictogram.tabletlibrary.R
;
import
com.yottacode.pictogram.tabletlibrary.gui.communicator.VOCA
;
import
com.yottacode.pictogram.tabletlibrary.gui.communicator.VOCA
;
import
com.yottacode.pictogram.tabletlibrary.gui.communicator.VocabularyViewer
;
import
com.yottacode.pictogram.tabletlibrary.net.NetServiceTablet
;
import
com.yottacode.pictogram.tabletlibrary.net.NetServiceTablet
;
import
com.yottacode.pictogram.tools.PCBcontext
;
import
com.yottacode.pictogram.tools.PCBcontext
;
...
@@ -100,7 +99,7 @@ public class SerialActivity extends Activity {
...
@@ -100,7 +99,7 @@ public class SerialActivity extends Activity {
editor
.
putString
(
"password"
,
supUsers
.
elementAt
(
position
).
get_pwd_sup
());
editor
.
putString
(
"password"
,
supUsers
.
elementAt
(
position
).
get_pwd_sup
());
editor
.
commit
();
editor
.
commit
();
new
UserLogin
().
login
(
supUsers
.
elementAt
(
position
).
get_email_sup
(),
new
UserLogin
().
login
(
supUsers
.
elementAt
(
position
).
get_email_sup
(),
supUsers
.
elementAt
(
position
).
get_pwd_sup
(),
SerialActivity
.
this
,
V
ocabularyViewer
.
class
,
LoginActivity
.
class
);
supUsers
.
elementAt
(
position
).
get_pwd_sup
(),
SerialActivity
.
this
,
V
OCA
.
class
,
LoginActivity
.
class
);
}
}
}
}
});
});
...
@@ -134,7 +133,7 @@ public class SerialActivity extends Activity {
...
@@ -134,7 +133,7 @@ public class SerialActivity extends Activity {
editor
.
putString
(
"password"
,
stuUsers
.
elementAt
(
position
).
get_pwd_stu
());
editor
.
putString
(
"password"
,
stuUsers
.
elementAt
(
position
).
get_pwd_stu
());
editor
.
commit
();
editor
.
commit
();
new
UserLogin
().
login
(
stuUsers
.
elementAt
(
position
).
get_nickname_stu
(),
new
UserLogin
().
login
(
stuUsers
.
elementAt
(
position
).
get_nickname_stu
(),
stuUsers
.
elementAt
(
position
).
get_pwd_stu
(),
SerialActivity
.
this
,
V
ocabularyViewer
.
class
,
LoginActivity
.
class
);
stuUsers
.
elementAt
(
position
).
get_pwd_stu
(),
SerialActivity
.
this
,
V
OCA
.
class
,
LoginActivity
.
class
);
}
}
});
});
}
}
...
@@ -173,7 +172,7 @@ public class SerialActivity extends Activity {
...
@@ -173,7 +172,7 @@ public class SerialActivity extends Activity {
editor
.
putString
(
"password"
,
password
);
editor
.
putString
(
"password"
,
password
);
editor
.
commit
();
editor
.
commit
();
if
(!
username
.
equals
(
""
)
&&
!
password
.
equals
(
""
))
if
(!
username
.
equals
(
""
)
&&
!
password
.
equals
(
""
))
new
UserLogin
().
login
(
username
,
password
,
SerialActivity
.
this
,
V
ocabularyViewer
.
class
,
LoginActivity
.
class
);
new
UserLogin
().
login
(
username
,
password
,
SerialActivity
.
this
,
V
OCA
.
class
,
LoginActivity
.
class
);
}
}
});
});
...
@@ -194,7 +193,7 @@ public class SerialActivity extends Activity {
...
@@ -194,7 +193,7 @@ public class SerialActivity extends Activity {
mSerialViewPass
.
setText
(
password
);
mSerialViewPass
.
setText
(
password
);
if
(!
username
.
equals
(
""
)
&&
!
password
.
equals
(
""
)
&&
!
getIntent
().
getBooleanExtra
(
"resetPrevUser"
,
true
))
if
(!
username
.
equals
(
""
)
&&
!
password
.
equals
(
""
)
&&
!
getIntent
().
getBooleanExtra
(
"resetPrevUser"
,
true
))
new
UserLogin
().
login
(
username
,
password
,
SerialActivity
.
this
,
V
ocabularyViewer
.
class
,
LoginActivity
.
class
);
new
UserLogin
().
login
(
username
,
password
,
SerialActivity
.
this
,
V
OCA
.
class
,
LoginActivity
.
class
);
super
.
onStart
();
super
.
onStart
();
try
{
try
{
...
...
android/Pictogram/tabletlibrary/src/main/java/com/yottacode/pictogram/tabletlibrary/gui/login/StudentFragmentGrid.java
View file @
4cb773c3
...
@@ -17,7 +17,7 @@ import com.yottacode.net.RestapiWrapper;
...
@@ -17,7 +17,7 @@ import com.yottacode.net.RestapiWrapper;
import
com.yottacode.pictogram.dao.User
;
import
com.yottacode.pictogram.dao.User
;
import
com.yottacode.pictogram.net.ImgDownloader
;
import
com.yottacode.pictogram.net.ImgDownloader
;
import
com.yottacode.pictogram.tabletlibrary.R
;
import
com.yottacode.pictogram.tabletlibrary.R
;
import
com.yottacode.pictogram.tabletlibrary.gui.communicator.V
ocabularyViewer
;
import
com.yottacode.pictogram.tabletlibrary.gui.communicator.V
OCA
;
import
com.yottacode.pictogram.tools.Img
;
import
com.yottacode.pictogram.tools.Img
;
import
com.yottacode.pictogram.tools.PCBcontext
;
import
com.yottacode.pictogram.tools.PCBcontext
;
import
com.yottacode.tools.GUITools
;
import
com.yottacode.tools.GUITools
;
...
@@ -80,7 +80,7 @@ public class StudentFragmentGrid extends Fragment{
...
@@ -80,7 +80,7 @@ public class StudentFragmentGrid extends Fragment{
Log
.
e
(
StudentFragmentGrid
.
this
.
getClass
().
getCanonicalName
(),
e
.
getMessage
());
Log
.
e
(
StudentFragmentGrid
.
this
.
getClass
().
getCanonicalName
(),
e
.
getMessage
());
}
}
PCBcontext
.
set_user
(
currentUser
,
null
,
null
);
PCBcontext
.
set_user
(
currentUser
,
null
,
null
);
Intent
pictogramActivity
=
new
Intent
(
getActivity
(),
V
ocabularyViewer
.
class
);
Intent
pictogramActivity
=
new
Intent
(
getActivity
(),
V
OCA
.
class
);
startActivity
(
pictogramActivity
);
startActivity
(
pictogramActivity
);
}
else
{
}
else
{
new_user
(
i
);
new_user
(
i
);
...
@@ -124,7 +124,7 @@ public class StudentFragmentGrid extends Fragment{
...
@@ -124,7 +124,7 @@ public class StudentFragmentGrid extends Fragment{
@Override
@Override
public
void
loadComplete
()
{
public
void
loadComplete
()
{
if
(
progressDialog
!=
null
&&
progressDialog
.
isShowing
())
progressDialog
.
dismiss
();
if
(
progressDialog
!=
null
&&
progressDialog
.
isShowing
())
progressDialog
.
dismiss
();
Intent
pictogramActivity
=
new
Intent
(
getActivity
(),
V
ocabularyViewer
.
class
);
Intent
pictogramActivity
=
new
Intent
(
getActivity
(),
V
OCA
.
class
);
startActivity
(
pictogramActivity
);
startActivity
(
pictogramActivity
);
}
}
...
...
android/Pictogram/tabletlibrary/src/main/java/com/yottacode/pictogram/tabletlibrary/gui/session/ListInstructionsFragment.java
View file @
4cb773c3
...
@@ -15,7 +15,7 @@ import android.widget.AdapterView;
...
@@ -15,7 +15,7 @@ import android.widget.AdapterView;
import
android.widget.ArrayAdapter
;
import
android.widget.ArrayAdapter
;
import
android.widget.ListView
;
import
android.widget.ListView
;
import
com.yottacode.pictogram.tabletlibrary.gui.communicator.V
ocabularyViewer
;
import
com.yottacode.pictogram.tabletlibrary.gui.communicator.V
OCA
;
import
com.yottacode.pictogram.tabletlibrary.net.SessionWrapper
;
import
com.yottacode.pictogram.tabletlibrary.net.SessionWrapper
;
import
com.yottacode.pictogram.tabletlibrary.R
;
import
com.yottacode.pictogram.tabletlibrary.R
;
import
com.yottacode.pictogram.tools.PCBcontext
;
import
com.yottacode.pictogram.tools.PCBcontext
;
...
@@ -116,7 +116,7 @@ public class ListInstructionsFragment extends Fragment{
...
@@ -116,7 +116,7 @@ public class ListInstructionsFragment extends Fragment{
}
}
void
close
()
{
void
close
()
{
ListInstructionsFragment
.
this
.
getActivity
().
finish
();
ListInstructionsFragment
.
this
.
getActivity
().
finish
();
startActivity
(
new
Intent
(
getActivity
(),
V
ocabularyViewer
.
class
));
startActivity
(
new
Intent
(
getActivity
(),
V
OCA
.
class
));
}
}
private
void
checkStudent
()
{
private
void
checkStudent
()
{
SessionWrapper
.
validateStudent
(
new
SessionWrapper
.
iValidateStudent
()
{
SessionWrapper
.
validateStudent
(
new
SessionWrapper
.
iValidateStudent
()
{
...
...
android/Pictogram/tabletlibrary/src/main/java/com/yottacode/pictogram/tabletlibrary/gui/session/SessionActivity.java
View file @
4cb773c3
...
@@ -21,7 +21,7 @@ import android.widget.ToggleButton;
...
@@ -21,7 +21,7 @@ import android.widget.ToggleButton;
import
com.yottacode.pictogram.dao.User
;
import
com.yottacode.pictogram.dao.User
;
import
com.yottacode.pictogram.net.NetService
;
import
com.yottacode.pictogram.net.NetService
;
import
com.yottacode.pictogram.tabletlibrary.R
;
import
com.yottacode.pictogram.tabletlibrary.R
;
import
com.yottacode.pictogram.tabletlibrary.gui.communicator.V
ocabularyViewer
;
import
com.yottacode.pictogram.tabletlibrary.gui.communicator.V
OCA
;
import
com.yottacode.pictogram.tabletlibrary.net.SessionWrapper
;
import
com.yottacode.pictogram.tabletlibrary.net.SessionWrapper
;
import
com.yottacode.pictogram.tools.PCBcontext
;
import
com.yottacode.pictogram.tools.PCBcontext
;
import
com.yottacode.tools.GUITools
;
import
com.yottacode.tools.GUITools
;
...
@@ -273,13 +273,13 @@ public class SessionActivity extends FragmentActivity implements ListInstruction
...
@@ -273,13 +273,13 @@ public class SessionActivity extends FragmentActivity implements ListInstruction
break
;
break
;
case
MotionEvent
.
ACTION_UP
:
case
MotionEvent
.
ACTION_UP
:
if
(
event
.
getX
()>
firstTouchX
+
100
)
{
//izquierda->derecha
if
(
event
.
getX
()>
firstTouchX
+
100
)
{
//izquierda->derecha
nextActivity
=
new
Intent
(
this
,
V
ocabularyViewer
.
class
);
nextActivity
=
new
Intent
(
this
,
V
OCA
.
class
);
nextActivity
.
putExtra
(
"student_view"
,
false
);
nextActivity
.
putExtra
(
"student_view"
,
false
);
in
=
R
.
anim
.
rightin
;
in
=
R
.
anim
.
rightin
;
out
=
R
.
anim
.
rightout
;
out
=
R
.
anim
.
rightout
;
}
}
else
if
(
firstTouchX
>
event
.
getX
()+
100
)
{
//derecha->izquierda
else
if
(
firstTouchX
>
event
.
getX
()+
100
)
{
//derecha->izquierda
nextActivity
=
new
Intent
(
this
,
V
ocabularyViewer
.
class
);
nextActivity
=
new
Intent
(
this
,
V
OCA
.
class
);
nextActivity
.
putExtra
(
"student_view"
,
true
);
nextActivity
.
putExtra
(
"student_view"
,
true
);
PCBcontext
.
getPcbdb
().
getCurrentUser
().
get_Img_sup
().
update_id
(
User
.
NO_SUPERVISOR
);
PCBcontext
.
getPcbdb
().
getCurrentUser
().
get_Img_sup
().
update_id
(
User
.
NO_SUPERVISOR
);
in
=
R
.
anim
.
leftin
;
in
=
R
.
anim
.
leftin
;
...
@@ -345,7 +345,7 @@ public class SessionActivity extends FragmentActivity implements ListInstruction
...
@@ -345,7 +345,7 @@ public class SessionActivity extends FragmentActivity implements ListInstruction
}
}
void
close
()
{
void
close
()
{
finish
();
finish
();
startActivity
(
new
Intent
(
SessionActivity
.
this
,
V
ocabularyViewer
.
class
));
startActivity
(
new
Intent
(
SessionActivity
.
this
,
V
OCA
.
class
));
}
}
private
void
set_fragment
(
boolean
isChecked
,
final
ToggleButton
onoffBtn
)
{
private
void
set_fragment
(
boolean
isChecked
,
final
ToggleButton
onoffBtn
)
{
if
(
isChecked
)
{
if
(
isChecked
)
{
...
...
android/Pictogram/tabletlibrary/src/main/java/com/yottacode/pictogram/tabletlibrary/net/NetServiceTablet.java
View file @
4cb773c3
...
@@ -12,7 +12,7 @@ import android.util.Log;
...
@@ -12,7 +12,7 @@ import android.util.Log;
import
com.yottacode.pictogram.dao.User
;
import
com.yottacode.pictogram.dao.User
;
import
com.yottacode.pictogram.net.NetService
;
import
com.yottacode.pictogram.net.NetService
;
import
com.yottacode.pictogram.tabletlibrary.R
;
import
com.yottacode.pictogram.tabletlibrary.R
;
import
com.yottacode.pictogram.tabletlibrary.gui.communicator.V
ocabularyViewer
;
import
com.yottacode.pictogram.tabletlibrary.gui.communicator.V
OCA
;
import
com.yottacode.pictogram.tools.PCBcontext
;
import
com.yottacode.pictogram.tools.PCBcontext
;
/**
/**
...
@@ -25,15 +25,15 @@ public class NetServiceTablet implements NetService.iNetServiceDevice {
...
@@ -25,15 +25,15 @@ public class NetServiceTablet implements NetService.iNetServiceDevice {
private
static
final
String
LOG_TAG
=
NetServiceTablet
.
class
.
getName
();
private
static
final
String
LOG_TAG
=
NetServiceTablet
.
class
.
getName
();
private
static
NotificationCompat
.
Builder
builder
;
private
static
NotificationCompat
.
Builder
builder
;
private
V
ocabularyViewer
vocabularyViewer
;
private
V
OCA
VOCA
;
int
notifyID
=
666
;
int
notifyID
=
666
;
public
void
build
()
{
public
void
build
()
{
this
.
builder
=
new
NotificationCompat
.
Builder
(
PCBcontext
.
getContext
()).
setAutoCancel
(
true
).
setOngoing
(
PCBcontext
.
getContext
().
getResources
().
getBoolean
(
R
.
bool
.
NotifyAllwaysVisible
));
this
.
builder
=
new
NotificationCompat
.
Builder
(
PCBcontext
.
getContext
()).
setAutoCancel
(
true
).
setOngoing
(
PCBcontext
.
getContext
().
getResources
().
getBoolean
(
R
.
bool
.
NotifyAllwaysVisible
));
Intent
resultIntent
=
new
Intent
(
PCBcontext
.
getContext
(),
V
ocabularyViewer
.
class
);
Intent
resultIntent
=
new
Intent
(
PCBcontext
.
getContext
(),
V
OCA
.
class
);
TaskStackBuilder
stackBuilder
=
TaskStackBuilder
.
create
(
PCBcontext
.
getContext
());
TaskStackBuilder
stackBuilder
=
TaskStackBuilder
.
create
(
PCBcontext
.
getContext
());
stackBuilder
.
addParentStack
(
V
ocabularyViewer
.
class
);
stackBuilder
.
addParentStack
(
V
OCA
.
class
);
stackBuilder
.
addNextIntent
(
resultIntent
);
stackBuilder
.
addNextIntent
(
resultIntent
);
if
(
PCBcontext
.
getContext
().
getResources
().
getBoolean
(
R
.
bool
.
NotifyAllwaysVisible
)){
if
(
PCBcontext
.
getContext
().
getResources
().
getBoolean
(
R
.
bool
.
NotifyAllwaysVisible
)){
PendingIntent
resultPendingIntent
=
PendingIntent
resultPendingIntent
=
...
@@ -96,8 +96,8 @@ public class NetServiceTablet implements NetService.iNetServiceDevice {
...
@@ -96,8 +96,8 @@ public class NetServiceTablet implements NetService.iNetServiceDevice {
context
.
startActivity
(
serialActivity
);
context
.
startActivity
(
serialActivity
);
}
}
public
void
setV
ocabularyViewer
(
VocabularyViewer
vocabularyViewer
)
{
this
.
vocabularyViewer
=
vocabularyViewer
;}
public
void
setV
OCA
(
VOCA
VOCA
)
{
this
.
VOCA
=
VOCA
;}
public
void
updateUserConfig
(
User
user
)
{
public
void
updateUserConfig
(
User
user
)
{
if
(
this
.
vocabularyViewer
!=
null
)
this
.
vocabularyViewer
.
setConfig
();
if
(
this
.
VOCA
!=
null
)
this
.
VOCA
.
setConfig
();
}
}
}
}
android/Pictogram/tabletlibrary/src/main/res/layout/activity_pictogram.xml
View file @
4cb773c3
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
android:orientation=
"horizontal"
android:orientation=
"horizontal"
android:background=
"#BDBDBD"
android:background=
"#BDBDBD"
android:keepScreenOn=
"true"
android:keepScreenOn=
"true"
tools:context=
"com.yottacode.pictogram.tabletlibrary.gui.communicator.V
ocabularyViewer
"
tools:context=
"com.yottacode.pictogram.tabletlibrary.gui.communicator.V
OCA
"
android:padding=
"@dimen/small_padding"
>
android:padding=
"@dimen/small_padding"
>
<RelativeLayout
<RelativeLayout
...
...
android/Pictogram/tabletlibrary/src/main/res/layout/activity_pictogram_big.xml
View file @
4cb773c3
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
android:orientation=
"horizontal"
android:orientation=
"horizontal"
android:background=
"#BDBDBD"
android:background=
"#BDBDBD"
android:keepScreenOn=
"true"
android:keepScreenOn=
"true"
tools:context=
"com.yottacode.pictogram.tabletlibrary.gui.communicator.V
ocabularyViewer
"
tools:context=
"com.yottacode.pictogram.tabletlibrary.gui.communicator.V
OCA
"
android:padding=
"@dimen/small_padding"
>
android:padding=
"@dimen/small_padding"
>
<RelativeLayout
<RelativeLayout
...
...
android/Pictogram/tabletlibrary/tabletlibrary.iml
View file @
4cb773c3
...
@@ -62,13 +62,6 @@
...
@@ -62,13 +62,6 @@
<sourceFolder
url=
"file://$MODULE_DIR$/src/main/java"
isTestSource=
"false"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/main/java"
isTestSource=
"false"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/main/rs"
isTestSource=
"false"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/main/rs"
isTestSource=
"false"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/main/shaders"
isTestSource=
"false"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/main/shaders"
isTestSource=
"false"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTest/res"
type=
"java-test-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTest/resources"
type=
"java-test-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTest/assets"
type=
"java-test-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTest/aidl"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTest/java"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTest/rs"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTest/shaders"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/test/res"
type=
"java-test-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/test/res"
type=
"java-test-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/test/resources"
type=
"java-test-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/test/resources"
type=
"java-test-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/test/assets"
type=
"java-test-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/test/assets"
type=
"java-test-resource"
/>
...
@@ -76,6 +69,13 @@
...
@@ -76,6 +69,13 @@
<sourceFolder
url=
"file://$MODULE_DIR$/src/test/java"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/test/java"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/test/rs"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/test/rs"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/test/shaders"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/test/shaders"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTest/res"
type=
"java-test-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTest/resources"
type=
"java-test-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTest/assets"
type=
"java-test-resource"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTest/aidl"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTest/java"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTest/rs"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTest/shaders"
isTestSource=
"true"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/annotations"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/annotations"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/blame"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/blame"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/bundles"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/bundles"
/>
...
@@ -121,5 +121,16 @@
...
@@ -121,5 +121,16 @@
<orderEntry
type=
"library"
exported=
""
name=
"play-services-ads-9.2.1"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
name=
"play-services-ads-9.2.1"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
name=
"play-services-ads-lite-9.2.1"
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=
"module"
module-name=
"commonlibrary"
exported=
""
/>
<orderEntry
type=
"library"
exported=
""
name=
"okhttp-ws-2.3.0"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
name=
"socket.io-client-0.5.0"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
name=
"okhttp-2.3.0"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
name=
"support-annotations-23.0.0"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
name=
"okio-1.3.0"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
name=
"gson-2.3"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
name=
"engine.io-client-0.5.0"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
name=
"appcompat-v7-21.0.3"
level=
"project"
/>
<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"
/>
</component>
</component>
</module>
</module>
\ No newline at end of file
android/Pictogram/yotta_tablet/src/main/AndroidManifest.xml
View file @
4cb773c3
...
@@ -50,7 +50,7 @@
...
@@ -50,7 +50,7 @@
android:label=
"@string/title_activity_login_activity_fragments"
android:label=
"@string/title_activity_login_activity_fragments"
android:screenOrientation=
"landscape"
/>
android:screenOrientation=
"landscape"
/>
<activity
<activity
android:name=
"com.yottacode.pictogram.tabletlibrary.gui.communicator.V
ocabularyViewer
"
android:name=
"com.yottacode.pictogram.tabletlibrary.gui.communicator.V
OCA
"
android:exported=
"true"
android:exported=
"true"
android:label=
"@string/app_name"
android:label=
"@string/app_name"
android:launchMode=
"singleTop"
android:launchMode=
"singleTop"
...
...
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