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
395dd167
authored
Jan 21, 2017
by
Fernando Martínez Santiago
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
refactorizando paquete gui (hay que revisar pictogramActivity)
implementada funcionalidad "entrega de tira"
parent
7814333b
Show whitespace changes
Inline
Side-by-side
Showing
27 changed files
with
77 additions
and
77 deletions
android/Pictogram/supervisor_tablet/src/main/AndroidManifest.xml
android/Pictogram/supervisor_tablet/src/main/java/com/yottacode/pictogram/supervisor_tablet/gui/Supervisor_SerialActivity.java
android/Pictogram/tabletlibrary/build.gradle
android/Pictogram/tabletlibrary/src/main/java/com/yottacode/pictogram/tabletlibrary/gui/PictoGridAdapter.java → android/Pictogram/tabletlibrary/src/main/java/com/yottacode/pictogram/tabletlibrary/gui/communicator/PictoGridAdapter.java
android/Pictogram/tabletlibrary/src/main/java/com/yottacode/pictogram/tabletlibrary/gui/PictoItemViewGenerator.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/PictogramActivity.java → android/Pictogram/tabletlibrary/src/main/java/com/yottacode/pictogram/tabletlibrary/gui/communicator/PictogramActivity.java
android/Pictogram/tabletlibrary/src/main/java/com/yottacode/pictogram/tabletlibrary/gui/RadialMenuWidget.java → android/Pictogram/tabletlibrary/src/main/java/com/yottacode/pictogram/tabletlibrary/gui/communicator/RadialMenuWidget.java
android/Pictogram/tabletlibrary/src/main/java/com/yottacode/pictogram/tabletlibrary/gui/TapeAdapter.java → android/Pictogram/tabletlibrary/src/main/java/com/yottacode/pictogram/tabletlibrary/gui/communicator/TapeAdapter.java
android/Pictogram/tabletlibrary/src/main/java/com/yottacode/pictogram/tabletlibrary/gui/customViewGroup.java → android/Pictogram/tabletlibrary/src/main/java/com/yottacode/pictogram/tabletlibrary/gui/communicator/customViewGroup.java
android/Pictogram/tabletlibrary/src/main/java/com/yottacode/pictogram/tabletlibrary/gui/CustomList.java → android/Pictogram/tabletlibrary/src/main/java/com/yottacode/pictogram/tabletlibrary/gui/login/CustomList.java
android/Pictogram/tabletlibrary/src/main/java/com/yottacode/pictogram/tabletlibrary/gui/CustomListLogin.java → android/Pictogram/tabletlibrary/src/main/java/com/yottacode/pictogram/tabletlibrary/gui/login/CustomListLogin.java
android/Pictogram/tabletlibrary/src/main/java/com/yottacode/pictogram/tabletlibrary/gui/LoginActivity.java → android/Pictogram/tabletlibrary/src/main/java/com/yottacode/pictogram/tabletlibrary/gui/login/LoginActivity.java
android/Pictogram/tabletlibrary/src/main/java/com/yottacode/pictogram/tabletlibrary/gui/MainActivity.java → android/Pictogram/tabletlibrary/src/main/java/com/yottacode/pictogram/tabletlibrary/gui/login/MainActivity.java
android/Pictogram/tabletlibrary/src/main/java/com/yottacode/pictogram/tabletlibrary/gui/SerialActivity.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/SplashScreenActivity.java → android/Pictogram/tabletlibrary/src/main/java/com/yottacode/pictogram/tabletlibrary/gui/login/SplashScreenActivity.java
android/Pictogram/tabletlibrary/src/main/java/com/yottacode/pictogram/tabletlibrary/gui/StudentFragmentGrid.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_login.xml
android/Pictogram/tabletlibrary/src/main/res/layout/activity_pictogram.xml
android/Pictogram/tabletlibrary/src/main/res/layout/activity_pictogram_big.xml
android/Pictogram/tabletlibrary/src/main/res/layout/activity_splash_screen.xml
android/Pictogram/yotta_tablet/build.gradle
android/Pictogram/yotta_tablet/src/main/AndroidManifest.xml
android/Pictogram/yotta_tablet/src/main/java/com/yottacode/pictogram/yotta_tablet/kiosk/BootReceiver.java
android/Pictogram/yotta_tablet/src/main/java/com/yottacode/pictogram/yotta_tablet/kiosk/KioskService.java
android/Pictogram/supervisor_tablet/src/main/AndroidManifest.xml
View file @
395dd167
...
@@ -26,7 +26,7 @@
...
@@ -26,7 +26,7 @@
android:label=
"@string/app_name"
android:label=
"@string/app_name"
android:theme=
"@style/AppTheme"
>
android:theme=
"@style/AppTheme"
>
<activity
<activity
android:name=
"com.yottacode.pictogram.tabletlibrary.gui.SplashScreenActivity"
android:name=
"com.yottacode.pictogram.tabletlibrary.gui.
login.
SplashScreenActivity"
android:label=
"@string/app_name"
android:label=
"@string/app_name"
android:screenOrientation=
"landscape"
>
android:screenOrientation=
"landscape"
>
<intent-filter>
<intent-filter>
...
@@ -36,7 +36,7 @@
...
@@ -36,7 +36,7 @@
</intent-filter>
</intent-filter>
</activity>
</activity>
<activity
<activity
android:name=
"com.yottacode.pictogram.tabletlibrary.gui.MainActivity"
android:name=
"com.yottacode.pictogram.tabletlibrary.gui.
login.
MainActivity"
android:label=
"@string/app_name"
android:label=
"@string/app_name"
android:screenOrientation=
"landscape"
/>
android:screenOrientation=
"landscape"
/>
<activity
<activity
...
@@ -44,12 +44,12 @@
...
@@ -44,12 +44,12 @@
android:label=
"@string/title_activity_serial"
android:label=
"@string/title_activity_serial"
android:screenOrientation=
"landscape"
/>
android:screenOrientation=
"landscape"
/>
<activity
<activity
android:name=
"com.yottacode.pictogram.tabletlibrary.gui.LoginActivity"
android:name=
"com.yottacode.pictogram.tabletlibrary.gui.
login.
LoginActivity"
android:exported=
"true"
android:exported=
"true"
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.PictogramActivity"
android:name=
"com.yottacode.pictogram.tabletlibrary.gui.
communicator.
PictogramActivity"
android:exported=
"true"
android:exported=
"true"
android:label=
"@string/app_name"
android:label=
"@string/app_name"
android:launchMode=
"singleTop"
android:launchMode=
"singleTop"
...
...
android/Pictogram/supervisor_tablet/src/main/java/com/yottacode/pictogram/supervisor_tablet/gui/Supervisor_SerialActivity.java
View file @
395dd167
...
@@ -3,7 +3,7 @@ package com.yottacode.pictogram.supervisor_tablet.gui;
...
@@ -3,7 +3,7 @@ package com.yottacode.pictogram.supervisor_tablet.gui;
import
android.app.Activity
;
import
android.app.Activity
;
import
com.yottacode.pictogram.supervisor_tablet.R
;
import
com.yottacode.pictogram.supervisor_tablet.R
;
import
com.yottacode.pictogram.tabletlibrary.gui.SerialActivity
;
import
com.yottacode.pictogram.tabletlibrary.gui.
login.
SerialActivity
;
import
com.yottacode.tools.GUITools
;
import
com.yottacode.tools.GUITools
;
/**
/**
...
...
android/Pictogram/tabletlibrary/build.gradle
View file @
395dd167
...
@@ -8,7 +8,7 @@ android {
...
@@ -8,7 +8,7 @@ android {
targetSdkVersion
22
targetSdkVersion
22
versionCode
1
versionCode
1
versionName
"1.0"
versionName
"1.0"
resValue
"string"
,
"SerialClass"
,
"com.yottacode.pictogram.tabletlibrary.gui.SerialActivity"
resValue
"string"
,
"SerialClass"
,
"com.yottacode.pictogram.tabletlibrary.gui.
login.
SerialActivity"
resValue
"integer"
,
"rows"
,
"5"
resValue
"integer"
,
"rows"
,
"5"
resValue
"integer"
,
"columns"
,
"10"
resValue
"integer"
,
"columns"
,
"10"
resValue
"integer"
,
"rows_big"
,
"4"
resValue
"integer"
,
"rows_big"
,
"4"
...
...
android/Pictogram/tabletlibrary/src/main/java/com/yottacode/pictogram/tabletlibrary/gui/PictoGridAdapter.java
→
android/Pictogram/tabletlibrary/src/main/java/com/yottacode/pictogram/tabletlibrary/gui/
communicator/
PictoGridAdapter.java
View file @
395dd167
package
com
.
yottacode
.
pictogram
.
tabletlibrary
.
gui
;
package
com
.
yottacode
.
pictogram
.
tabletlibrary
.
gui
.
communicator
;
import
android.view.View
;
import
android.view.View
;
import
android.view.ViewGroup
;
import
android.view.ViewGroup
;
...
...
android/Pictogram/tabletlibrary/src/main/java/com/yottacode/pictogram/tabletlibrary/gui/PictoItemViewGenerator.java
→
android/Pictogram/tabletlibrary/src/main/java/com/yottacode/pictogram/tabletlibrary/gui/
communicator/
PictoItemViewGenerator.java
View file @
395dd167
package
com
.
yottacode
.
pictogram
.
tabletlibrary
.
gui
;
package
com
.
yottacode
.
pictogram
.
tabletlibrary
.
gui
.
communicator
;
import
android.content.Context
;
import
android.content.Context
;
import
android.graphics.Bitmap
;
import
android.graphics.Bitmap
;
...
@@ -180,21 +180,19 @@ public class PictoItemViewGenerator {
...
@@ -180,21 +180,19 @@ public class PictoItemViewGenerator {
pictoImage
=
(
ImageView
)
convertView
.
findViewById
(
R
.
id
.
picto_grid_item_image
);
pictoImage
=
(
ImageView
)
convertView
.
findViewById
(
R
.
id
.
picto_grid_item_image
);
redCrossImage
=
(
ImageView
)
convertView
.
findViewById
(
R
.
id
.
picto_grid_item_redcross
);
redCrossImage
=
(
ImageView
)
convertView
.
findViewById
(
R
.
id
.
picto_grid_item_redcross
);
}
}
layoutWrapper
.
setVisibility
(
View
.
GONE
);
layoutWrapper
.
setBackground
(
null
);
layoutWrapper
.
setBackground
(
null
);
layoutWrapper
.
setAlpha
(
0.25f
);
layoutWrapper
.
setAlpha
(
PCBcontext
.
getPcbdb
().
getCurrentUser
().
is_supervisor
()
?
0.25f
:
0
);
layout
.
setBackgroundColor
(
convertView
.
getResources
()
layout
.
setBackgroundColor
(
convertView
.
getResources
()
.
getColor
(
R
.
color
.
picto_default_background
));
.
getColor
(
R
.
color
.
picto_default_background
));
redCrossImage
.
setVisibility
(
View
.
GONE
);
redCrossImage
.
setVisibility
(
View
.
GONE
);
pictoImage
.
setScaleX
(
1.0f
);
// pictoImage.setVisibility(View.GONE);
pictoImage
.
setScaleY
(
1.0f
);
// layoutWrapper.setVisibility(View.GONE);
pictoImage
.
setVisibility
(
View
.
GONE
);
if
(
picto
==
null
)
{
if
(
picto
==
null
)
{
pictoImage
.
setImageBitmap
(
null
);
if
(
PCBcontext
.
getPcbdb
().
getCurrentUser
().
is_supervisor
())
{
if
(
PCBcontext
.
getPcbdb
().
getCurrentUser
().
is_supervisor
())
{
layoutWrapper
.
setVisibility
(
View
.
VISIBLE
);
layoutWrapper
.
setBackground
(
convertView
.
getResources
()
layoutWrapper
.
setBackground
(
convertView
.
getResources
()
.
getDrawable
(
R
.
drawable
.
picto_grid_item_border
));
.
getDrawable
(
R
.
drawable
.
picto_grid_item_border
));
}
}
}
else
{
}
else
{
if
(!
picto
.
is_invisible
())
{
if
(!
picto
.
is_invisible
())
{
...
...
android/Pictogram/tabletlibrary/src/main/java/com/yottacode/pictogram/tabletlibrary/gui/PictogramActivity.java
→
android/Pictogram/tabletlibrary/src/main/java/com/yottacode/pictogram/tabletlibrary/gui/
communicator/
PictogramActivity.java
View file @
395dd167
package
com
.
yottacode
.
pictogram
.
tabletlibrary
.
gui
;
package
com
.
yottacode
.
pictogram
.
tabletlibrary
.
gui
.
communicator
;
import
android.animation.Animator
;
import
android.animation.Animator
;
import
android.animation.ObjectAnimator
;
import
android.animation.ObjectAnimator
;
import
android.animation.ValueAnimator
;
import
android.animation.ValueAnimator
;
import
android.annotation.TargetApi
;
import
android.app.Activity
;
import
android.app.Activity
;
import
android.app.AlertDialog
;
import
android.app.AlertDialog
;
import
android.content.ClipData
;
import
android.content.ClipData
;
...
@@ -17,6 +18,7 @@ import android.graphics.PorterDuff;
...
@@ -17,6 +18,7 @@ import android.graphics.PorterDuff;
import
android.media.Ringtone
;
import
android.media.Ringtone
;
import
android.media.RingtoneManager
;
import
android.media.RingtoneManager
;
import
android.net.Uri
;
import
android.net.Uri
;
import
android.os.Build
;
import
android.os.Bundle
;
import
android.os.Bundle
;
import
android.provider.MediaStore
;
import
android.provider.MediaStore
;
import
android.speech.tts.UtteranceProgressListener
;
import
android.speech.tts.UtteranceProgressListener
;
...
@@ -59,6 +61,7 @@ import com.yottacode.pictogram.net.PictoUploader;
...
@@ -59,6 +61,7 @@ import com.yottacode.pictogram.net.PictoUploader;
import
com.yottacode.pictogram.net.websockets.ActionTalk
;
import
com.yottacode.pictogram.net.websockets.ActionTalk
;
import
com.yottacode.pictogram.net.websockets.VocabularyTalk
;
import
com.yottacode.pictogram.net.websockets.VocabularyTalk
;
import
com.yottacode.pictogram.tabletlibrary.R
;
import
com.yottacode.pictogram.tabletlibrary.R
;
import
com.yottacode.pictogram.tabletlibrary.gui.login.SerialActivity
;
import
com.yottacode.pictogram.tabletlibrary.gui.session.SessionActivity
;
import
com.yottacode.pictogram.tabletlibrary.gui.session.SessionActivity
;
import
com.yottacode.pictogram.tabletlibrary.net.NetServiceTablet
;
import
com.yottacode.pictogram.tabletlibrary.net.NetServiceTablet
;
import
com.yottacode.pictogram.tools.Img
;
import
com.yottacode.pictogram.tools.Img
;
...
@@ -132,8 +135,10 @@ public class PictogramActivity extends Activity implements VocabularyTalk.iVocab
...
@@ -132,8 +135,10 @@ public class PictogramActivity extends Activity implements VocabularyTalk.iVocab
private
RadialMenuWidget
PieMenu
;
private
RadialMenuWidget
PieMenu
;
private
ImageView
detail
;
private
ImageView
detail
;
private
RelativeLayout
ll
;
private
RelativeLayout
ll
;
private
boolean
tape_delivered
=
false
;
@TargetApi
(
Build
.
VERSION_CODES
.
M
)
@Override
@Override
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
super
.
onCreate
(
savedInstanceState
);
...
@@ -283,7 +288,6 @@ public class PictogramActivity extends Activity implements VocabularyTalk.iVocab
...
@@ -283,7 +288,6 @@ public class PictogramActivity extends Activity implements VocabularyTalk.iVocab
startTTS
();
startTTS
();
setFeedback
(
new
View
[]{
deleteButton
,
ttsButton
,
this
.
showPictoCategoriesViewButton
,
this
.
pictoCategoryGridView
,
this
.
pictoMainGridView
});
setFeedback
(
new
View
[]{
deleteButton
,
ttsButton
,
this
.
showPictoCategoriesViewButton
,
this
.
pictoCategoryGridView
,
this
.
pictoMainGridView
});
}
}
private
void
setFeedback
(
View
views
[])
{
private
void
setFeedback
(
View
views
[])
{
boolean
vibration
=
PCBcontext
.
getPcbdb
().
getCurrentUser
().
input_feedback_on
(
User
.
JSON_STUDENT_INPUT_FEEDBACK
.
VIBRATION
);
boolean
vibration
=
PCBcontext
.
getPcbdb
().
getCurrentUser
().
input_feedback_on
(
User
.
JSON_STUDENT_INPUT_FEEDBACK
.
VIBRATION
);
boolean
click
=
PCBcontext
.
getPcbdb
().
getCurrentUser
().
input_feedback_on
(
User
.
JSON_STUDENT_INPUT_FEEDBACK
.
BEEP
);
boolean
click
=
PCBcontext
.
getPcbdb
().
getCurrentUser
().
input_feedback_on
(
User
.
JSON_STUDENT_INPUT_FEEDBACK
.
BEEP
);
...
@@ -298,7 +302,6 @@ public class PictogramActivity extends Activity implements VocabularyTalk.iVocab
...
@@ -298,7 +302,6 @@ public class PictogramActivity extends Activity implements VocabularyTalk.iVocab
@Override
@Override
public
boolean
onTouch
(
View
v
,
MotionEvent
event
)
{
public
boolean
onTouch
(
View
v
,
MotionEvent
event
)
{
boolean
enable_haptic
;
boolean
enable_haptic
;
enable_haptic
=
!(
v
instanceof
GridView
);
enable_haptic
=
!(
v
instanceof
GridView
);
if
(!
enable_haptic
)
{
if
(!
enable_haptic
)
{
int
x
=
Math
.
round
(
event
.
getX
());
int
x
=
Math
.
round
(
event
.
getX
());
...
@@ -452,7 +455,6 @@ public class PictogramActivity extends Activity implements VocabularyTalk.iVocab
...
@@ -452,7 +455,6 @@ public class PictogramActivity extends Activity implements VocabularyTalk.iVocab
* if necesary.
* if necesary.
*/
*/
private
void
showPictoMainGridView
()
{
private
void
showPictoMainGridView
()
{
Log
.
d
(
LOG_TAG
,
"Showing pictoMainGridView"
);
this
.
pictoMainGridAdapter
.
clear
();
this
.
pictoMainGridAdapter
.
clear
();
this
.
pictoMainGridAdapter
.
addAll
(
this
.
sort
(
this
.
vocabulary
.
startSentence
()));
this
.
pictoMainGridAdapter
.
addAll
(
this
.
sort
(
this
.
vocabulary
.
startSentence
()));
...
@@ -472,8 +474,8 @@ public class PictogramActivity extends Activity implements VocabularyTalk.iVocab
...
@@ -472,8 +474,8 @@ public class PictogramActivity extends Activity implements VocabularyTalk.iVocab
* Hides the main category grid view and show a concrete category (this.currentCategory)
* Hides the main category grid view and show a concrete category (this.currentCategory)
*/
*/
private
void
hidePictoMainGridView
()
{
private
void
hidePictoMainGridView
()
{
Log
.
d
(
LOG_TAG
,
"Hiding pictoMainGridView"
);
if
(!
tape_delivered
)
{
this
.
pictoCategoryGridAdapter
.
clear
();
this
.
pictoCategoryGridAdapter
.
clear
();
this
.
pictoCategoryGridAdapter
.
addAll
(
this
.
sort
(
this
.
vocabulary
.
next
(
this
.
currentCategory
)));
this
.
pictoCategoryGridAdapter
.
addAll
(
this
.
sort
(
this
.
vocabulary
.
next
(
this
.
currentCategory
)));
this
.
pictoCategoryGridAdapter
.
notifyDataSetChanged
();
this
.
pictoCategoryGridAdapter
.
notifyDataSetChanged
();
...
@@ -481,7 +483,7 @@ public class PictogramActivity extends Activity implements VocabularyTalk.iVocab
...
@@ -481,7 +483,7 @@ public class PictogramActivity extends Activity implements VocabularyTalk.iVocab
if
(
this
.
currentCategory
.
get_color
()
!=
-
1
)
{
if
(
this
.
currentCategory
.
get_color
()
!=
-
1
)
{
this
.
pictoCategoryGridView
.
setBackgroundColor
(
this
.
currentCategory
.
get_color
());
this
.
pictoCategoryGridView
.
setBackgroundColor
(
this
.
currentCategory
.
get_color
());
}
}
}
this
.
pictoMainGridView
.
setEnabled
(
false
);
this
.
pictoMainGridView
.
setEnabled
(
false
);
this
.
pictoCategoryGridView
.
setEnabled
(
true
);
this
.
pictoCategoryGridView
.
setEnabled
(
true
);
...
@@ -537,10 +539,8 @@ public class PictogramActivity extends Activity implements VocabularyTalk.iVocab
...
@@ -537,10 +539,8 @@ public class PictogramActivity extends Activity implements VocabularyTalk.iVocab
*/
*/
for
(
int
i
=
0
;
i
<
maxRows
;
i
++)
{
for
(
int
i
=
0
;
i
<
maxRows
;
i
++)
{
for
(
int
j
=
0
;
j
<
maxColumns
;
j
++)
{
for
(
int
j
=
0
;
j
<
maxColumns
;
j
++)
if
(
mp
[
i
][
j
]
!=
null
)
ll
.
add
(
mp
[
i
][
j
]);
ll
.
add
(
mp
[
i
][
j
]);
else
ll
.
add
(
null
);
// Add the "blank picto" simulating an empty position
}
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
...
@@ -708,8 +708,6 @@ public class PictogramActivity extends Activity implements VocabularyTalk.iVocab
...
@@ -708,8 +708,6 @@ public class PictogramActivity extends Activity implements VocabularyTalk.iVocab
* Class used for dragging pictos to the tape
* Class used for dragging pictos to the tape
*/
*/
private
class
OnPictoDragListener
implements
View
.
OnDragListener
{
private
class
OnPictoDragListener
implements
View
.
OnDragListener
{
//Drawable normalShape = getResources().getDrawable(R.drawable.normal_shape);
//Drawable targetShape = getResources().getDrawable(R.drawable.target_shape);
@Override
@Override
public
boolean
onDrag
(
View
v
,
DragEvent
event
)
{
public
boolean
onDrag
(
View
v
,
DragEvent
event
)
{
...
@@ -719,24 +717,20 @@ public class PictogramActivity extends Activity implements VocabularyTalk.iVocab
...
@@ -719,24 +717,20 @@ public class PictogramActivity extends Activity implements VocabularyTalk.iVocab
//signal for the start of a drag and drop operation.
//signal for the start of a drag and drop operation.
case
DragEvent
.
ACTION_DRAG_STARTED
:
case
DragEvent
.
ACTION_DRAG_STARTED
:
// do nothing
// do nothing
Log
.
d
(
"Drag:"
,
"1 Drag started"
);
break
;
break
;
//the drag point has entered the bounding box of the View
//the drag point has entered the bounding box of the View
case
DragEvent
.
ACTION_DRAG_ENTERED
:
case
DragEvent
.
ACTION_DRAG_ENTERED
:
//v.setBackground(targetShape); //change the shape of the view
//v.setBackground(targetShape); //change the shape of the view
Log
.
d
(
"Drag:"
,
"2 Drag entered"
);
break
;
break
;
//the user has moved the drag shadow outside the bounding box of the View
//the user has moved the drag shadow outside the bounding box of the View
case
DragEvent
.
ACTION_DRAG_EXITED
:
case
DragEvent
.
ACTION_DRAG_EXITED
:
//v.setBackground(normalShape); //change the shape of the view back to normal
//v.setBackground(normalShape); //change the shape of the view back to normal
Log
.
d
(
"Drag:"
,
"3 Drag exited"
);
break
;
break
;
//drag shadow has been released,the drag point is within the bounding box of the View
//drag shadow has been released,the drag point is within the bounding box of the View
case
DragEvent
.
ACTION_DROP
:
case
DragEvent
.
ACTION_DROP
:
Log
.
d
(
"Drag:"
,
"4 Drop"
);
View
view
=
(
View
)
event
.
getLocalState
();
View
view
=
(
View
)
event
.
getLocalState
();
ViewGroup
viewgroup
=
(
ViewGroup
)
view
.
getParent
();
ViewGroup
viewgroup
=
(
ViewGroup
)
view
.
getParent
();
...
@@ -746,7 +740,6 @@ public class PictogramActivity extends Activity implements VocabularyTalk.iVocab
...
@@ -746,7 +740,6 @@ public class PictogramActivity extends Activity implements VocabularyTalk.iVocab
// if the view is the tape_grid_view, we accept the drag item
// if the view is the tape_grid_view, we accept the drag item
// Destino tape_grid_view y origen panel_grid_view
// Destino tape_grid_view y origen panel_grid_view
if
(
v
==
findViewById
(
R
.
id
.
tape_grid_view
)
&&
(
viewgroup
==
findViewById
(
R
.
id
.
picto_category_grid_view
)
||
viewgroup
==
findViewById
(
R
.
id
.
picto_main_grid_view
)))
{
if
(
v
==
findViewById
(
R
.
id
.
tape_grid_view
)
&&
(
viewgroup
==
findViewById
(
R
.
id
.
picto_category_grid_view
)
||
viewgroup
==
findViewById
(
R
.
id
.
picto_main_grid_view
)))
{
Picto
p
=
viewgroup
==
findViewById
(
R
.
id
.
picto_category_grid_view
)
?
pictoCategoryGridAdapter
.
getItem
(
position
)
Picto
p
=
viewgroup
==
findViewById
(
R
.
id
.
picto_category_grid_view
)
?
pictoCategoryGridAdapter
.
getItem
(
position
)
:
pictoMainGridAdapter
.
getItem
(
position
);
:
pictoMainGridAdapter
.
getItem
(
position
);
Log
.
d
(
"Drag:"
,
"Posición: "
+
position
+
" es categoria:"
+
p
.
is_category
());
Log
.
d
(
"Drag:"
,
"Posición: "
+
position
+
" es categoria:"
+
p
.
is_category
());
...
@@ -755,7 +748,6 @@ public class PictogramActivity extends Activity implements VocabularyTalk.iVocab
...
@@ -755,7 +748,6 @@ public class PictogramActivity extends Activity implements VocabularyTalk.iVocab
// Si el destino es el panel y el origen la cinta de frase
// Si el destino es el panel y el origen la cinta de frase
else
if
(
v
==
findViewById
(
R
.
id
.
picto_category_grid_view
)
&&
viewgroup
==
findViewById
(
R
.
id
.
tape_grid_view
))
{
else
if
(
v
==
findViewById
(
R
.
id
.
picto_category_grid_view
)
&&
viewgroup
==
findViewById
(
R
.
id
.
tape_grid_view
))
{
Log
.
d
(
"Drag:"
,
"Posición: "
+
position
);
Picto
p
=
tapeAdapter
.
getItem
(
position
);
Picto
p
=
tapeAdapter
.
getItem
(
position
);
tapeAdapter
.
deleteItem
(
position
);
tapeAdapter
.
deleteItem
(
position
);
tapeAdapter
.
notifyDataSetChanged
();
tapeAdapter
.
notifyDataSetChanged
();
...
@@ -765,27 +757,24 @@ public class PictogramActivity extends Activity implements VocabularyTalk.iVocab
...
@@ -765,27 +757,24 @@ public class PictogramActivity extends Activity implements VocabularyTalk.iVocab
//the drag and drop operation has concluded.
//the drag and drop operation has concluded.
case
DragEvent
.
ACTION_DRAG_ENDED
:
case
DragEvent
.
ACTION_DRAG_ENDED
:
Log
.
d
(
"Drag:"
,
"5 Drag ended"
);
// v.setBackground(normalShape); //go back to normal shape
// v.setBackground(normalShape); //go back to normal shape
default
:
default
:
break
;
break
;
}
}
return
tru
e
;
return
fals
e
;
}
}
}
}
/**
/**
f
* Class used for picto clicking feedback
* Class used for picto clicking feedback
*/
*/
private
class
OnPictoClickListener
implements
AdapterView
.
OnItemClickListener
{
private
class
OnPictoClickListener
implements
AdapterView
.
OnItemClickListener
{
@Override
@Override
public
void
onItemClick
(
AdapterView
<?>
parent
,
View
view
,
int
position
,
long
id
)
{
public
void
onItemClick
(
AdapterView
<?>
parent
,
View
view
,
int
position
,
long
id
)
{
Picto
p
=
getCurrentPictoGridAdapter
().
getItem
(
position
);
Picto
p
=
getCurrentPictoGridAdapter
().
getItem
(
position
);
Log
.
e
(
"clicklistener"
,
p
+(
p
==
null
?
"NULL"
:
p
.
toString
()+
" "
+
p
.
get_row
()));
if
(
p
!=
null
&&
p
.
get_id
()
!=
0
&&
!
p
.
is_invisible
()
&&
p
.
is_enabled
())
{
if
(
p
!=
null
&&
p
.
get_id
()
!=
0
&&
!
p
.
is_invisible
()
&&
p
.
is_enabled
())
{
Log
.
d
(
LOG_TAG
,
"Clic en picto: "
+
p
.
toString
());
p
.
set_mirror
(
false
,
false
);
p
.
set_mirror
(
false
,
false
);
// If the picto is a category
// If the picto is a category
...
@@ -797,9 +786,10 @@ public class PictogramActivity extends Activity implements VocabularyTalk.iVocab
...
@@ -797,9 +786,10 @@ public class PictogramActivity extends Activity implements VocabularyTalk.iVocab
}
else
if
(
tapeAdapter
.
getCount
()
<
PictogramActivity
.
this
.
maxInTape
)
{
}
else
if
(
tapeAdapter
.
getCount
()
<
PictogramActivity
.
this
.
maxInTape
)
{
addPictoWord
(
p
);
addPictoWord
(
p
);
}
}
}
else
if
(
p
==
null
&&
tapeAdapter
.
getCount
()>
0
)
{
}
tapeAdapter
.
endPlay
();
if
(
tape_delivered
)
{
showPictoMainGridView
();
tapeAdapter
.
clear
();
showOnlyTape
(
false
);
}
}
}
}
}
}
...
@@ -924,15 +914,15 @@ public class PictogramActivity extends Activity implements VocabularyTalk.iVocab
...
@@ -924,15 +914,15 @@ public class PictogramActivity extends Activity implements VocabularyTalk.iVocab
}
}
}
}
private
void
showOnlyTape
(
boolean
onlyTape
)
{
private
void
showOnlyTape
(
boolean
onlyTape
)
{
Log
.
e
(
"EEEE"
,
"e"
+
onlyTape
);
this
.
tape_delivered
=
onlyTape
;
if
(
onlyTape
)
{
if
(
onlyTape
)
{
if
(
this
.
pictoMainGridView
.
getAnimation
()
!=
this
.
hidePictoMainViewAnimation
)
hidePictoMainGridView
();
this
.
pictoMainGridView
.
startAnimation
(
this
.
hidePictoMainViewAnimation
);
this
.
pictoCategoryGridAdapter
.
clear
();
this
.
pictoCategoryGridAdapter
.
clear
();
this
.
pictoCategoryGridView
.
setBackgroundColor
(
Color
.
LTGRAY
);
this
.
pictoCategoryGridAdapter
.
addAll
(
this
.
sort
(
null
));
this
.
showPictoCategoriesViewButton
.
setVisibility
(
View
.
GONE
);
this
.
pictoCategoryGridAdapter
.
notifyDataSetChanged
();
this
.
pictoCategoryGridAdapter
.
notifyDataSetChanged
();
this
.
pictoCategoryGridView
.
setBackgroundColor
(
Color
.
GRAY
);
this
.
showPictoCategoriesViewButton
.
setVisibility
(
View
.
GONE
);
}
}
else
{
else
{
this
.
showPictoCategoriesViewButton
.
setVisibility
(
View
.
VISIBLE
);
this
.
showPictoCategoriesViewButton
.
setVisibility
(
View
.
VISIBLE
);
...
@@ -957,6 +947,7 @@ private void showOnlyTape(boolean onlyTape) {
...
@@ -957,6 +947,7 @@ private void showOnlyTape(boolean onlyTape) {
tapeAdapter
.
deleteLastView
();
tapeAdapter
.
deleteLastView
();
tapeAdapter
.
notifyDataSetChanged
();
tapeAdapter
.
notifyDataSetChanged
();
}
}
if
(!
tapeAdapter
.
hasElements
()
&&
tape_delivered
)
showOnlyTape
(
false
);
}
}
}
}
...
@@ -1169,7 +1160,6 @@ private void showOnlyTape(boolean onlyTape) {
...
@@ -1169,7 +1160,6 @@ private void showOnlyTape(boolean onlyTape) {
Intent
nextActivity
=
null
;
Intent
nextActivity
=
null
;
Intent
intent
=
getIntent
();
Intent
intent
=
getIntent
();
boolean
student_view
=
intent
.
getBooleanExtra
(
"student_view"
,
false
);
boolean
student_view
=
intent
.
getBooleanExtra
(
"student_view"
,
false
);
if
(
PCBcontext
.
getPcbdb
()!=
null
&&
(
PCBcontext
.
getPcbdb
().
getCurrentUser
().
is_supervisor
()
||
student_view
))
{
if
(
PCBcontext
.
getPcbdb
()!=
null
&&
(
PCBcontext
.
getPcbdb
().
getCurrentUser
().
is_supervisor
()
||
student_view
))
{
switch
(
event
.
getAction
())
{
switch
(
event
.
getAction
())
{
case
MotionEvent
.
ACTION_DOWN
:
case
MotionEvent
.
ACTION_DOWN
:
...
@@ -1207,6 +1197,7 @@ private void showOnlyTape(boolean onlyTape) {
...
@@ -1207,6 +1197,7 @@ private void showOnlyTape(boolean onlyTape) {
break
;
break
;
}
}
}
}
return
super
.
dispatchTouchEvent
(
event
);
return
super
.
dispatchTouchEvent
(
event
);
}
}
...
...
android/Pictogram/tabletlibrary/src/main/java/com/yottacode/pictogram/tabletlibrary/gui/RadialMenuWidget.java
→
android/Pictogram/tabletlibrary/src/main/java/com/yottacode/pictogram/tabletlibrary/gui/
communicator/
RadialMenuWidget.java
View file @
395dd167
package
com
.
yottacode
.
pictogram
.
tabletlibrary
.
gui
;
package
com
.
yottacode
.
pictogram
.
tabletlibrary
.
gui
.
communicator
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
...
...
android/Pictogram/tabletlibrary/src/main/java/com/yottacode/pictogram/tabletlibrary/gui/TapeAdapter.java
→
android/Pictogram/tabletlibrary/src/main/java/com/yottacode/pictogram/tabletlibrary/gui/
communicator/
TapeAdapter.java
View file @
395dd167
package
com
.
yottacode
.
pictogram
.
tabletlibrary
.
gui
;
package
com
.
yottacode
.
pictogram
.
tabletlibrary
.
gui
.
communicator
;
import
android.annotation.TargetApi
;
import
android.annotation.TargetApi
;
...
@@ -67,10 +67,13 @@ public class TapeAdapter extends BaseAdapter {
...
@@ -67,10 +67,13 @@ public class TapeAdapter extends BaseAdapter {
// ELIMINAR TODOS LOS ITEMS DEL ADAPTADOR
// ELIMINAR TODOS LOS ITEMS DEL ADAPTADOR
public
void
endPlay
()
{
public
void
endPlay
()
{
if
(
PCBcontext
.
getPcbdb
().
getCurrentUser
().
delete_tape_after_delivery
())
if
(
PCBcontext
.
getPcbdb
().
getCurrentUser
().
delete_tape_after_delivery
())
pictoLinkedList
.
clear
();
clear
();
play
=
false
;
play
=
false
;
}
}
public
void
clear
()
{
pictoLinkedList
.
clear
();
}
// DEVUELVE TODOS LOS ELEMENTOS
// DEVUELVE TODOS LOS ELEMENTOS
public
LinkedList
<
Picto
>
getAll
()
{
public
LinkedList
<
Picto
>
getAll
()
{
return
pictoLinkedList
;
return
pictoLinkedList
;
...
...
android/Pictogram/tabletlibrary/src/main/java/com/yottacode/pictogram/tabletlibrary/gui/customViewGroup.java
→
android/Pictogram/tabletlibrary/src/main/java/com/yottacode/pictogram/tabletlibrary/gui/c
ommunicator/c
ustomViewGroup.java
View file @
395dd167
package
com
.
yottacode
.
pictogram
.
tabletlibrary
.
gui
;
package
com
.
yottacode
.
pictogram
.
tabletlibrary
.
gui
.
communicator
;
import
android.content.Context
;
import
android.content.Context
;
import
android.util.Log
;
import
android.util.Log
;
...
...
android/Pictogram/tabletlibrary/src/main/java/com/yottacode/pictogram/tabletlibrary/gui/CustomList.java
→
android/Pictogram/tabletlibrary/src/main/java/com/yottacode/pictogram/tabletlibrary/gui/
login/
CustomList.java
View file @
395dd167
package
com
.
yottacode
.
pictogram
.
tabletlibrary
.
gui
;
package
com
.
yottacode
.
pictogram
.
tabletlibrary
.
gui
.
login
;
import
android.app.Activity
;
import
android.app.Activity
;
import
android.graphics.Bitmap
;
import
android.graphics.Bitmap
;
...
...
android/Pictogram/tabletlibrary/src/main/java/com/yottacode/pictogram/tabletlibrary/gui/CustomListLogin.java
→
android/Pictogram/tabletlibrary/src/main/java/com/yottacode/pictogram/tabletlibrary/gui/
login/
CustomListLogin.java
View file @
395dd167
package
com
.
yottacode
.
pictogram
.
tabletlibrary
.
gui
;
package
com
.
yottacode
.
pictogram
.
tabletlibrary
.
gui
.
login
;
import
android.app.Activity
;
import
android.app.Activity
;
import
android.graphics.Bitmap
;
import
android.graphics.Bitmap
;
...
...
android/Pictogram/tabletlibrary/src/main/java/com/yottacode/pictogram/tabletlibrary/gui/LoginActivity.java
→
android/Pictogram/tabletlibrary/src/main/java/com/yottacode/pictogram/tabletlibrary/gui/
login/
LoginActivity.java
View file @
395dd167
package
com
.
yottacode
.
pictogram
.
tabletlibrary
.
gui
;
package
com
.
yottacode
.
pictogram
.
tabletlibrary
.
gui
.
login
;
import
android.annotation.TargetApi
;
import
android.annotation.TargetApi
;
import
android.content.Intent
;
import
android.content.Intent
;
...
@@ -15,6 +15,7 @@ import android.widget.TextView;
...
@@ -15,6 +15,7 @@ import android.widget.TextView;
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.login.SerialActivity
;
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
;
...
...
android/Pictogram/tabletlibrary/src/main/java/com/yottacode/pictogram/tabletlibrary/gui/MainActivity.java
→
android/Pictogram/tabletlibrary/src/main/java/com/yottacode/pictogram/tabletlibrary/gui/
login/
MainActivity.java
View file @
395dd167
package
com
.
yottacode
.
pictogram
.
tabletlibrary
.
gui
;
package
com
.
yottacode
.
pictogram
.
tabletlibrary
.
gui
.
login
;
import
android.app.Activity
;
import
android.app.Activity
;
import
android.content.Intent
;
import
android.content.Intent
;
...
@@ -10,6 +10,7 @@ import android.view.Window;
...
@@ -10,6 +10,7 @@ import android.view.Window;
import
android.view.WindowManager
;
import
android.view.WindowManager
;
import
com.yottacode.pictogram.tabletlibrary.R
;
import
com.yottacode.pictogram.tabletlibrary.R
;
import
com.yottacode.pictogram.tabletlibrary.gui.login.SerialActivity
;
import
com.yottacode.pictogram.tools.PCBcontext
;
import
com.yottacode.pictogram.tools.PCBcontext
;
public
class
MainActivity
extends
Activity
{
public
class
MainActivity
extends
Activity
{
...
...
android/Pictogram/tabletlibrary/src/main/java/com/yottacode/pictogram/tabletlibrary/gui/SerialActivity.java
→
android/Pictogram/tabletlibrary/src/main/java/com/yottacode/pictogram/tabletlibrary/gui/
login/
SerialActivity.java
View file @
395dd167
package
com
.
yottacode
.
pictogram
.
tabletlibrary
.
gui
;
package
com
.
yottacode
.
pictogram
.
tabletlibrary
.
gui
.
login
;
import
android.app.Activity
;
import
android.app.Activity
;
import
android.content.Context
;
import
android.content.Context
;
...
@@ -20,6 +20,9 @@ import android.widget.ListView;
...
@@ -20,6 +20,9 @@ import android.widget.ListView;
import
com.yottacode.pictogram.dao.User
;
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.PictogramActivity
;
import
com.yottacode.pictogram.tabletlibrary.gui.login.CustomListLogin
;
import
com.yottacode.pictogram.tabletlibrary.gui.login.LoginActivity
;
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
;
...
...
android/Pictogram/tabletlibrary/src/main/java/com/yottacode/pictogram/tabletlibrary/gui/SplashScreenActivity.java
→
android/Pictogram/tabletlibrary/src/main/java/com/yottacode/pictogram/tabletlibrary/gui/
login/
SplashScreenActivity.java
View file @
395dd167
package
com
.
yottacode
.
pictogram
.
tabletlibrary
.
gui
;
package
com
.
yottacode
.
pictogram
.
tabletlibrary
.
gui
.
login
;
import
android.app.Activity
;
import
android.app.Activity
;
...
...
android/Pictogram/tabletlibrary/src/main/java/com/yottacode/pictogram/tabletlibrary/gui/StudentFragmentGrid.java
→
android/Pictogram/tabletlibrary/src/main/java/com/yottacode/pictogram/tabletlibrary/gui/
login/
StudentFragmentGrid.java
View file @
395dd167
package
com
.
yottacode
.
pictogram
.
tabletlibrary
.
gui
;
package
com
.
yottacode
.
pictogram
.
tabletlibrary
.
gui
.
login
;
import
android.app.Fragment
;
import
android.app.Fragment
;
import
android.app.ProgressDialog
;
import
android.app.ProgressDialog
;
...
@@ -17,6 +17,7 @@ import com.yottacode.net.RestapiWrapper;
...
@@ -17,6 +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.PictogramActivity
;
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
;
...
...
android/Pictogram/tabletlibrary/src/main/java/com/yottacode/pictogram/tabletlibrary/gui/session/ListInstructionsFragment.java
View file @
395dd167
...
@@ -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.PictogramActivity
;
import
com.yottacode.pictogram.tabletlibrary.gui.
communicator.
PictogramActivity
;
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
;
...
...
android/Pictogram/tabletlibrary/src/main/java/com/yottacode/pictogram/tabletlibrary/gui/session/SessionActivity.java
View file @
395dd167
...
@@ -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.PictogramActivity
;
import
com.yottacode.pictogram.tabletlibrary.gui.
communicator.
PictogramActivity
;
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
;
...
...
android/Pictogram/tabletlibrary/src/main/java/com/yottacode/pictogram/tabletlibrary/net/NetServiceTablet.java
View file @
395dd167
...
@@ -8,8 +8,8 @@ import android.util.Log;
...
@@ -8,8 +8,8 @@ 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.PictogramActivity
;
import
com.yottacode.pictogram.tabletlibrary.gui.
communicator.
PictogramActivity
;
import
com.yottacode.pictogram.tabletlibrary.gui.SerialActivity
;
import
com.yottacode.pictogram.tabletlibrary.gui.
login.
SerialActivity
;
import
com.yottacode.pictogram.tools.PCBcontext
;
import
com.yottacode.pictogram.tools.PCBcontext
;
/**
/**
...
...
android/Pictogram/tabletlibrary/src/main/res/layout/activity_login.xml
View file @
395dd167
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
android:layout_width=
"fill_parent"
android:layout_width=
"fill_parent"
android:layout_height=
"fill_parent"
android:layout_height=
"fill_parent"
android:orientation=
"horizontal"
android:orientation=
"horizontal"
tools:context=
"com.yottacode.pictogram.tabletlibrary.gui.LoginActivity"
>
tools:context=
"com.yottacode.pictogram.tabletlibrary.gui.
login.
LoginActivity"
>
<RelativeLayout
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
...
@@ -82,7 +82,7 @@
...
@@ -82,7 +82,7 @@
<fragment
<fragment
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
class=
"com.yottacode.pictogram.tabletlibrary.gui.StudentFragmentGrid"
class=
"com.yottacode.pictogram.tabletlibrary.gui.
login.
StudentFragmentGrid"
android:id=
"@+id/loginStudentGrid"
android:id=
"@+id/loginStudentGrid"
android:layout_gravity=
"center"
android:layout_gravity=
"center"
tools:layout=
"@layout/fragment_new_student"
/>
tools:layout=
"@layout/fragment_new_student"
/>
...
...
android/Pictogram/tabletlibrary/src/main/res/layout/activity_pictogram.xml
View file @
395dd167
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
android:background=
"#BDBDBD"
android:background=
"#BDBDBD"
android:keepScreenOn=
"true"
android:keepScreenOn=
"true"
android:id=
"@+id/pictogramLayout"
android:id=
"@+id/pictogramLayout"
tools:context=
"com.yottacode.pictogram.tabletlibrary.gui.PictogramActivity"
tools:context=
"com.yottacode.pictogram.tabletlibrary.gui.
communicator.
PictogramActivity"
android:padding=
"@dimen/small_padding"
>
android:padding=
"@dimen/small_padding"
>
<!-- android:keepScreenOn - To keep the screen bright as long as the app is visible (also forever) -->
<!-- android:keepScreenOn - To keep the screen bright as long as the app is visible (also forever) -->
...
...
android/Pictogram/tabletlibrary/src/main/res/layout/activity_pictogram_big.xml
View file @
395dd167
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
android:background=
"#BDBDBD"
android:background=
"#BDBDBD"
android:keepScreenOn=
"true"
android:keepScreenOn=
"true"
android:id=
"@+id/pictogramLayout"
android:id=
"@+id/pictogramLayout"
tools:context=
"com.yottacode.pictogram.tabletlibrary.gui.PictogramActivity"
tools:context=
"com.yottacode.pictogram.tabletlibrary.gui.
communicator.
PictogramActivity"
android:padding=
"@dimen/small_padding"
>
android:padding=
"@dimen/small_padding"
>
<!-- android:keepScreenOn - To keep the screen bright as long as the app is visible (also forever) -->
<!-- android:keepScreenOn - To keep the screen bright as long as the app is visible (also forever) -->
...
...
android/Pictogram/tabletlibrary/src/main/res/layout/activity_splash_screen.xml
View file @
395dd167
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
android:paddingLeft=
"10dp"
android:paddingLeft=
"10dp"
android:paddingRight=
"15dp"
android:paddingRight=
"15dp"
android:orientation=
"vertical"
android:orientation=
"vertical"
tools:context=
"com.yottacode.pictogram.tabletlibrary.gui.SplashScreenActivity"
>
tools:context=
"com.yottacode.pictogram.tabletlibrary.gui.
login.
SplashScreenActivity"
>
<ImageView
<ImageView
android:layout_width=
"400px"
android:layout_width=
"400px"
...
...
android/Pictogram/yotta_tablet/build.gradle
View file @
395dd167
...
@@ -18,7 +18,7 @@ android {
...
@@ -18,7 +18,7 @@ android {
targetSdkVersion
22
targetSdkVersion
22
versionCode
1
versionCode
1
versionName
"1.0"
versionName
"1.0"
resValue
"string"
,
"SerialClass"
,
"com.yottacode.pictogram.tabletlibrary.gui.SerialActivity"
resValue
"string"
,
"SerialClass"
,
"com.yottacode.pictogram.tabletlibrary.gui.
login.
SerialActivity"
// signingConfig signingConfigs.config
// signingConfig signingConfigs.config
}
}
productFlavors
{
productFlavors
{
...
...
android/Pictogram/yotta_tablet/src/main/AndroidManifest.xml
View file @
395dd167
...
@@ -27,7 +27,7 @@
...
@@ -27,7 +27,7 @@
android:label=
"@string/app_name"
android:label=
"@string/app_name"
android:theme=
"@style/AppTheme"
>
android:theme=
"@style/AppTheme"
>
<activity
<activity
android:name=
"com.yottacode.pictogram.tabletlibrary.gui.SplashScreenActivity"
android:name=
"com.yottacode.pictogram.tabletlibrary.gui.
login.
SplashScreenActivity"
android:label=
"@string/app_name"
android:label=
"@string/app_name"
android:screenOrientation=
"landscape"
>
android:screenOrientation=
"landscape"
>
<intent-filter>
<intent-filter>
...
@@ -37,20 +37,20 @@
...
@@ -37,20 +37,20 @@
</intent-filter>
</intent-filter>
</activity>
</activity>
<activity
<activity
android:name=
"com.yottacode.pictogram.tabletlibrary.gui.MainActivity"
android:name=
"com.yottacode.pictogram.tabletlibrary.gui.
login.
MainActivity"
android:label=
"@string/app_name"
android:label=
"@string/app_name"
android:screenOrientation=
"landscape"
/>
android:screenOrientation=
"landscape"
/>
<activity
<activity
android:name=
"com.yottacode.pictogram.tabletlibrary.gui.SerialActivity"
android:name=
"com.yottacode.pictogram.tabletlibrary.gui.
login.
SerialActivity"
android:label=
"@string/title_activity_serial"
android:label=
"@string/title_activity_serial"
android:screenOrientation=
"landscape"
/>
android:screenOrientation=
"landscape"
/>
<activity
<activity
android:name=
"com.yottacode.pictogram.tabletlibrary.gui.LoginActivity"
android:name=
"com.yottacode.pictogram.tabletlibrary.gui.
login.
LoginActivity"
android:exported=
"true"
android:exported=
"true"
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.PictogramActivity"
android:name=
"com.yottacode.pictogram.tabletlibrary.gui.
communicator.
PictogramActivity"
android:exported=
"true"
android:exported=
"true"
android:label=
"@string/app_name"
android:label=
"@string/app_name"
android:launchMode=
"singleTop"
android:launchMode=
"singleTop"
...
...
android/Pictogram/yotta_tablet/src/main/java/com/yottacode/pictogram/yotta_tablet/kiosk/BootReceiver.java
View file @
395dd167
...
@@ -4,6 +4,8 @@ import android.content.BroadcastReceiver;
...
@@ -4,6 +4,8 @@ import android.content.BroadcastReceiver;
import
android.content.Context
;
import
android.content.Context
;
import
android.content.Intent
;
import
android.content.Intent
;
import
com.yottacode.pictogram.tabletlibrary.gui.login.MainActivity
;
/**
/**
* Created by emblanco on 13/10/15.
* Created by emblanco on 13/10/15.
*
*
...
@@ -16,7 +18,7 @@ public class BootReceiver extends BroadcastReceiver {
...
@@ -16,7 +18,7 @@ public class BootReceiver extends BroadcastReceiver {
@Override
@Override
public
void
onReceive
(
Context
context
,
Intent
intent
)
{
public
void
onReceive
(
Context
context
,
Intent
intent
)
{
Intent
myIntent
=
new
Intent
(
context
,
com
.
yottacode
.
pictogram
.
tabletlibrary
.
gui
.
MainActivity
.
class
);
Intent
myIntent
=
new
Intent
(
context
,
MainActivity
.
class
);
myIntent
.
addFlags
(
Intent
.
FLAG_ACTIVITY_NEW_TASK
);
myIntent
.
addFlags
(
Intent
.
FLAG_ACTIVITY_NEW_TASK
);
context
.
startActivity
(
myIntent
);
context
.
startActivity
(
myIntent
);
}
}
...
...
android/Pictogram/yotta_tablet/src/main/java/com/yottacode/pictogram/yotta_tablet/kiosk/KioskService.java
View file @
395dd167
...
@@ -88,7 +88,7 @@ public class KioskService extends Service {
...
@@ -88,7 +88,7 @@ public class KioskService extends Service {
private
void
restoreApp
()
{
private
void
restoreApp
()
{
// Restart activity
// Restart activity
Intent
i
=
new
Intent
(
ctx
,
com
.
yottacode
.
pictogram
.
tabletlibrary
.
gui
.
SerialActivity
.
class
);
Intent
i
=
new
Intent
(
ctx
,
com
.
yottacode
.
pictogram
.
tabletlibrary
.
gui
.
login
.
SerialActivity
.
class
);
i
.
addFlags
(
Intent
.
FLAG_ACTIVITY_NEW_TASK
);
i
.
addFlags
(
Intent
.
FLAG_ACTIVITY_NEW_TASK
);
ctx
.
startActivity
(
i
);
ctx
.
startActivity
(
i
);
}
}
...
...
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