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
fa8e532a
authored
Aug 09, 2017
by
Sebastián Collado Montañez
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
student list button and issue
#297
fixed
parent
f1543f16
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
40 additions
and
67 deletions
android/Pictogram/commonlibrary/src/main/res/values-en/strings.xml
android/Pictogram/commonlibrary/src/main/res/values-es/strings.xml
android/Pictogram/commonlibrary/src/main/res/values/strings.xml
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/login/LoginActivity.java
android/Pictogram/tabletlibrary/src/main/java/com/yottacode/pictogram/tabletlibrary/gui/session/SessionActivity.java
android/Pictogram/tabletlibrary/src/main/res/layout/activity_login.xml
android/Pictogram/tabletlibrary/src/main/res/layout/vocabulary_manager.xml
android/Pictogram/tabletlibrary/src/main/res/layout/vocabulary_manager_big.xml
android/Pictogram/commonlibrary/src/main/res/values-en/strings.xml
View file @
fa8e532a
...
...
@@ -75,4 +75,5 @@
<string
name=
"crop"
>
Crop
</string>
<string
name=
"titleCropper"
>
New pictogram
</string>
<string
name=
"uploadingImage"
>
Uploading image
</string>
<string
name=
"toStudentList"
>
Student list
</string>
</resources>
android/Pictogram/commonlibrary/src/main/res/values-es/strings.xml
View file @
fa8e532a
...
...
@@ -72,6 +72,7 @@
<string
name=
"default_tts_engine"
>
com.google.android.tts
</string>
<string
name=
"default_tts_voice_male"
>
es-es-x-ana#male_1-local
</string>
<string
name=
"default_tts_voice_female"
>
es-es-x-ana#female_2-local
</string>
<string
name=
"toStudentList"
>
Lista de estudiantes
</string>
</resources>
...
...
android/Pictogram/commonlibrary/src/main/res/values/strings.xml
View file @
fa8e532a
...
...
@@ -17,6 +17,7 @@
<string
name=
"prompt_serial_pass"
>
Contraseña
</string>
<string
name=
"action_entrar"
>
Entrar
</string>
<string
name=
"logout"
>
Cerrar sesión
</string>
<string
name=
"toStudentList"
>
Lista de estudiantes
</string>
<string
name=
"loginTitle"
>
¿Quién eres?
</string>
<string
name=
"loginErrorTxt"
>
Login
</string>
<string
name=
"loginErrorMsg"
>
El usuario no existe o la contraseña indicada no es correcta. Inténtelo de nuevo.
</string>
...
...
android/Pictogram/tabletlibrary/src/main/java/com/yottacode/pictogram/tabletlibrary/gui/communicator/VocabularyManager.java
View file @
fa8e532a
...
...
@@ -29,6 +29,7 @@ import android.view.animation.AccelerateDecelerateInterpolator;
import
android.view.animation.Animation
;
import
android.view.animation.TranslateAnimation
;
import
android.widget.AdapterView
;
import
android.widget.Button
;
import
android.widget.CheckBox
;
import
android.widget.EditText
;
import
android.widget.GridView
;
...
...
@@ -49,6 +50,7 @@ import com.yottacode.pictogram.net.websockets.ActionTalk;
import
com.yottacode.pictogram.net.websockets.VocabularyTalk
;
import
com.yottacode.pictogram.tabletlibrary.R
;
import
com.yottacode.pictogram.tabletlibrary.gui.communicator.cropper.EditPictoActivity
;
import
com.yottacode.pictogram.tabletlibrary.gui.login.LoginActivity
;
import
com.yottacode.pictogram.tabletlibrary.gui.session.SessionActivity
;
import
com.yottacode.pictogram.tabletlibrary.net.NetServiceTablet
;
import
com.yottacode.pictogram.tools.Img
;
...
...
@@ -122,7 +124,6 @@ public class VocabularyManager extends Activity implements VocabularyTalk.iVocab
super
.
onCreate
(
savedInstanceState
);
requestWindowFeature
(
Window
.
FEATURE_NO_TITLE
);
onWindowFocusChanged
(
true
);
// after a long inactivity, the pcbdb is discarded
if
(!
PCBcontext
.
is_user_logged
())
{
...
...
@@ -264,13 +265,23 @@ public class VocabularyManager extends Activity implements VocabularyTalk.iVocab
Log
.
e
(
LOG_TAG
,
e
.
getMessage
());
}
// user list button
final
Button
toUserListBtn
=
(
Button
)
findViewById
(
R
.
id
.
vmTopbarToUserListBtn
);
toUserListBtn
.
setEnabled
(
true
);
toUserListBtn
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
Intent
nextActivity
=
new
Intent
(
getBaseContext
(),
LoginActivity
.
class
);
startActivity
(
nextActivity
);
}
});
}
@Override
protected
void
onResume
()
{
super
.
onResume
();
onWindowFocusChanged
(
true
);
Log
.
i
(
LOG_TAG
,
"Resuming Pictogram Activity"
);
PCBcontext
.
setActivityContext
(
this
);
Toast
.
makeText
(
this
.
getBaseContext
(),
PCBcontext
.
getPcbdb
().
getCurrentUser
().
get_name_stu
()
+
" "
+
PCBcontext
.
getPcbdb
().
getCurrentUser
().
get_surname_stu
()
+
...
...
@@ -618,27 +629,6 @@ public class VocabularyManager extends Activity implements VocabularyTalk.iVocab
}
/**
* Disable long power button press (system menu)
*
* @param hasFocus
*/
@Override
public
void
onWindowFocusChanged
(
boolean
hasFocus
)
{
super
.
onWindowFocusChanged
(
hasFocus
);
if
(
hasFocus
)
{
getWindow
().
getDecorView
().
setSystemUiVisibility
(
View
.
SYSTEM_UI_FLAG_LAYOUT_STABLE
|
View
.
SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
|
View
.
SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
|
View
.
SYSTEM_UI_FLAG_HIDE_NAVIGATION
|
View
.
SYSTEM_UI_FLAG_FULLSCREEN
|
View
.
SYSTEM_UI_FLAG_IMMERSIVE_STICKY
);
}
}
/**
* Disable volume button on key event
*
* @param event
...
...
android/Pictogram/tabletlibrary/src/main/java/com/yottacode/pictogram/tabletlibrary/gui/login/LoginActivity.java
View file @
fa8e532a
...
...
@@ -43,7 +43,6 @@ public class LoginActivity extends FragmentActivity {
super
.
onCreate
(
savedInstanceState
);
requestWindowFeature
(
Window
.
FEATURE_NO_TITLE
);
onWindowFocusChanged
(
true
);
setContentView
(
com
.
yottacode
.
pictogram
.
tabletlibrary
.
R
.
layout
.
activity_login
);
...
...
@@ -117,23 +116,4 @@ public class LoginActivity extends FragmentActivity {
PCBcontext
.
setActivityContext
(
this
);
}
/**
* Disable long power button press (system menu)
*
* @param hasFocus
*/
@Override
public
void
onWindowFocusChanged
(
boolean
hasFocus
)
{
super
.
onWindowFocusChanged
(
hasFocus
);
if
(
hasFocus
)
{
getWindow
().
getDecorView
().
setSystemUiVisibility
(
View
.
SYSTEM_UI_FLAG_LAYOUT_STABLE
|
View
.
SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
|
View
.
SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
|
View
.
SYSTEM_UI_FLAG_HIDE_NAVIGATION
|
View
.
SYSTEM_UI_FLAG_FULLSCREEN
|
View
.
SYSTEM_UI_FLAG_IMMERSIVE_STICKY
);
}
}
}
android/Pictogram/tabletlibrary/src/main/java/com/yottacode/pictogram/tabletlibrary/gui/session/SessionActivity.java
View file @
fa8e532a
...
...
@@ -154,7 +154,6 @@ public class SessionActivity extends FragmentActivity implements ListInstruction
SessionActivity
.
session
=
this
;
requestWindowFeature
(
Window
.
FEATURE_NO_TITLE
);
onWindowFocusChanged
(
true
);
setContentView
(
R
.
layout
.
activity_session
);
...
...
@@ -398,30 +397,9 @@ public class SessionActivity extends FragmentActivity implements ListInstruction
}
}
/**
* Disable long power button press (system menu)
*
* @param hasFocus
*/
@Override
public
void
onWindowFocusChanged
(
boolean
hasFocus
)
{
super
.
onWindowFocusChanged
(
hasFocus
);
if
(
hasFocus
)
{
getWindow
().
getDecorView
().
setSystemUiVisibility
(
View
.
SYSTEM_UI_FLAG_LAYOUT_STABLE
|
View
.
SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
|
View
.
SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
|
View
.
SYSTEM_UI_FLAG_HIDE_NAVIGATION
|
View
.
SYSTEM_UI_FLAG_FULLSCREEN
|
View
.
SYSTEM_UI_FLAG_IMMERSIVE_STICKY
);
}
}
@Override
public
void
onResume
()
{
super
.
onResume
();
onWindowFocusChanged
(
true
);
PCBcontext
.
setActivityContext
(
this
);
}
...
...
android/Pictogram/tabletlibrary/src/main/res/layout/activity_login.xml
View file @
fa8e532a
...
...
@@ -44,7 +44,7 @@
<Button
android:id=
"@+id/loginTopbarLogout"
style=
"@android:style/
TextAppearance.Material
.Button"
style=
"@android:style/
Widget.Holo.Light
.Button"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentBottom=
"true"
...
...
android/Pictogram/tabletlibrary/src/main/res/layout/vocabulary_manager.xml
View file @
fa8e532a
...
...
@@ -51,6 +51,17 @@
</LinearLayout>
<Button
android:id=
"@+id/vmTopbarToUserListBtn"
style=
"@android:style/Widget.Holo.Light.Button"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentBottom=
"true"
android:layout_alignParentEnd=
"true"
android:layout_alignParentTop=
"true"
android:text=
"@string/toStudentList"
android:textColor=
"@color/BlancoApp"
/>
</RelativeLayout>
<ImageButton
...
...
android/Pictogram/tabletlibrary/src/main/res/layout/vocabulary_manager_big.xml
View file @
fa8e532a
...
...
@@ -18,7 +18,7 @@
android:id=
"@+id/vmTopbarLayout"
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/menu_top_height"
android:layout_alignParentStart=
"
tru
e"
android:layout_alignParentStart=
"
fals
e"
android:background=
"@color/VerdeApp"
>
<ImageView
...
...
@@ -51,6 +51,17 @@
</LinearLayout>
<Button
android:id=
"@+id/vmTopbarToUserListBtn"
style=
"@android:style/Widget.Holo.Light.Button"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentBottom=
"true"
android:layout_alignParentEnd=
"true"
android:layout_alignParentTop=
"true"
android:text=
"@string/toStudentList"
android:textColor=
"@color/BlancoApp"
/>
</RelativeLayout>
<ImageButton
...
...
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