auto indent files

parent 6787d27c
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.yottacode.pictogram.tabletlibrary"> package="com.yottacode.pictogram.tabletlibrary">
<uses-permission android:name="android.permission.RECORD_AUDIO" /> <uses-permission android:name="android.permission.RECORD_AUDIO" />
<application <application
android:allowBackup="true" android:allowBackup="true"
......
...@@ -26,7 +26,7 @@ import java.util.Vector; ...@@ -26,7 +26,7 @@ import java.util.Vector;
* LoginActivity show the login window to select the student and supervisor * LoginActivity show the login window to select the student and supervisor
* It uses device to read the token value * It uses device to read the token value
*/ */
public class LoginActivity extends FragmentActivity { public class LoginActivity extends FragmentActivity {
// String constant for logs // String constant for logs
...@@ -34,30 +34,31 @@ public class LoginActivity extends FragmentActivity { ...@@ -34,30 +34,31 @@ public class LoginActivity extends FragmentActivity {
/** /**
* If there is Internet connection it calls the WS to recover the pairs student-supervisor * If there is Internet connection it calls the WS to recover the pairs student-supervisor
*
* @param savedInstanceState * @param savedInstanceState
*/ */
@TargetApi(Build.VERSION_CODES.LOLLIPOP) @TargetApi(Build.VERSION_CODES.LOLLIPOP)
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE); requestWindowFeature(Window.FEATURE_NO_TITLE);
onWindowFocusChanged(true); onWindowFocusChanged(true);
setContentView(com.yottacode.pictogram.tabletlibrary.R.layout.activity_login); setContentView(com.yottacode.pictogram.tabletlibrary.R.layout.activity_login);
// Enable logout button // Enable logout button
final Button logoutButton = (Button) findViewById(R.id.loginTopbarLogout); final Button logoutButton = (Button) findViewById(R.id.loginTopbarLogout);
logoutButton.setEnabled(true); logoutButton.setEnabled(true);
logoutButton.setOnClickListener(new View.OnClickListener() { logoutButton.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
Intent serialActivity = new Intent(getBaseContext(), com.yottacode.pictogram.tabletlibrary.gui.login.SerialActivity.class); Intent serialActivity = new Intent(getBaseContext(), com.yottacode.pictogram.tabletlibrary.gui.login.SerialActivity.class);
serialActivity.putExtra("resetPrevUser", true); serialActivity.putExtra("resetPrevUser", true);
startActivity(serialActivity); startActivity(serialActivity);
} }
}); });
} }
@Override @Override
...@@ -69,7 +70,7 @@ public class LoginActivity extends FragmentActivity { ...@@ -69,7 +70,7 @@ public class LoginActivity extends FragmentActivity {
supervisorFullNameView.setText( supervisorFullNameView.setText(
this.getIntent().getStringExtra("name") + " " + this.getIntent().getStringExtra("name") + " " +
this.getIntent().getStringExtra("surname") + " ("+this.getIntent().getStringExtra("email")+")"); this.getIntent().getStringExtra("surname") + " (" + this.getIntent().getStringExtra("email") + ")");
final Vector<Img> imgs = new Vector<>(1); final Vector<Img> imgs = new Vector<>(1);
imgs.add(new Img( imgs.add(new Img(
...@@ -81,7 +82,7 @@ public class LoginActivity extends FragmentActivity { ...@@ -81,7 +82,7 @@ public class LoginActivity extends FragmentActivity {
@Override @Override
public void loadComplete() { public void loadComplete() {
try { try {
supervisorPhotoView.setImageBitmap( supervisorPhotoView.setImageBitmap(
imgs.get(0).get_bitmap(PCBcontext.getContext()) imgs.get(0).get_bitmap(PCBcontext.getContext())
); );
supervisorPhotoView.invalidate(); supervisorPhotoView.invalidate();
...@@ -91,22 +92,25 @@ public class LoginActivity extends FragmentActivity { ...@@ -91,22 +92,25 @@ public class LoginActivity extends FragmentActivity {
} }
@Override @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()); @Override
Log.e(this.getClass().getCanonicalName(), "Server error:"+ e.getLocalizedMessage()); public void error(Exception e) {
} GUITools.show_alert(PCBcontext.getContext(), R.string.serverError, e.getMessage());
Log.e(this.getClass().getCanonicalName(), "Server error:" + e.getLocalizedMessage());
}
}, ImgDownloader.tsource.remote); }, ImgDownloader.tsource.remote);
downloader.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, imgs); downloader.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, imgs);
} }
@Override @Override
protected void onStop() { protected void onStop() {
super.onStop(); super.onStop();
Log.i(LOG_TAG,"Closing Login window"); Log.i(LOG_TAG, "Closing Login window");
PCBcontext.getNetService().closeNotifyStatus(); PCBcontext.getNetService().closeNotifyStatus();
} }
@Override @Override
public void onResume() { public void onResume() {
super.onResume(); super.onResume();
......
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
android:layout_height="match_parent"> android:layout_height="match_parent">
<!-- android:keepScreenOn - To keep the screen bright as long as the app is visible (also forever) --> <!-- android:keepScreenOn - To keep the screen bright as long as the app is visible (also forever) -->
<ImageButton <ImageButton
android:id="@+id/button_delete" android:id="@+id/button_delete"
android:layout_width="@dimen/tape_normal_height" android:layout_width="@dimen/tape_normal_height"
......
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
android:layout_height="match_parent"> android:layout_height="match_parent">
<!-- android:keepScreenOn - To keep the screen bright as long as the app is visible (also forever) --> <!-- android:keepScreenOn - To keep the screen bright as long as the app is visible (also forever) -->
<ImageButton <ImageButton
android:id="@+id/button_delete" android:id="@+id/button_delete"
android:layout_width="@dimen/tape_big_height" android:layout_width="@dimen/tape_big_height"
......
...@@ -86,12 +86,12 @@ ...@@ -86,12 +86,12 @@
android:layout_alignParentBottom="true" android:layout_alignParentBottom="true"
android:layout_alignParentEnd="true" android:layout_alignParentEnd="true"
android:layout_alignParentStart="true" android:layout_alignParentStart="true"
android:layout_below="@+id/vmTopbarLayout"
android:background="#DDDDDD" android:background="#DDDDDD"
android:gravity="center_vertical|center|center_horizontal" android:gravity="center_vertical|center|center_horizontal"
android:horizontalSpacing="@dimen/picto_grid_spacing" android:horizontalSpacing="@dimen/picto_grid_spacing"
android:paddingLeft="@dimen/small_padding" android:paddingLeft="@dimen/small_padding"
android:verticalSpacing="@dimen/picto_grid_spacing" android:verticalSpacing="@dimen/picto_grid_spacing"></GridView>
android:layout_below="@+id/vmTopbarLayout"></GridView>
</RelativeLayout> </RelativeLayout>
......
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