trabajando en v1.1

parent 57b7f0d8
......@@ -11,7 +11,7 @@ android {
versionName "1.0"
resValue "string", "db_name", "PCB.db"
resValue "integer", "db_version", "4"
resValue "string", "app_version", "1.1"
resValue "string", "app_version", "1.0"
resValue "string", "core_vocabulary", "core_vocabulary"
resValue "string", "apk", "to_be_set_in_subproject"
resValue "string", "VersionManagerClass", "to_be_set_in_subproject"
......@@ -20,7 +20,7 @@ android {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
resValue "string", "server", "https://api.pictogramweb.com"
resValue "string", "server", "https:/pre.yottacode.com"
resValue "bool", "force_db_create", "false"
resValue "bool", "ssl_connect", "true"
resValue "bool", "force_img_download", "false"
......@@ -28,7 +28,7 @@ android {
resValue "integer", "netservice_force_restfull_synchro", "30"
}
debug {
resValue "string", "server", "https://apidev.pictogramweb.com"
resValue "string", "server", "https://dev.yottacode.com"
resValue "bool", "force_db_create", "false"
resValue "bool", "ssl_connect", "false"
resValue "bool", "force_img_download", "false"
......
package com.yottacode.pictogram.net;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.util.Log;
import com.yottacode.net.RestapiWrapper;
......@@ -131,9 +129,11 @@ public class NetService implements Runnable, RestapiWrapper.iSilentLogin {
public boolean online() {return updated;}
public void restart_app(boolean direct_login) {
for (iNetServiceStatus listener: listeners)
if (listener instanceof iNetServiceDevice) ((iNetServiceDevice)listener).restart_app(direct_login);
public void restart_app(boolean resetPrevLogin) {
for (iNetServiceStatus listener: listeners) {
Log.e(LOG_TAG,"rest"+resetPrevLogin);
if (listener instanceof iNetServiceDevice) ((iNetServiceDevice)listener).restart_app(resetPrevLogin);
}
PCBcontext.unset_user();
}
......
......@@ -18,7 +18,7 @@ android {
targetSdkVersion 22
versionCode 1
versionName "1.0"
resValue "bool","alwaysNotifyVisible","false"
resValue "bool","NotifyAllwaysVisible","false"
resValue "string", "VersionManagerClass", "com.yottacode.pictogram.supervisor_tablet.net.VersionManager"
resValue "string","apk","pictograms.apk"
// signingConfig signingConfigs.config
......
......@@ -8,7 +8,7 @@ android {
targetSdkVersion 22
versionCode 1
versionName "1.0"
resValue "bool","alwaysNotifyVisible","false"
resValue "bool","NotifyAllwaysVisible","false"
resValue "integer", "rows", "5"
resValue "integer", "columns", "10"
resValue "integer", "rows_big", "4"
......
......@@ -984,14 +984,10 @@ protected void showOnlyTape(boolean onlyTape) {
Picto last=tapeAdapter.deleteLastView();
tapeAdapter.notifyDataSetChanged();
if (pictoMainGridAdapter.pictoInThisCategory(last)) {
if (pictoMainGridAdapter.pictoInThisCategory(last))
pictoMainGridAdapter.pictoInGrid(last);
pictoMainGridAdapter.notifyDataSetChanged();
}
if (pictoCategoryGridAdapter.pictoInThisCategory(last)) {
if (pictoCategoryGridAdapter.pictoInThisCategory(last))
pictoCategoryGridAdapter.pictoInGrid(last);
pictoCategoryGridAdapter.notifyDataSetChanged();
}
}
if (!tapeAdapter.hasElements() && tape_delivered) showOnlyTape(false);
}
......@@ -1052,7 +1048,7 @@ protected void showOnlyTape(boolean onlyTape) {
if (SessionActivity.session!=null) SessionActivity.session.finish();
PCBcontext.getNetService().restart_app(true);
}
return false;
return true;
}
}
......
......@@ -170,7 +170,7 @@ public class SerialActivity extends Activity {
@Override
public void onStart() {
Vector<User> users;
Log.i(this.getClass().getCanonicalName(),"Starting serial activity (direct login:"+!getIntent().getBooleanExtra("resetPrevUser", true)+")");
Log.i(this.getClass().getCanonicalName(),"Starting serial activity (Reset Prev user:"+getIntent().getBooleanExtra("resetPrevUser", true)+")");
if (!PCBcontext.init()) PCBcontext.init(this, new NetServiceTablet());
String default_user[] = loginUserPolicy();
String username = default_user[0];
......@@ -180,7 +180,7 @@ public class SerialActivity extends Activity {
mSerialViewMail.setText(username);
mSerialViewPass.setText(password);
Log.e(LOG_TAG,"restart prev user"+getIntent().getBooleanExtra("resetPrevUser", true));
if (!username.equals("") && !password.equals("") && !getIntent().getBooleanExtra("resetPrevUser", true))
new UserLogin().login(username, password, SerialActivity.this, PictogramActivity.class, LoginActivity.class);
......
......@@ -2,6 +2,7 @@ package com.yottacode.pictogram.tabletlibrary.net;
import android.app.Activity;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.support.v4.app.NotificationCompat;
......@@ -29,7 +30,7 @@ public class NetServiceTablet implements NetService.iNetServiceDevice {
public void build() {
this.builder = new NotificationCompat.Builder(PCBcontext.getContext()).setAutoCancel(true).setOngoing(PCBcontext.getContext().getResources().getBoolean(R.bool.alwaysNotifyVisible));
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);
TaskStackBuilder stackBuilder = TaskStackBuilder.create(PCBcontext.getContext());
stackBuilder.addParentStack(PictogramActivity.class);
......@@ -84,14 +85,14 @@ public class NetServiceTablet implements NetService.iNetServiceDevice {
activity.finish();
}
public void restart_app(boolean direct_login) {
public void restart_app(boolean resetPrevUser) {
Log.i(LOG_TAG,"App restarting");
Log.e(LOG_TAG,"App restarting, reset last login:"+resetPrevUser);
Context context=PCBcontext.getContext();
Intent serialActivity = new Intent(context, com.yottacode.pictogram.tabletlibrary.gui.login.SerialActivity.class);
serialActivity.putExtra("resetPrevUser", direct_login);
serialActivity.putExtra("resetPrevUser", resetPrevUser);
context.startActivity(serialActivity);
}
......
......@@ -14,33 +14,24 @@
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|center_horizontal"
android:layout_gravity="bottom|right"
android:gravity="center"
android:orientation="horizontal">
<TextView
android:id="@+id/textView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
android:layout_marginRight="15dp"
android:layout_weight="0.18"
android:text="Powered by"
android:textAlignment="center"
android:textColor="@color/common_plus_signin_btn_text_light_default" />
<ImageView
android:id="@+id/logo"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_width="80dp"
android:layout_height="80dp"
android:src="@drawable/pictogram_logo" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_width="570dp"
android:layout_height="match_parent"
android:layout_gravity="center_horizontal"
android:orientation="vertical"
android:weightSum="1">
>
<LinearLayout
android:layout_width="wrap_content"
......@@ -53,7 +44,6 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="10.48"
android:orientation="vertical">
<EditText
......@@ -109,20 +99,19 @@
<ImageView
android:id="@+id/imageView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_marginLeft="30px"
android:layout_toEndOf="@+id/serialmail"
android:layout_weight="1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="end"
android:layout_marginStart="30px"
android:elevation="1dp"
android:orientation="horizontal"
android:src="@drawable/login_image" />
</LinearLayout>
<LinearLayout
android:layout_width="570dp"
android:layout_height="160dp"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center_horizontal"
android:layout_marginTop="20dp"
android:orientation="horizontal">
......@@ -155,6 +144,8 @@
android:layout_height="match_parent"
android:divider="@color/common_plus_signin_btn_text_light_disabled"
android:dividerHeight="1dp"
android:fastScrollEnabled="true"
android:isScrollContainer="true"
tools:paddingBottom="@dimen/small_padding" />
</LinearLayout>
......@@ -166,7 +157,7 @@
android:layout_alignTop="@id/stuLay"
android:layout_marginStart="10dp"
android:layout_toEndOf="@id/stuLay"
android:background="@color/common_google_signin_btn_text_dark_default"
android:background="@color/common_plus_signin_btn_text_dark_pressed"
android:gravity="right"
android:orientation="vertical"
android:visibility="visible">
......@@ -180,6 +171,8 @@
android:textAlignment="center"
android:textColor="@color/BlancoApp"
android:textSize="18sp"
android:fastScrollEnabled="true"
android:isScrollContainer="true"
tools:text="Supervisores" />
<ListView
......
......@@ -14,6 +14,7 @@
android:layout_marginTop="8dp"
android:layout_marginRight="16dp"
android:layout_marginBottom="0dp"
android:background="@color/VerdeApp"
android:id="@+id/sessionTopbarLayout">
<ImageView
......
......@@ -33,7 +33,7 @@
android:layout_height="wrap_content"
android:textStyle="normal|bold"
android:textAlignment="center"
android:background="@color/common_google_signin_btn_text_light_disabled" />
android:background="@color/VerdeApp" />
<ListView
android:id="@+id/methodsListView"
......@@ -55,10 +55,10 @@
<TextView
android:text="@string/session_instruction"
android:background="@color/VerdeApp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textStyle="normal|bold"
android:background="@color/common_google_signin_btn_text_light_disabled"
android:textAlignment="center" />
<ListView
......
......@@ -6,7 +6,7 @@
<color name="black">#FF000000</color>
<color name="white">#FFFFFFFF</color>
<color name="gray_blue">#FF78909C</color>
<color name="blue_light">#FF40C4FF</color>
<color name="blue_light">#40c4ff</color>
<color name="gray">#FF727272</color>
......
......@@ -18,7 +18,7 @@ android {
targetSdkVersion 22
versionCode 1
versionName "1.0"
resValue "bool","alwaysNotifyVisible","true"
resValue "bool","NotifyAllwaysVisible","true"
resValue "string","apk","pictogram.apk"
resValue "string", "VersionManagerClass", "com.yottacode.pictogram.yotta_tablet.net.com.yottacode.pictogram.yotta_tablet.net.VersionManager"
// signingConfig signingConfigs.config
......
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