Commit 8f3bf05b authored by Lucas Braz Cunha's avatar Lucas Braz Cunha

Issue AGILE#152: TermAcitivty layout fix & is now accessible

Signed-off-by: Lucas Braz Cunha's avatarLucas B. Cunha <lbc16@inf.ufpr.br>
parent 7738b09f
......@@ -44,6 +44,9 @@
<activity android:name=".ForgotPasswordActivity">
</activity>
<activity android:name=".TermActivity">
</activity>
</application>
</manifest>
\ No newline at end of file
......@@ -200,11 +200,14 @@ public class HomeActivity extends AppCompatActivity implements HomeView,
Intent intent;
switch (item.getItemId()) {
case R.id.nav_my_info:
item.setChecked(false);
intent = new Intent(this, AccountActivity.class);
startActivity(intent);
return true;
case R.id.nav_schedule:
intent = new Intent(this, TermActivity.class);
item.setChecked(false);
startActivity(intent);
default:
}
return false;
......
package br.ufpr.c3sl.agendador.agendador;
import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
public class TermActivity extends AppCompatActivity {
......@@ -9,5 +12,25 @@ public class TermActivity extends AppCompatActivity {
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_term);
Button refusal = (Button) findViewById(R.id.btn_term_refusal);
Button accept = (Button) findViewById(R.id.btn_term_accept);
refusal.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(TermActivity.this, HomeActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent);
finish();
}
});
accept.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
}
});
}
}
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
<ScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/colorGray"
android:weightSum="1">
<ImageView
android:layout_width="120dp"
android:layout_height="112dp"
android:layout_marginTop="40dp"
android:src="@drawable/img_signupact_logo"
android:id="@+id/img_signupact"
android:padding="0dp"
android:layout_gravity="center_horizontal" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="36dp"
android:textStyle="bold"
android:text="@string/terms_title"
android:textSize="18sp"/>
<TextView
android:layout_width="wrap_content"
android:fillViewport="false">
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="32dp"
android:layout_gravity="center"
android:layout_marginEnd="32dp"
android:layout_marginStart="32dp"
android:text="@string/terms_text"
android:textAlignment="center"
android:textSize="16sp"/>
android:background="@color/colorGray"
android:weightSum="1">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginEnd="32dp"
android:layout_marginStart="32dp"
android:text="@string/terms_limits"
android:textAlignment="center"
android:textSize="16sp"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="- Setor Ambiental: 2 faltas."
android:textStyle="bold"
android:layout_gravity="center_horizontal"
android:textAlignment="center"
android:textSize="16sp"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="- Setor Ambiental: 2 faltas."
android:textStyle="bold"
android:layout_gravity="center_horizontal"
android:textAlignment="center"
android:textSize="16sp"
/>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/white_button_shape"
android:layout_gravity="center_horizontal"
android:paddingStart="15dp"
android:paddingEnd="15dp"
android:layout_marginTop="50dp"
android:text="@string/not_accept"/>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/green_button_shape"
android:layout_gravity="center_horizontal"
android:paddingStart="15dp"
android:paddingEnd="15dp"
android:layout_marginTop="10dp"
android:text="@string/accept_continue"/>
</LinearLayout>
\ No newline at end of file
<ImageView
android:layout_width="94.5dp"
android:layout_height="88.5dp"
android:layout_marginTop="40dp"
android:src="@drawable/img_terms_logo"
android:id="@+id/img_term_logo"
android:padding="0dp"
android:layout_gravity="center_horizontal" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="25dp"
android:text="@string/terms_title"
android:textSize="18sp"
android:textColor="@color/colorBlack"
android:textStyle="bold" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="22dp"
android:layout_gravity="center"
android:layout_marginEnd="32dp"
android:layout_marginStart="32dp"
android:text="@string/terms_text"
android:textAlignment="center"
android:textSize="16sp"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginEnd="32dp"
android:layout_marginStart="32dp"
android:text="@string/terms_limits"
android:textAlignment="center"
android:textSize="16sp"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="- Setor Ambiental: 2 faltas."
android:textStyle="bold"
android:layout_gravity="center_horizontal"
android:textAlignment="center"
android:textSize="16sp"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="- Setor Ambiental: 2 faltas."
android:textStyle="bold"
android:layout_gravity="center_horizontal"
android:textAlignment="center"
android:textSize="16sp"
/>
<Button
android:id="@+id/btn_term_refusal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/white_button_shape"
android:layout_gravity="center_horizontal"
android:paddingStart="15dp"
android:paddingEnd="15dp"
android:layout_marginTop="45dp"
android:text="@string/not_accept"/>
<Button
android:id="@+id/btn_term_accept"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/green_button_shape"
android:layout_gravity="center_horizontal"
android:paddingStart="15dp"
android:paddingEnd="15dp"
android:layout_marginTop="8dp"
android:layout_marginBottom="70dp"
android:text="@string/accept_continue"/>
</LinearLayout>
</ScrollView>
\ No newline at end of file
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 to comment