auto indent files

parent 6787d27c
<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"
......
......@@ -26,7 +26,7 @@ import java.util.Vector;
* LoginActivity show the login window to select the student and supervisor
* It uses device to read the token value
*/
public class LoginActivity extends FragmentActivity {
public class LoginActivity extends FragmentActivity {
// String constant for logs
......@@ -34,30 +34,31 @@ 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);
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
onWindowFocusChanged(true);
requestWindowFeature(Window.FEATURE_NO_TITLE);
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);
logoutButton.setEnabled(true);
logoutButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent serialActivity = new Intent(getBaseContext(), com.yottacode.pictogram.tabletlibrary.gui.login.SerialActivity.class);
serialActivity.putExtra("resetPrevUser", true);
startActivity(serialActivity);
}
});
final Button logoutButton = (Button) findViewById(R.id.loginTopbarLogout);
logoutButton.setEnabled(true);
logoutButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent serialActivity = new Intent(getBaseContext(), com.yottacode.pictogram.tabletlibrary.gui.login.SerialActivity.class);
serialActivity.putExtra("resetPrevUser", true);
startActivity(serialActivity);
}
});
}
@Override
......@@ -69,7 +70,7 @@ public class LoginActivity extends FragmentActivity {
supervisorFullNameView.setText(
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);
imgs.add(new Img(
......@@ -81,7 +82,7 @@ public class LoginActivity extends FragmentActivity {
@Override
public void loadComplete() {
try {
supervisorPhotoView.setImageBitmap(
supervisorPhotoView.setImageBitmap(
imgs.get(0).get_bitmap(PCBcontext.getContext())
);
supervisorPhotoView.invalidate();
......@@ -91,22 +92,25 @@ public class LoginActivity extends FragmentActivity {
}
@Override
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());
}
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());
}
}, ImgDownloader.tsource.remote);
downloader.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, imgs);
}
@Override
protected void onStop() {
super.onStop();
Log.i(LOG_TAG,"Closing Login window");
PCBcontext.getNetService().closeNotifyStatus();
}
@Override
protected void onStop() {
super.onStop();
Log.i(LOG_TAG, "Closing Login window");
PCBcontext.getNetService().closeNotifyStatus();
}
@Override
public void onResume() {
super.onResume();
......
......@@ -14,7 +14,6 @@
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/tape_normal_height"
......
......@@ -14,7 +14,6 @@
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/tape_big_height"
......
......@@ -86,12 +86,12 @@
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"
android:layout_below="@+id/vmTopbarLayout"></GridView>
android:verticalSpacing="@dimen/picto_grid_spacing"></GridView>
</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