Commit 2836fb74 authored by Anuththara18's avatar Anuththara18

Consent Form UI Modification

parent 68c7e6f9
......@@ -3,9 +3,13 @@ package com.anuththara18.attentionassessment.consentform;
import android.content.Intent;
import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
import android.view.View;
import android.view.WindowManager;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.widget.Button;
import android.widget.ImageButton;
import android.widget.TextView;
import androidx.appcompat.app.AppCompatActivity;
......@@ -25,7 +29,8 @@ public class ConsentFormActivity extends AppCompatActivity {
RecyclerView recyclerView;
List<ConsentForm> consentFormList;
private Boolean[] chkArr;
TextView textView, next;
TextView textView;
ImageButton next;
@Override
protected void onCreate(Bundle savedInstanceState) {
......@@ -43,6 +48,22 @@ public class ConsentFormActivity extends AppCompatActivity {
textView = findViewById(R.id.textView);
next = findViewById(R.id.next);
final Handler handler = new Handler();
handler.postDelayed(new Runnable() {
@Override
public void run() {
runOnUiThread(new Runnable() {
@Override
public void run() {
Animation animZoomOut = AnimationUtils.loadAnimation(getApplicationContext(),R.anim.zoom_out);
next.startAnimation(animZoomOut);
handler.postDelayed(this, 750);
}
});
}
}, 0);
if (ParentDetailsActivity.nav == 0) {
next.setVisibility(View.INVISIBLE);
next.setEnabled(false);
......@@ -53,7 +74,6 @@ public class ConsentFormActivity extends AppCompatActivity {
}
textView.setText(LanguageSetter.getresources().getString(R.string.consentForm));
next.setText(LanguageSetter.getresources().getString(R.string.proceed));
initData();
initRecyclerView();
......@@ -61,6 +81,7 @@ public class ConsentFormActivity extends AppCompatActivity {
next.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
finish();
Intent intent = new Intent(getApplicationContext(), GetParentsConsentActivity.class);
startActivity(intent);
}
......
......@@ -3,8 +3,12 @@ package com.anuththara18.attentionassessment.consentform;
import android.content.Intent;
import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
import android.view.View;
import android.view.WindowManager;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.widget.ImageButton;
import android.widget.TextView;
import androidx.appcompat.app.AppCompatActivity;
......@@ -22,7 +26,8 @@ public class SinhalaConsentFormActivity extends AppCompatActivity {
RecyclerView recyclerView;
List<ConsentForm> consentFormList;
private Boolean[] chkArr;
TextView textView, next;
TextView textView;
ImageButton next;
@Override
protected void onCreate(Bundle savedInstanceState) {
......@@ -41,15 +46,31 @@ public class SinhalaConsentFormActivity extends AppCompatActivity {
next = findViewById(R.id.next);
textView.setText(LanguageSetter.getresources().getString(R.string.consentForm));
next.setText(LanguageSetter.getresources().getString(R.string.proceed));
final Handler handler = new Handler();
handler.postDelayed(new Runnable() {
@Override
public void run() {
runOnUiThread(new Runnable() {
@Override
public void run() {
Animation animZoomOut = AnimationUtils.loadAnimation(getApplicationContext(),R.anim.zoom_out);
next.startAnimation(animZoomOut);
handler.postDelayed(this, 750);
}
});
}
}, 0);
initData();
initRecyclerView();
TextView next = findViewById(R.id.next);
next = findViewById(R.id.next);
next.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
finish();
Intent intent = new Intent(getApplicationContext(), GetParentsConsentActivity.class);
startActivity(intent);
}
......
......@@ -9,20 +9,19 @@
android:background="#F6F6F6"
tools:context=".consentform.ConsentFormActivity">
<TextView
<ImageButton
android:id="@+id/next"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:drawableEnd="@drawable/icon_right"
android:drawableTint="@color/black"
android:gravity="right"
android:paddingRight="30dp"
android:text="@string/proceed"
android:textColor="@color/black"
android:textSize="16dp" />
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_marginRight="25dp"
android:layout_marginTop="25dp"
android:layout_gravity="right"
android:background="@drawable/right_btn"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
<TextView
android:id="@+id/textView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
......
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