Commit c9ff8ab5 by Sebastián Collado Montañez

merge pictogramactivityrefactor

parents 90cd98a1 36ae13dc
Showing with 1310 additions and 273 deletions
*.iml
.gradle
/local.properties
/.idea/workspace.xml
/.idea/libraries
.DS_Store
/build
/captures
.externalNativeBuild
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion "26.0.0"
defaultConfig {
applicationId "com.example.scollado.myapplication"
minSdkVersion 15
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:26.+'
compile 'com.android.support:design:26.+'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
testCompile 'junit:junit:4.12'
}
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in /home/scollado/Android/Sdk/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the proguardFiles
# directive in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# Add any project specific keep options here:
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
package com.example.scollado.myapplication;
import android.content.Context;
import android.support.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
/**
* Instrumentation test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() throws Exception {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getTargetContext();
assertEquals("com.example.scollado.myapplication", appContext.getPackageName());
}
}
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.scollado.myapplication">
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity
android:name=".MainActivity"
android:label="@string/app_name"
android:theme="@style/AppTheme.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
\ No newline at end of file
package com.example.scollado.myapplication;
import android.os.Bundle;
import android.support.design.widget.FloatingActionButton;
import android.support.design.widget.Snackbar;
import android.view.View;
import android.support.design.widget.NavigationView;
import android.support.v4.view.GravityCompat;
import android.support.v4.widget.DrawerLayout;
import android.support.v7.app.ActionBarDrawerToggle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.Menu;
import android.view.MenuItem;
public class MainActivity extends AppCompatActivity
implements NavigationView.OnNavigationItemSelectedListener {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
fab.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG)
.setAction("Action", null).show();
}
});
DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(
this, drawer, toolbar, R.string.navigation_drawer_open, R.string.navigation_drawer_close);
drawer.setDrawerListener(toggle);
toggle.syncState();
NavigationView navigationView = (NavigationView) findViewById(R.id.nav_view);
navigationView.setNavigationItemSelectedListener(this);
}
@Override
public void onBackPressed() {
DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
if (drawer.isDrawerOpen(GravityCompat.START)) {
drawer.closeDrawer(GravityCompat.START);
} else {
super.onBackPressed();
}
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.main, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
// Handle action bar item clicks here. The action bar will
// automatically handle clicks on the Home/Up button, so long
// as you specify a parent activity in AndroidManifest.xml.
int id = item.getItemId();
//noinspection SimplifiableIfStatement
if (id == R.id.action_settings) {
return true;
}
return super.onOptionsItemSelected(item);
}
@SuppressWarnings("StatementWithEmptyBody")
@Override
public boolean onNavigationItemSelected(MenuItem item) {
// Handle navigation view item clicks here.
int id = item.getItemId();
if (id == R.id.nav_camera) {
// Handle the camera action
} else if (id == R.id.nav_gallery) {
} else if (id == R.id.nav_slideshow) {
} else if (id == R.id.nav_manage) {
} else if (id == R.id.nav_share) {
} else if (id == R.id.nav_send) {
}
DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
drawer.closeDrawer(GravityCompat.START);
return true;
}
}
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportHeight="24.0"
android:viewportWidth="24.0">
<path
android:fillColor="#FF000000"
android:pathData="M12,12m-3.2,0a3.2,3.2 0,1 1,6.4 0a3.2,3.2 0,1 1,-6.4 0" />
<path
android:fillColor="#FF000000"
android:pathData="M9,2L7.17,4H4c-1.1,0 -2,0.9 -2,2v12c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2V6c0,-1.1 -0.9,-2 -2,-2h-3.17L15,2H9zm3,15c-2.76,0 -5,-2.24 -5,-5s2.24,-5 5,-5 5,2.24 5,5 -2.24,5 -5,5z" />
</vector>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportHeight="24.0"
android:viewportWidth="24.0">
<path
android:fillColor="#FF000000"
android:pathData="M22,16V4c0,-1.1 -0.9,-2 -2,-2H8c-1.1,0 -2,0.9 -2,2v12c0,1.1 0.9,2 2,2h12c1.1,0 2,-0.9 2,-2zm-11,-4l2.03,2.71L16,11l4,5H8l3,-4zM2,6v14c0,1.1 0.9,2 2,2h14v-2H4V6H2z" />
</vector>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportHeight="24.0"
android:viewportWidth="24.0">
<path
android:fillColor="#FF000000"
android:pathData="M22.7,19l-9.1,-9.1c0.9,-2.3 0.4,-5 -1.5,-6.9 -2,-2 -5,-2.4 -7.4,-1.3L9,6 6,9 1.6,4.7C0.4,7.1 0.9,10.1 2.9,12.1c1.9,1.9 4.6,2.4 6.9,1.5l9.1,9.1c0.4,0.4 1,0.4 1.4,0l2.3,-2.3c0.5,-0.4 0.5,-1.1 0.1,-1.4z" />
</vector>
\ No newline at end of file
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportHeight="24.0"
android:viewportWidth="24.0">
<path
android:fillColor="#FF000000"
android:pathData="M2.01,21L23,12 2.01,3 2,10l15,2 -15,2z" />
</vector>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportHeight="24.0"
android:viewportWidth="24.0">
<path
android:fillColor="#FF000000"
android:pathData="M18,16.08c-0.76,0 -1.44,0.3 -1.96,0.77L8.91,12.7c0.05,-0.23 0.09,-0.46 0.09,-0.7s-0.04,-0.47 -0.09,-0.7l7.05,-4.11c0.54,0.5 1.25,0.81 2.04,0.81 1.66,0 3,-1.34 3,-3s-1.34,-3 -3,-3 -3,1.34 -3,3c0,0.24 0.04,0.47 0.09,0.7L8.04,9.81C7.5,9.31 6.79,9 6,9c-1.66,0 -3,1.34 -3,3s1.34,3 3,3c0.79,0 1.5,-0.31 2.04,-0.81l7.12,4.16c-0.05,0.21 -0.08,0.43 -0.08,0.65 0,1.61 1.31,2.92 2.92,2.92 1.61,0 2.92,-1.31 2.92,-2.92s-1.31,-2.92 -2.92,-2.92z" />
</vector>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportHeight="24.0"
android:viewportWidth="24.0">
<path
android:fillColor="#FF000000"
android:pathData="M4,6H2v14c0,1.1 0.9,2 2,2h14v-2H4V6zm16,-4H8c-1.1,0 -2,0.9 -2,2v12c0,1.1 0.9,2 2,2h12c1.1,0 2,-0.9 2,-2V4c0,-1.1 -0.9,-2 -2,-2zm-8,12.5v-9l6,4.5 -6,4.5z" />
</vector>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<gradient
android:angle="135"
android:centerColor="#4CAF50"
android:endColor="#2E7D32"
android:startColor="#81C784"
android:type="linear" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:openDrawer="start">
<include
layout="@layout/app_bar_main"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<android.support.design.widget.NavigationView
android:id="@+id/nav_view"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="start"
android:fitsSystemWindows="true"
app:headerLayout="@layout/nav_header_main"
app:menu="@menu/activity_main_drawer" />
</android.support.v4.widget.DrawerLayout>
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.example.scollado.myapplication.MainActivity">
<android.support.design.widget.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/AppTheme.AppBarOverlay">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
app:popupTheme="@style/AppTheme.PopupOverlay" />
</android.support.design.widget.AppBarLayout>
<include layout="@layout/content_main" />
<android.support.design.widget.FloatingActionButton
android:id="@+id/fab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
android:layout_margin="@dimen/fab_margin"
app:srcCompat="@android:drawable/ic_dialog_email" />
</android.support.design.widget.CoordinatorLayout>
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
tools:context="com.example.scollado.myapplication.MainActivity"
tools:showIn="@layout/app_bar_main">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Hello World!"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</android.support.constraint.ConstraintLayout>
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="@dimen/nav_header_height"
android:background="@drawable/side_nav_bar"
android:gravity="bottom"
android:orientation="vertical"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:theme="@style/ThemeOverlay.AppCompat.Dark">
<ImageView
android:id="@+id/imageView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingTop="@dimen/nav_header_vertical_spacing"
app:srcCompat="@android:drawable/sym_def_app_icon" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="@dimen/nav_header_vertical_spacing"
android:text="Android Studio"
android:textAppearance="@style/TextAppearance.AppCompat.Body1" />
<TextView
android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="android.studio@android.com" />
</LinearLayout>
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<group android:checkableBehavior="single">
<item
android:id="@+id/nav_camera"
android:icon="@drawable/ic_menu_camera"
android:title="Import" />
<item
android:id="@+id/nav_gallery"
android:icon="@drawable/ic_menu_gallery"
android:title="Gallery" />
<item
android:id="@+id/nav_slideshow"
android:icon="@drawable/ic_menu_slideshow"
android:title="Slideshow" />
<item
android:id="@+id/nav_manage"
android:icon="@drawable/ic_menu_manage"
android:title="Tools" />
</group>
<item android:title="Communicate">
<menu>
<item
android:id="@+id/nav_share"
android:icon="@drawable/ic_menu_share"
android:title="Share" />
<item
android:id="@+id/nav_send"
android:icon="@drawable/ic_menu_send"
android:title="Send" />
</menu>
</item>
</menu>
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<item
android:id="@+id/action_settings"
android:orderInCategory="100"
android:title="@string/action_settings"
app:showAsAction="never" />
</menu>
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="colorPrimary">#3F51B5</color>
<color name="colorPrimaryDark">#303F9F</color>
<color name="colorAccent">#FF4081</color>
</resources>
<resources>
<!-- Default screen margins, per the Android Design guidelines. -->
<dimen name="activity_horizontal_margin">16dp</dimen>
<dimen name="activity_vertical_margin">16dp</dimen>
<dimen name="nav_header_vertical_spacing">16dp</dimen>
<dimen name="nav_header_height">160dp</dimen>
<dimen name="fab_margin">16dp</dimen>
</resources>
<resources xmlns:android="http://schemas.android.com/apk/res/android">
<item name="ic_menu_camera" type="drawable">@android:drawable/ic_menu_camera</item>
<item name="ic_menu_gallery" type="drawable">@android:drawable/ic_menu_gallery</item>
<item name="ic_menu_slideshow" type="drawable">@android:drawable/ic_menu_slideshow</item>
<item name="ic_menu_manage" type="drawable">@android:drawable/ic_menu_manage</item>
<item name="ic_menu_share" type="drawable">@android:drawable/ic_menu_share</item>
<item name="ic_menu_send" type="drawable">@android:drawable/ic_menu_send</item>
</resources>
<resources>
<string name="app_name">My Application</string>
<string name="navigation_drawer_open">Open navigation drawer</string>
<string name="navigation_drawer_close">Close navigation drawer</string>
<string name="action_settings">Settings</string>
</resources>
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
</style>
<style name="AppTheme.NoActionBar">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
</style>
<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />
<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />
</resources>
package com.example.scollado.myapplication;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() throws Exception {
assertEquals(4, 2 + 2);
}
}
\ No newline at end of file
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.3'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
# Project-wide Gradle settings.
# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.
# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx1536m
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
#Fri Jul 14 13:10:28 CEST 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip
#!/usr/bin/env bash
##############################################################################
##
## Gradle start up script for UN*X
##
##############################################################################
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""
APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
warn ( ) {
echo "$*"
}
die ( ) {
echo
echo "$*"
echo
exit 1
}
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
case "`uname`" in
CYGWIN* )
cygwin=true
;;
Darwin* )
darwin=true
;;
MINGW* )
msys=true
;;
esac
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java"
else
JAVACMD="$JAVA_HOME/bin/java"
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD="java"
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
MAX_FD="$MAX_FD_LIMIT"
fi
ulimit -n $MAX_FD
if [ $? -ne 0 ] ; then
warn "Could not set maximum file descriptor limit: $MAX_FD"
fi
else
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
fi
fi
# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
# For Cygwin, switch paths to Windows format before running java
if $cygwin ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
SEP=""
for dir in $ROOTDIRSRAW ; do
ROOTDIRS="$ROOTDIRS$SEP$dir"
SEP="|"
done
OURCYGPATTERN="(^($ROOTDIRS))"
# Add a user-defined pattern to the cygpath arguments
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
fi
# Now convert the arguments - kludge to limit ourselves to /bin/sh
i=0
for arg in "$@" ; do
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
else
eval `echo args$i`="\"$arg\""
fi
i=$((i+1))
done
case $i in
(0) set -- ;;
(1) set -- "$args0" ;;
(2) set -- "$args0" "$args1" ;;
(3) set -- "$args0" "$args1" "$args2" ;;
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac
fi
# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
function splitJvmOpts() {
JVM_OPTS=("$@")
}
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto init
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:init
@rem Get command-line arguments, handling Windowz variants
if not "%OS%" == "Windows_NT" goto win9xME_args
if "%@eval[2+2]" == "4" goto 4NT_args
:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2
:win9xME_args_slurp
if "x%~1" == "x" goto execute
set CMD_LINE_ARGS=%*
goto execute
:4NT_args
@rem Get arguments from the 4NT Shell from JP Software
set CMD_LINE_ARGS=%$
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega
......@@ -3,16 +3,22 @@
<dimen name="activity_horizontal_margin">8px</dimen>
<dimen name="activity_vertical_margin">8px</dimen>
<dimen name="small_padding">4px</dimen>
<!-- Horizontal and vertical spacing between pictos -->
<dimen name="picto_grid_spacing">1px</dimen>
<!-- Picto border -->
<dimen name="picto_border_width">2px</dimen>
<!-- Picto padding ¿? -->
<dimen name="picto_padding">1px</dimen>
<dimen name="picto_normal_height">90px</dimen>
<dimen name="picto_normal_width">90px</dimen>
<dimen name="tape_normal_height">100px</dimen>
<dimen name="picto_big_height">115px</dimen>
<dimen name="picto_big_width">115px</dimen>
<dimen name="tape_big_height">125px</dimen>
<!-- Picto normal size -->
<dimen name="picto_normal_side">90px</dimen>
<!-- Picto big size -->
<dimen name="picto_big_side">115dp</dimen>
<!-- Tape -->
<dimen name="tape_normal_height">100dp</dimen>
<dimen name="tape_big_height">126dp</dimen>
<!-- Menu size -->
<dimen name="menu_top_height">64dp</dimen>
<!-- Picto session -->
<dimen name="picto_session_height">75px</dimen>
<dimen name="picto_session_width">75px</dimen>
</resources>
......
<resources>
<!-- Default screen margins, per the Android Design guidelines. -->
<dimen name="activity_horizontal_margin">8px</dimen>
<dimen name="activity_vertical_margin">8px</dimen>
<dimen name="small_padding">4px</dimen>
<!-- Horizontal and vertical spacing between pictos -->
<dimen name="picto_grid_spacing">1px</dimen>
<!-- Picto border -->
<dimen name="picto_border_width">2px</dimen>
<!-- Picto padding ¿? -->
<dimen name="picto_padding">1px</dimen>
<!-- Picto normal size -->
<dimen name="picto_normal_side">125dp</dimen>
<!-- Picto big size -->
<dimen name="picto_big_side">153dp</dimen>
<!-- Tape -->
<dimen name="tape_normal_height">135dp</dimen>
<dimen name="tape_big_height">165dp</dimen>
<!-- Menu size -->
<dimen name="menu_top_height">64dp</dimen>
<!-- Picto session -->
<dimen name="picto_session_height">75px</dimen>
<dimen name="picto_session_width">75px</dimen>
</resources>
\ No newline at end of file
<resources>
<!-- Default screen margins, per the Android Design guidelines. -->
<dimen name="activity_horizontal_margin">8px</dimen>
<dimen name="activity_vertical_margin">8px</dimen>
<dimen name="small_padding">4px</dimen>
<dimen name="picto_grid_spacing">2px</dimen>
<dimen name="picto_border_width">1px</dimen>
<dimen name="picto_padding">1px</dimen>
<dimen name="picto_normal_height">90px</dimen>
<dimen name="picto_normal_width">90px</dimen>
<dimen name="tape_normal_height">100px</dimen>
<dimen name="picto_big_height">135px</dimen>
<dimen name="picto_big_width">135px</dimen>
<dimen name="tape_big_height">145px</dimen>
<dimen name="picto_session_height">84dp</dimen>
<dimen name="picto_session_width">84dp</dimen>
</resources>
<resources>
<!-- Default screen margins, per the Android Design guidelines. -->
<dimen name="activity_horizontal_margin">8px</dimen>
<dimen name="activity_vertical_margin">8px</dimen>
<dimen name="small_padding">4px</dimen>
<dimen name="picto_grid_spacing">1px</dimen>
<dimen name="picto_border_width">1px</dimen>
<dimen name="picto_padding">1px</dimen>
<dimen name="picto_normal_height">90px</dimen>
<dimen name="picto_normal_width">90px</dimen>
<dimen name="tape_normal_height">100px</dimen>
<dimen name="picto_big_height">116px</dimen>
<dimen name="picto_big_width">116px</dimen>
<dimen name="tape_big_height">118px</dimen>
<dimen name="picto_session_height">75px</dimen>
<dimen name="picto_session_width">75px</dimen>
</resources>
......@@ -49,7 +49,7 @@
android:label="@string/title_activity_login_activity_fragments"
android:screenOrientation="landscape" />
<activity
android:name="com.yottacode.pictogram.tabletlibrary.gui.communicator.PictogramActivity"
android:name="com.yottacode.pictogram.tabletlibrary.gui.communicator.VOCA"
android:exported="true"
android:label="@string/app_name"
android:launchMode="singleTop"
......
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.yottacode.pictogram.tabletlibrary">
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<application
android:allowBackup="true"
......
......@@ -3,11 +3,9 @@ package com.yottacode.pictogram.tabletlibrary.gui.communicator;
import android.animation.Animator;
import android.animation.ObjectAnimator;
import android.animation.ValueAnimator;
import android.app.Activity;
import android.graphics.Color;
import android.graphics.PorterDuff;
import android.support.v4.content.ContextCompat;
import android.util.Log;
import android.view.View;
import android.view.ViewGroup;
import android.widget.FrameLayout;
......@@ -33,7 +31,7 @@ public class PictoAnimation {
private final static String LOG_TAG = PictoAnimation.class.getCanonicalName();
public void animateTapeView(final PictogramActivity activity,final int position, final ViewGroup view) {
public void animateTapeView(final VOCA activity, final int position, final ViewGroup view) {
final GridView gridview = (GridView) view.getChildAt(1);
final TapeAdapter tapeAdapter=(TapeAdapter)gridview.getAdapter();
......@@ -106,7 +104,7 @@ public class PictoAnimation {
return argb(alpha, red, green, blue);
}
public void animateTapeViewVertical(final PictogramActivity activity, final boolean up) {
public void animateTapeViewVertical(final VOCA activity, final boolean up) {
final View v = activity.findViewById(R.id.pictogramLayout);
int y=v.getHeight()/2-activity.tapeGridView.getHeight()/2;
final ValueAnimator moveAnim = up
......@@ -149,7 +147,7 @@ public class PictoAnimation {
public void animateOnDeleteView(final PictogramActivity activity, View view, final int position) {
public void animateOnDeleteView(final VOCA activity, View view, final int position) {
if (activity.deleting) return;
View borderlayout=((RelativeLayout)view).getChildAt(0);
......@@ -224,7 +222,7 @@ public class PictoAnimation {
public static void animateOnGridView(final RelativeLayout layout) {
final PictogramActivity activity=(PictogramActivity)PCBcontext.getActivityContext();
final VOCA activity=(VOCA)PCBcontext.getActivityContext();
if (activity.inserting) return;
FrameLayout borderlayout=(FrameLayout)layout.getChildAt(0);
......@@ -277,7 +275,7 @@ public class PictoAnimation {
public static void animateOutGridView(final PictoGridAdapter pictoGridAdapter, final Picto picto, RelativeLayout layout, final Vector<Picto> pictoLinkedList_inTape) {
final PictogramActivity activity=(PictogramActivity)PCBcontext.getActivityContext();
final VOCA activity=(VOCA)PCBcontext.getActivityContext();
if (activity.inserting) return;
FrameLayout borderlayout=(FrameLayout)layout.getChildAt(0);
......
......@@ -2,6 +2,7 @@ package com.yottacode.pictogram.tabletlibrary.gui.communicator;
import android.graphics.Bitmap;
import android.graphics.Color;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
......@@ -23,6 +24,7 @@ import java.util.ArrayList;
* or a picto tape.
*/
public class PictoItemViewGenerator {
public static final int LAYOUT = R.layout.picto_grid_item;
public static final int LAYOUT_BIG = R.layout.picto_grid_item_big;
private static final byte MAX_LINE_LENGTH = 12;
......@@ -30,7 +32,6 @@ public class PictoItemViewGenerator {
private static final String LOG_TAG = PictoItemViewGenerator.class.getCanonicalName();
public static int mirror_color=0;
/**
*
* @param picto Pictogram to set the legend text
......@@ -60,22 +61,43 @@ public class PictoItemViewGenerator {
}
/**
*
* @param picto
* @param convertView
* @param parent
* @return
*/
public static View getPictoView(Picto picto, View convertView, ViewGroup parent) {
return getPictoView(picto, convertView, parent, false);
}
/**
*
* @param picto Pictogram to show
* @param convertView View object
* @param parent
* @param preventMirror
* @return Picto view
*/
public static View getPictoView(Picto picto, View convertView, ViewGroup parent, boolean preventMirror) {
if (convertView == null) {
convertView = LayoutInflater.from(parent.getContext()).inflate(PCBcontext.getPcbdb().getCurrentUser().is_picto_size_big() ? LAYOUT_BIG : LAYOUT, parent, false);
}
if (parent.getId()==R.id.tape_grid_view)
convertView.setPadding(0,0,0,0);
RelativeLayout layoutWrapper ;
FrameLayout layout ;
final ImageView pictoImage ;
ImageView redCrossImage ;
RelativeLayout layoutWrapper;
FrameLayout layout;
final ImageView pictoImage;
ImageView redCrossImage;
TextView legend;
TextView legend_full;
// View init
if (convertView == null)
convertView = LayoutInflater.from(parent.getContext()).inflate(PCBcontext.getPcbdb().getCurrentUser().is_picto_size_big() ? LAYOUT_BIG : LAYOUT, parent, false);
// Padding respect to the tape
if (parent.getId() == R.id.tape_grid_view)
convertView.setPadding(0,0,0,0);
// Picto size
if (PCBcontext.getPcbdb().getCurrentUser().is_picto_size_big()) {
layoutWrapper = (RelativeLayout) convertView.findViewById(R.id.picto_grid_item_layout_wrapper_big);
layout = (FrameLayout) convertView.findViewById(R.id.picto_grid_item_layout_big);
......@@ -91,8 +113,8 @@ public class PictoItemViewGenerator {
legend = (TextView) convertView.findViewById(R.id.legend_text);
legend_full = (TextView) convertView.findViewById(R.id.legend_text_full);
}
layout.setBackgroundColor(convertView.getResources()
.getColor(R.color.picto_default_background));
layout.setBackgroundColor(convertView.getResources().getColor(R.color.picto_default_background));
redCrossImage.setVisibility(View.GONE);
layoutWrapper.setVisibility(View.GONE);
......@@ -102,26 +124,29 @@ public class PictoItemViewGenerator {
pictoImage.setImageBitmap(null);
layoutWrapper.setAlpha(1f);
if (PCBcontext.getPcbdb().getCurrentUser().is_supervisor() || (picto!=null && !picto.is_invisible())) {
// Picto visibility
if (PCBcontext.getActivityContext().getClass().getSimpleName().equals("VocabularyManager") || (picto != null && !picto.is_invisible())) {
layoutWrapper.setVisibility(View.VISIBLE);
pictoImage.setVisibility(View.VISIBLE);
layoutWrapper.setBackground(convertView.getResources()
.getDrawable(R.drawable.picto_grid_item_border));
layoutWrapper.setBackground(convertView.getResources().getDrawable(R.drawable.picto_grid_item_border));
if (picto!=null) {
layoutWrapper.setAlpha(!picto.is_invisible() ? 1.00f : PCBcontext.getPcbdb().getCurrentUser().is_supervisor() ? 0.25f : 0f);
layoutWrapper.setAlpha(!picto.is_invisible() ? 1.00f : PCBcontext.getActivityContext().getClass().getSimpleName().equals("VocabularyManager") ? 0.25f : 0f);
try {
Bitmap bm = picto.get_bitmap(PCBcontext.getContext());
switch (picto.get_legend()) {
case "none":
legend.setVisibility(View.GONE);
legend_full.setVisibility(View.GONE);
break;
case "normal":
legend.setText(format_legend(picto, MAX_LINE_LENGTH, false));
legend.setVisibility(View.VISIBLE);
legend_full.setVisibility(View.GONE);
break;
default:
legend_full.setText(format_legend(picto, MAX_LINE_LENGTH_FULL, true));
legend.setVisibility(View.GONE);
......@@ -130,7 +155,6 @@ public class PictoItemViewGenerator {
pictoImage.setImageBitmap(bm);
if (picto.is_magnify()) {
pictoImage.setScaleX(1.2f);
pictoImage.setScaleY(1.2f);
......@@ -148,10 +172,10 @@ public class PictoItemViewGenerator {
mirror_color++;
pictoImage.setScaleX(scale[mirror_color % scale.length]);
pictoImage.setScaleY(scale[mirror_color % scale.length]);
if (picto.is_highlight_background())
layout.setBackgroundColor(color[mirror_color % color.length]);
}
} catch (IOException e) {
e.printStackTrace();
}
......
......@@ -26,7 +26,7 @@ public class PictoMenu {
public static final String IMAGE_PICTO = "imagePicto";
public static final String PATH_SOUND = "pathSound";
PictogramActivity activity;
VocabularyManager activity;
//Variables used on the picto menu (only supervisors)
private static final int CAMERA_PIC_REQUEST = 1;
......@@ -40,7 +40,7 @@ public class PictoMenu {
// TODO describe this variable
static final int SELECT_PICTURE = 1;
public PictoMenu(PictogramActivity activity) {
public PictoMenu(VocabularyManager activity) {
this.activity=activity;
}
......@@ -81,7 +81,7 @@ public class PictoMenu {
public void addPicto(int row, int col, int cat, int source) {
//Enviar al PictogramActivity los datos necesarios para crear el picto despues
//Enviar al voca los datos necesarios para crear el picto despues
if (/*PCBcontext.getPcbdb().getCurrentUser().has_categories()*/PCBcontext.getVocabulary().has_categories()) {
activity.getIntent().putExtra(Picto.JSON_ATTTRS.CATEGORY, cat);
activity.getIntent().putExtra(Picto.JSON_ATTTRS.ROW, row);
......@@ -107,7 +107,7 @@ public class PictoMenu {
Intent intent = new Intent(activity, EditPictoActivity.class);
intent.putExtra(ID_PICTO_IMAGE,id_picto);
//Enviar al PictogramActivity los datos necesarios para editar el picto despues
//Enviar al voca los datos necesarios para editar el picto despues
if (/*PCBcontext.getPcbdb().getCurrentUser().has_categories()*/PCBcontext.getVocabulary().has_categories()) {
intent.putExtra(Picto.JSON_ATTTRS.CATEGORY, cat);
intent.putExtra(Picto.JSON_ATTTRS.ROW, row);
......
......@@ -34,13 +34,17 @@ public class LoginActivity extends FragmentActivity {
/**
* If there is Internet connection it calls the WS to recover the pairs student-supervisor
*
* @param savedInstanceState
*/
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
onWindowFocusChanged(true);
setContentView(com.yottacode.pictogram.tabletlibrary.R.layout.activity_login);
// Enable logout button
......@@ -62,13 +66,11 @@ public class LoginActivity extends FragmentActivity {
super.onStart();
// Set supervisor information on topbar
final TextView supervisorFullNameView = (TextView) findViewById(R.id.loginTopbarSupervisorFullName);
final TextView supervisorUserNameView = (TextView) findViewById(R.id.loginTopbarSupervisorUserName);
final ImageView supervisorPhotoView = (ImageView) findViewById(R.id.loginTopbarSupervisorPhoto);
supervisorFullNameView.setText(
this.getIntent().getStringExtra("name") + " " +
this.getIntent().getStringExtra("surname")+" ("+this.getIntent().getStringExtra("office")+")");
supervisorUserNameView.setText(this.getIntent().getStringExtra("email"));
this.getIntent().getStringExtra("surname") + " (" + this.getIntent().getStringExtra("email") + ")");
final Vector<Img> imgs = new Vector<>(1);
imgs.add(new Img(
......@@ -90,11 +92,13 @@ public class LoginActivity extends FragmentActivity {
}
@Override
public void loadImg(Img image) {}
public void loadImg(Img image) {
}
@Override
public void error(Exception e) {
GUITools.show_alert(PCBcontext.getContext(), R.string.serverError, e.getMessage());
Log.e(this.getClass().getCanonicalName(), "Server error:"+ e.getLocalizedMessage());
Log.e(this.getClass().getCanonicalName(), "Server error:" + e.getLocalizedMessage());
}
}, ImgDownloader.tsource.remote);
downloader.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, imgs);
......@@ -103,12 +107,33 @@ public class LoginActivity extends FragmentActivity {
@Override
protected void onStop() {
super.onStop();
Log.i(LOG_TAG,"Closing Login window");
Log.i(LOG_TAG, "Closing Login window");
PCBcontext.getNetService().closeNotifyStatus();
}
@Override
public void onResume() {
super.onResume();
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
);
}
}
}
......@@ -22,7 +22,7 @@ import com.yottacode.pictogram.dao.Device;
import com.yottacode.pictogram.dao.User;
import com.yottacode.pictogram.dao.UserLogin;
import com.yottacode.pictogram.tabletlibrary.R;
import com.yottacode.pictogram.tabletlibrary.gui.communicator.PictogramActivity;
import com.yottacode.pictogram.tabletlibrary.gui.communicator.VOCA;
import com.yottacode.pictogram.tabletlibrary.net.NetServiceTablet;
import com.yottacode.pictogram.tools.PCBcontext;
......@@ -99,7 +99,7 @@ public class SerialActivity extends Activity {
editor.putString("password", supUsers.elementAt(position).get_pwd_sup());
editor.commit();
new UserLogin().login(supUsers.elementAt(position).get_email_sup(),
supUsers.elementAt(position).get_pwd_sup(), SerialActivity.this, PictogramActivity.class, LoginActivity.class);
supUsers.elementAt(position).get_pwd_sup(), SerialActivity.this, VOCA.class, LoginActivity.class);
}
}
});
......@@ -133,7 +133,7 @@ public class SerialActivity extends Activity {
editor.putString("password", stuUsers.elementAt(position).get_pwd_stu());
editor.commit();
new UserLogin().login(stuUsers.elementAt(position).get_nickname_stu(),
stuUsers.elementAt(position).get_pwd_stu(),SerialActivity.this, PictogramActivity.class, LoginActivity.class);
stuUsers.elementAt(position).get_pwd_stu(),SerialActivity.this, VOCA.class, LoginActivity.class);
}
});
}
......@@ -172,7 +172,7 @@ public class SerialActivity extends Activity {
editor.putString("password", password);
editor.commit();
if (!username.equals("") && !password.equals(""))
new UserLogin().login(username, password, SerialActivity.this, PictogramActivity.class, LoginActivity.class);
new UserLogin().login(username, password, SerialActivity.this, VOCA.class, LoginActivity.class);
}
});
......@@ -193,7 +193,7 @@ public class SerialActivity extends Activity {
mSerialViewPass.setText(password);
if (!username.equals("") && !password.equals("") && !getIntent().getBooleanExtra("resetPrevUser", true))
new UserLogin().login(username, password, SerialActivity.this, PictogramActivity.class, LoginActivity.class);
new UserLogin().login(username, password, SerialActivity.this, VOCA.class, LoginActivity.class);
super.onStart();
try {
......
......@@ -17,7 +17,7 @@ import com.yottacode.net.RestapiWrapper;
import com.yottacode.pictogram.dao.User;
import com.yottacode.pictogram.net.ImgDownloader;
import com.yottacode.pictogram.tabletlibrary.R;
import com.yottacode.pictogram.tabletlibrary.gui.communicator.PictogramActivity;
import com.yottacode.pictogram.tabletlibrary.gui.communicator.VOCA;
import com.yottacode.pictogram.tools.Img;
import com.yottacode.pictogram.tools.PCBcontext;
import com.yottacode.tools.GUITools;
......@@ -80,7 +80,7 @@ public class StudentFragmentGrid extends Fragment{
Log.e(StudentFragmentGrid.this.getClass().getCanonicalName(), e.getMessage());
}
PCBcontext.set_user(currentUser, null, null);
Intent pictogramActivity = new Intent(getActivity(), PictogramActivity.class);
Intent pictogramActivity = new Intent(getActivity(), VOCA.class);
startActivity(pictogramActivity);
} else {
new_user(i);
......@@ -124,7 +124,7 @@ public class StudentFragmentGrid extends Fragment{
@Override
public void loadComplete() {
if (progressDialog!=null && progressDialog.isShowing()) progressDialog.dismiss();
Intent pictogramActivity = new Intent(getActivity(), PictogramActivity.class);
Intent pictogramActivity = new Intent(getActivity(), VOCA.class);
startActivity(pictogramActivity);
}
......
......@@ -15,7 +15,7 @@ import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.ListView;
import com.yottacode.pictogram.tabletlibrary.gui.communicator.PictogramActivity;
import com.yottacode.pictogram.tabletlibrary.gui.communicator.VOCA;
import com.yottacode.pictogram.tabletlibrary.net.SessionWrapper;
import com.yottacode.pictogram.tabletlibrary.R;
import com.yottacode.pictogram.tools.PCBcontext;
......@@ -116,7 +116,7 @@ public class ListInstructionsFragment extends Fragment{
}
void close() {
ListInstructionsFragment.this.getActivity().finish();
startActivity(new Intent(getActivity(), PictogramActivity.class));
startActivity(new Intent(getActivity(), VOCA.class));
}
private void checkStudent() {
SessionWrapper.validateStudent(new SessionWrapper.iValidateStudent() {
......
......@@ -127,13 +127,13 @@ public long getItemId(int position) {
}
public void evaluateItem(Bitmap bmp, String evaluation,int position) {
Item item=this.msg.get(position);
Bitmap oldmsg=item.getImg();
float width =context.getResources().getDimension(R.dimen.picto_session_width);
public void evaluateItem(Bitmap bmp, String evaluation, int position) {
Item item = this.msg.get(position);
Bitmap oldmsg = item.getImg();
float width = context.getResources().getDimension(R.dimen.picto_session_width);
float height = context.getResources().getDimension(R.dimen.picto_session_height);
bmp=new BitmapTools(bmp).resize((int)width ,(int)height).get();
bmp=set_text(context,bmp,getTimeDiff(new Date().getTime()));
bmp = new BitmapTools(bmp).resize((int)width ,(int)height).get();
bmp = set_text(context,bmp,getTimeDiff(new Date().getTime()));
Bitmap currmsg = position>=this.msg.size()-1 ? combineImages(oldmsg,bmp) : updateImage(oldmsg,bmp);
item.setImg(currmsg,evaluation,true);
}
......
......@@ -12,7 +12,7 @@ import android.util.Log;
import com.yottacode.pictogram.dao.User;
import com.yottacode.pictogram.net.NetService;
import com.yottacode.pictogram.tabletlibrary.R;
import com.yottacode.pictogram.tabletlibrary.gui.communicator.PictogramActivity;
import com.yottacode.pictogram.tabletlibrary.gui.communicator.VOCA;
import com.yottacode.pictogram.tools.PCBcontext;
/**
......@@ -25,15 +25,15 @@ public class NetServiceTablet implements NetService.iNetServiceDevice {
private static final String LOG_TAG = NetServiceTablet.class.getName();
private static NotificationCompat.Builder builder;
private PictogramActivity pictogramActivity;
private VOCA VOCA;
int notifyID = 666;
public void build() {
this.builder = new NotificationCompat.Builder(PCBcontext.getContext()).setAutoCancel(true).setOngoing(PCBcontext.getContext().getResources().getBoolean(R.bool.NotifyAllwaysVisible));
Intent resultIntent = new Intent(PCBcontext.getContext(), PictogramActivity.class);
Intent resultIntent = new Intent(PCBcontext.getContext(), VOCA.class);
TaskStackBuilder stackBuilder = TaskStackBuilder.create(PCBcontext.getContext());
stackBuilder.addParentStack(PictogramActivity.class);
stackBuilder.addParentStack(VOCA.class);
stackBuilder.addNextIntent(resultIntent);
if (PCBcontext.getContext().getResources().getBoolean(R.bool.NotifyAllwaysVisible)){
PendingIntent resultPendingIntent =
......@@ -96,8 +96,8 @@ public class NetServiceTablet implements NetService.iNetServiceDevice {
context.startActivity(serialActivity);
}
public void setPictogramActivity(PictogramActivity pictogramActivity) {this.pictogramActivity=pictogramActivity;}
public void setVOCA(VOCA VOCA) {this.VOCA = VOCA;}
public void updateUserConfig(User user) {
if (this.pictogramActivity!=null) this.pictogramActivity.setConfig();
if (this.VOCA !=null) this.VOCA.setConfig();
}
}
......@@ -8,22 +8,18 @@
<RelativeLayout
android:id="@+id/loginTopbarLayout"
android:layout_width="match_parent"
android:layout_height="70dp"
android:background="@color/VerdeApp"
android:paddingBottom="5dp"
android:paddingLeft="5dp"
android:paddingRight="5dp"
android:paddingTop="5dp">
android:layout_height="@dimen/menu_top_height"
android:background="@color/VerdeApp">
<ImageView
android:id="@+id/loginTopbarSupervisorPhoto"
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_width="@dimen/menu_top_height"
android:layout_height="@dimen/menu_top_height"
android:layout_alignParentBottom="true"
android:layout_alignParentStart="true"
android:layout_gravity="left"
android:background="@color/accent_material_dark"
android:scaleType="centerCrop"
android:layout_centerVertical="true"
android:layout_alignParentStart="true" />
android:scaleType="centerCrop" />
<LinearLayout
android:id="@+id/loginTopbarSupervisorNameLayout"
......@@ -44,26 +40,19 @@
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="@color/BlancoApp" />
<TextView
android:id="@+id/loginTopbarSupervisorUserName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="@color/BlancoApp" />
</LinearLayout>
<Button
android:id="@+id/loginTopbarLogout"
style="@android:style/TextAppearance.Material.Button"
android:textColor="@color/BlancoApp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentEnd="true"
android:layout_alignParentTop="true"
android:enabled="false"
android:text="@string/logout" />
android:text="@string/logout"
android:textColor="@color/BlancoApp" />
</RelativeLayout>
......
......@@ -7,109 +7,103 @@
tools:context="com.yottacode.pictogram.tabletlibrary.gui.session.SessionActivity">
<RelativeLayout
android:id="@+id/sessionTopbarLayout"
android:layout_width="match_parent"
android:layout_height="48dp"
android:layout_margin="8dp"
android:layout_marginLeft="16dp"
android:layout_marginTop="8dp"
android:layout_marginRight="16dp"
android:layout_marginBottom="0dp"
android:layout_height="64dp"
android:background="@color/VerdeApp"
android:id="@+id/sessionTopbarLayout">
android:layout_alignParentEnd="true">
<ImageView
android:layout_width="48dp"
android:layout_height="48dp"
android:id="@+id/sessionTopbarStudentPhoto"
android:layout_gravity="left"
android:layout_alignParentTop="true"
android:layout_width="64dp"
android:layout_height="64dp"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:layout_gravity="left"
android:background="@color/accent_material_dark"
android:scaleType="centerCrop" />
<LinearLayout
android:orientation="vertical"
android:id="@+id/sessionTopbarStudentNameLayout"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:id="@+id/sessionTopbarStudentNameLayout"
android:layout_centerVertical="true"
android:layout_marginLeft="8dp"
android:layout_marginRight="8dp"
android:layout_centerVertical="true"
android:layout_toEndOf="@+id/sessionTopbarStudentPhoto"
android:gravity="center_vertical">
android:gravity="center_vertical"
android:orientation="vertical">
<TextView
android:id="@+id/sessionTopbarStudentFullName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text=""
android:id="@+id/sessionTopbarStudentFullName" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceSmall"
android:text=""
android:id="@+id/sessionTopbarStudentUserName"
android:textColor="@color/abc_secondary_text_material_light" />
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="@color/white" />
</LinearLayout>
<LinearLayout
android:orientation="vertical"
android:id="@+id/methodLayout"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:id="@+id/methodLayout"
android:layout_centerVertical="true"
android:gravity="end"
android:layout_marginRight="20dp"
android:layout_toLeftOf="@+id/sessionPauseBtn"
android:layout_marginRight="20dp">
android:gravity="end"
android:orientation="vertical">
<TextView
android:id="@+id/sessionTopbarMethodName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text=""
android:id="@+id/sessionTopbarMethodName"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="@color/blue" />
<TextView
android:id="@+id/sessionTopbarInstructionName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceSmall"
android:text=""
android:id="@+id/sessionTopbarInstructionName"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="@color/blue" />
</LinearLayout>
<ToggleButton
android:id="@+id/sessionPauseBtn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/sessionPauseBtn"
android:layout_alignParentBottom="true"
android:layout_marginRight="10px"
android:textColorLink="@color/darkgreen"
android:textOff="||"
android:textOn="||"
android:layout_toLeftOf="@+id/sessionOnOffBtn"
android:textColorLink="@color/darkgreen"
android:layout_marginRight="10px" />
android:layout_centerVertical="true"
android:layout_toStartOf="@+id/sessionOnOffBtn" />
<ToggleButton
android:id="@+id/sessionOnOffBtn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/sessionOnOffBtn"
android:layout_alignParentBottom="true"
android:layout_alignBaseline="@+id/sessionPauseBtn"
android:layout_alignBottom="@+id/sessionPauseBtn"
android:layout_alignParentEnd="true"
android:layout_marginEnd="10px"
android:textOff="REC"
android:textOn="REC" />
</RelativeLayout>
<View
android:layout_width="match_parent"
android:layout_height="2dp"
android:background="@android:color/darker_gray"
android:layout_marginBottom="16dp"
android:id="@+id/view"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_below="@+id/sessionTopbarLayout"
android:layout_marginTop="0dp" />
android:layout_marginBottom="16dp"
android:layout_marginTop="0dp"
android:background="@android:color/darker_gray" />
<RelativeLayout
......
......@@ -27,13 +27,15 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="4">
<TextView
android:text="@string/session_method"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textStyle="normal|bold"
android:background="@color/VerdeApp"
android:textColor="@color/white"
android:textAlignment="center"
android:background="@color/VerdeApp" />
android:textStyle="normal|bold"
android:text="@string/session_method" />
<ListView
android:id="@+id/methodsListView"
......@@ -56,6 +58,7 @@
<TextView
android:text="@string/session_instruction"
android:background="@color/VerdeApp"
android:textColor="@color/white"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textStyle="normal|bold"
......
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/picto_grid_item_layout_wrapper"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical|center|center_horizontal"
android:id="@+id/picto_grid_item_layout_wrapper"
android:background="@drawable/picto_grid_item_border"
android:gravity="center_vertical|center|center_horizontal"
android:padding="@dimen/picto_border_width">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="@dimen/picto_normal_height"
android:id="@+id/picto_grid_item_layout"
android:layout_width="match_parent"
android:layout_height="@dimen/picto_normal_side"
android:background="@color/picto_default_background"
android:padding="@dimen/picto_padding">
......@@ -20,35 +20,35 @@
android:layout_height="match_parent" />
<TextView
android:text="Legend"
android:id="@+id/legend_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/legend_text"
android:textSize="11sp"
android:textColor="@android:color/black"
android:textAlignment="center"
android:layout_gravity="bottom"
android:visibility="gone"
android:background="@android:color/white" />
android:background="@android:color/white"
android:text="Legend"
android:textAlignment="center"
android:textColor="@android:color/black"
android:textSize="11sp"
android:visibility="gone" />
<TextView
android:text="Legend"
android:id="@+id/legend_text_full"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/legend_text_full"
android:textSize="18sp"
android:textColor="@android:color/black"
android:textAlignment="center"
android:maxLines="5"
android:gravity="center"
android:layout_gravity="center"
android:visibility="gone"
android:background="@android:color/white" />
android:background="@android:color/white"
android:gravity="center"
android:maxLines="5"
android:text="Legend"
android:textAlignment="center"
android:textColor="@android:color/black"
android:textSize="18sp"
android:visibility="gone" />
<ImageView
android:id="@+id/picto_grid_item_redcross"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/picto_grid_item_redcross"
android:src="@drawable/disabled_picto" />
</FrameLayout>
......
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="@dimen/picto_big_width"
android:layout_height="@dimen/picto_big_height"
android:gravity="center_vertical|center|center_horizontal"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/picto_grid_item_layout_wrapper_big"
android:layout_width="@dimen/picto_big_side"
android:layout_height="@dimen/picto_big_side"
android:background="@drawable/picto_grid_item_border"
android:gravity="center_vertical|center|center_horizontal"
android:padding="@dimen/picto_border_width">
<FrameLayout
android:id="@+id/picto_grid_item_layout_big"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/picto_grid_item_layout_big"
android:background="@color/picto_default_background"
>
android:background="@color/picto_default_background">
<ImageView
android:id="@+id/picto_grid_item_image_big"
......@@ -20,32 +20,32 @@
android:layout_height="match_parent" />
<TextView
android:id="@+id/legend_text_big"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/legend_text_big"
android:textSize="13sp"
android:textColor="@android:color/black"
android:textAlignment="center"
android:layout_gravity="bottom"
android:visibility="gone"
android:background="@android:color/white" />
android:background="@android:color/white"
android:textAlignment="center"
android:textColor="@android:color/black"
android:textSize="13sp"
android:visibility="gone" />
<TextView
android:id="@+id/legend_text_big_full"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/legend_text_big_full"
android:textSize="20sp"
android:textColor="@android:color/black"
android:textAlignment="center"
android:gravity="center"
android:layout_gravity="center"
android:visibility="gone"
android:background="@android:color/white" />
android:background="@android:color/white"
android:gravity="center"
android:textAlignment="center"
android:textColor="@android:color/black"
android:textSize="20sp"
android:visibility="gone" />
<ImageView
android:id="@+id/picto_grid_item_redcross_big"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/picto_grid_item_redcross_big"
android:src="@drawable/disabled_picto" />
</FrameLayout>
......
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
android:background="#BDBDBD"
android:keepScreenOn="true"
tools:context="com.yottacode.pictogram.tabletlibrary.gui.communicator.PictogramActivity"
android:padding="@dimen/small_padding">
android:orientation="horizontal"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
tools:context="com.yottacode.pictogram.tabletlibrary.gui.communicator.VOCA">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/pictogramLayout"
>
android:layout_width="match_parent"
android:layout_height="match_parent">
<!-- android:keepScreenOn - To keep the screen bright as long as the app is visible (also forever) -->
<ImageButton
android:layout_width="@dimen/picto_normal_width"
android:layout_height="@dimen/tape_normal_height"
android:src="@drawable/remove_picto_from_tape"
android:id="@+id/button_delete"
android:layout_alignParentTop="true"
android:layout_width="@dimen/tape_normal_height"
android:layout_height="@dimen/tape_normal_height"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:background="@android:color/holo_red_light"
android:clickable="true"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:clickable="true"
android:background="@android:color/holo_red_light" />
android:src="@drawable/remove_picto_from_tape" />
<GridView
android:id="@+id/tape_grid_view"
android:layout_width="@dimen/picto_normal_width"
android:layout_width="match_parent"
android:layout_height="@dimen/tape_normal_height"
android:layout_toEndOf="@+id/button_delete"
android:layout_toStartOf="@+id/button_tts"
......@@ -44,27 +40,27 @@
android:numColumns="8"></GridView>
<ImageButton
android:layout_width="@dimen/picto_normal_width"
android:layout_height="@dimen/tape_normal_height"
android:src="@drawable/send_tape"
android:background="@android:color/holo_red_light"
android:id="@+id/button_tts"
android:adjustViewBounds="true"
android:layout_alignParentTop="true"
android:layout_width="@dimen/tape_normal_height"
android:layout_height="@dimen/tape_normal_height"
android:layout_alignParentEnd="true"
android:layout_alignParentTop="true"
android:adjustViewBounds="true"
android:background="@android:color/holo_red_light"
android:clickable="true"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:clickable="true" />
android:src="@drawable/send_tape" />
<ImageButton
android:id="@+id/showPictoCategoriesViewButton"
android:layout_width="96dp"
android:layout_height="match_parent"
android:id="@+id/showPictoCategoriesViewButton"
android:layout_alignParentStart="true"
android:src="@drawable/show_categories_grid"
android:layout_below="@+id/button_delete"
android:background="#EEEEEE"
android:layout_below="@+id/tape_grid_view"
android:scaleType="fitCenter" />
android:scaleType="fitCenter"
android:src="@drawable/show_categories_grid" />
<GridView
android:id="@+id/picto_category_grid_view"
......@@ -89,7 +85,7 @@
android:layout_alignParentBottom="true"
android:layout_alignParentEnd="true"
android:layout_alignParentStart="true"
android:layout_below="@+id/tape_grid_view"
android:layout_below="@+id/button_delete"
android:background="#DDDDDD"
android:gravity="center_vertical|center|center_horizontal"
android:horizontalSpacing="@dimen/picto_grid_spacing"
......
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
android:background="#BDBDBD"
android:keepScreenOn="true"
tools:context="com.yottacode.pictogram.tabletlibrary.gui.communicator.PictogramActivity"
android:padding="@dimen/small_padding">
android:orientation="horizontal"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
tools:context="com.yottacode.pictogram.tabletlibrary.gui.communicator.VOCA">
<RelativeLayout
android:id="@+id/pictogramLayout"
......@@ -16,10 +14,9 @@
android:layout_height="match_parent">
<!-- android:keepScreenOn - To keep the screen bright as long as the app is visible (also forever) -->
<ImageButton
android:id="@+id/button_delete"
android:layout_width="@dimen/picto_big_width"
android:layout_width="@dimen/tape_big_height"
android:layout_height="@dimen/tape_big_height"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
......@@ -31,7 +28,7 @@
<GridView
android:id="@+id/tape_grid_view"
android:layout_width="@dimen/picto_big_width"
android:layout_width="match_parent"
android:layout_height="@dimen/tape_big_height"
android:layout_toEndOf="@+id/button_delete"
android:layout_toStartOf="@+id/button_tts"
......@@ -46,7 +43,7 @@
<ImageButton
android:id="@+id/button_tts"
android:layout_width="@dimen/picto_big_width"
android:layout_width="@dimen/tape_big_height"
android:layout_height="@dimen/tape_big_height"
android:layout_alignParentEnd="true"
android:layout_alignParentTop="true"
......@@ -62,7 +59,7 @@
android:layout_width="96dp"
android:layout_height="match_parent"
android:layout_alignParentStart="true"
android:layout_below="@+id/tape_grid_view"
android:layout_below="@+id/button_delete"
android:background="#EEEEEE"
android:scaleType="fitCenter"
android:src="@drawable/show_categories_grid" />
......@@ -90,7 +87,7 @@
android:layout_alignParentBottom="true"
android:layout_alignParentEnd="true"
android:layout_alignParentStart="true"
android:layout_below="@+id/tape_grid_view"
android:layout_below="@+id/button_delete"
android:background="#DDDDDD"
android:gravity="center_vertical|center|center_horizontal"
android:horizontalSpacing="@dimen/picto_grid_spacing"
......
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#BDBDBD"
android:keepScreenOn="true"
android:orientation="horizontal"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
tools:context="com.yottacode.pictogram.tabletlibrary.gui.communicator.VocabularyManager">
<RelativeLayout
android:id="@+id/pictogramLayout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<!-- android:keepScreenOn - To keep the screen bright as long as the app is visible (also forever) -->
<RelativeLayout
android:id="@+id/vmTopbarLayout"
android:layout_width="match_parent"
android:layout_height="@dimen/menu_top_height"
android:background="@color/VerdeApp">
<ImageView
android:id="@+id/vmTopbarStudentPhoto"
android:layout_width="@dimen/menu_top_height"
android:layout_height="@dimen/menu_top_height"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:layout_gravity="left"
android:background="@color/accent_material_dark"
android:scaleType="centerCrop" />
<LinearLayout
android:id="@+id/vmTopbarStudentNameLayout"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_centerVertical="true"
android:layout_marginLeft="8dp"
android:layout_marginRight="8dp"
android:layout_toEndOf="@+id/vmTopbarStudentPhoto"
android:gravity="center_vertical"
android:orientation="vertical">
<TextView
android:id="@+id/vmTopbarStudentFullName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="@color/BlancoApp" />
</LinearLayout>
</RelativeLayout>
<ImageButton
android:id="@+id/showPictoCategoriesViewButton"
android:layout_width="96dp"
android:layout_height="match_parent"
android:layout_alignParentStart="true"
android:layout_below="@+id/vmTopbarLayout"
android:background="#EEEEEE"
android:scaleType="fitCenter"
android:src="@drawable/show_categories_grid" />
<GridView
android:id="@+id/picto_category_grid_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentBottom="true"
android:layout_alignParentEnd="true"
android:layout_below="@+id/vmTopbarLayout"
android:layout_toEndOf="@+id/showPictoCategoriesViewButton"
android:background="#DDDDDD"
android:gravity="center_vertical|center|center_horizontal"
android:horizontalSpacing="@dimen/picto_grid_spacing"
android:numColumns="10"
android:paddingLeft="@dimen/small_padding"
android:paddingRight="@dimen/small_padding"
android:verticalSpacing="@dimen/picto_grid_spacing"></GridView>
<GridView
android:id="@+id/picto_main_grid_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentBottom="true"
android:layout_alignParentEnd="true"
android:layout_alignParentStart="true"
android:layout_below="@+id/vmTopbarLayout"
android:background="#DDDDDD"
android:gravity="center_vertical|center|center_horizontal"
android:horizontalSpacing="@dimen/picto_grid_spacing"
android:verticalSpacing="@dimen/picto_grid_spacing"></GridView>
</RelativeLayout>
<FrameLayout
android:id="@+id/fragment_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:orientation="horizontal">
</FrameLayout>
</FrameLayout>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#BDBDBD"
android:keepScreenOn="true"
android:orientation="horizontal"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
tools:context="com.yottacode.pictogram.tabletlibrary.gui.communicator.VocabularyManager">
<RelativeLayout
android:id="@+id/pictogramLayout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<!-- android:keepScreenOn - To keep the screen bright as long as the app is visible (also forever) -->
<RelativeLayout
android:id="@+id/vmTopbarLayout"
android:layout_width="match_parent"
android:layout_height="@dimen/menu_top_height"
android:layout_alignParentStart="true"
android:background="@color/VerdeApp">
<ImageView
android:id="@+id/vmTopbarStudentPhoto"
android:layout_width="@dimen/menu_top_height"
android:layout_height="@dimen/menu_top_height"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:layout_gravity="left"
android:background="@color/accent_material_dark"
android:scaleType="centerCrop" />
<LinearLayout
android:id="@+id/vmTopbarStudentNameLayout"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_centerVertical="true"
android:layout_marginLeft="8dp"
android:layout_marginRight="8dp"
android:layout_toEndOf="@+id/vmTopbarStudentPhoto"
android:gravity="center_vertical"
android:orientation="vertical">
<TextView
android:id="@+id/vmTopbarStudentFullName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
android:textAppearance="?android:attr/textAppearanceMedium" />
</LinearLayout>
</RelativeLayout>
<ImageButton
android:id="@+id/showPictoCategoriesViewButton"
android:layout_width="96dp"
android:layout_height="match_parent"
android:layout_alignParentStart="true"
android:layout_below="@+id/vmTopbarLayout"
android:background="#EEEEEE"
android:scaleType="fitCenter"
android:src="@drawable/show_categories_grid" />
<GridView
android:id="@+id/picto_category_grid_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentBottom="true"
android:layout_alignParentEnd="true"
android:layout_below="@+id/vmTopbarLayout"
android:layout_toEndOf="@+id/showPictoCategoriesViewButton"
android:background="#DDDDDD"
android:gravity="center_vertical|center|center_horizontal"
android:horizontalSpacing="@dimen/picto_grid_spacing"
android:numColumns="8"
android:paddingLeft="@dimen/small_padding"
android:paddingRight="@dimen/small_padding"
android:verticalSpacing="@dimen/picto_grid_spacing"></GridView>
<GridView
android:id="@+id/picto_main_grid_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentBottom="true"
android:layout_alignParentEnd="true"
android:layout_alignParentStart="true"
android:layout_below="@+id/vmTopbarLayout"
android:background="#DDDDDD"
android:gravity="center_vertical|center|center_horizontal"
android:horizontalSpacing="@dimen/picto_grid_spacing"
android:paddingLeft="@dimen/small_padding"
android:verticalSpacing="@dimen/picto_grid_spacing"></GridView>
</RelativeLayout>
<FrameLayout
android:id="@+id/fragment_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:orientation="horizontal">
</FrameLayout>
</FrameLayout>
......@@ -62,13 +62,6 @@
<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/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/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/test/assets" type="java-test-resource" />
......@@ -76,6 +69,13 @@
<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/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/blame" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/bundles" />
......@@ -121,17 +121,5 @@
<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="module" module-name="commonlibrary" exported="" />
<orderEntry type="library" exported="" name="android-android-24" level="project" />
<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>
</module>
\ No newline at end of file
......@@ -50,7 +50,13 @@
android:label="@string/title_activity_login_activity_fragments"
android:screenOrientation="landscape" />
<activity
android:name="com.yottacode.pictogram.tabletlibrary.gui.communicator.PictogramActivity"
android:name="com.yottacode.pictogram.tabletlibrary.gui.communicator.VOCA"
android:exported="true"
android:label="@string/app_name"
android:launchMode="singleTop"
android:screenOrientation="landscape" />
<activity
android:name="com.yottacode.pictogram.tabletlibrary.gui.communicator.VocabularyManager"
android:exported="true"
android:label="@string/app_name"
android:launchMode="singleTop"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment