Skip to content

Commit

Permalink
Updated interaction in UIs
Browse files Browse the repository at this point in the history
  • Loading branch information
chamudij committed May 18, 2022
1 parent 9d9939e commit 1101c4c
Show file tree
Hide file tree
Showing 30 changed files with 577 additions and 280 deletions.
2 changes: 1 addition & 1 deletion .idea/deploymentTargetDropDown.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 10 additions & 3 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions .idea/vcs.xml

This file was deleted.

5 changes: 0 additions & 5 deletions README.md

This file was deleted.

5 changes: 5 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ android {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
buildFeatures {
viewBinding true
}
}

dependencies {
Expand All @@ -33,6 +36,8 @@ dependencies {
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'com.google.android.material:material:1.5.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
implementation 'androidx.navigation:navigation-fragment:2.4.2'
implementation 'androidx.navigation:navigation-ui:2.4.2'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
Expand Down
21 changes: 21 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,27 @@
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.BabyCare">
<activity
android:name=".VaccinationTrackerActivity"
android:exported="false" />
<activity
android:name=".WeightTrackerActivity"
android:exported="false" />
<activity
android:name=".HeightTrackerActivity"
android:exported="false" />
<activity
android:name=".VaccinationActivity"
android:exported="false" />
<activity
android:name=".DashboardActivity"
android:exported="false" />
<activity
android:name=".AddBabyActivity"
android:exported="false" />
<activity
android:name=".FirstPageActivity"
android:exported="false" />
<activity
android:name=".MainActivity"
android:exported="true">
Expand Down
28 changes: 28 additions & 0 deletions app/src/main/java/com/example/babycare/AddBabyActivity.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
package com.example.babycare;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

public class AddBabyActivity extends AppCompatActivity {
public Button button;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_add_baby);

button = (Button) findViewById(R.id.btn_addbaby_done);

button.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v){
Intent intent = new Intent(AddBabyActivity.this,VaccinationActivity.class);
startActivity(intent);
}
});
}
}
49 changes: 49 additions & 0 deletions app/src/main/java/com/example/babycare/DashboardActivity.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
package com.example.babycare;

import androidx.appcompat.app.AppCompatActivity;
import androidx.cardview.widget.CardView;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;

public class DashboardActivity extends AppCompatActivity implements View.OnClickListener {
public CardView card1,card2,card3;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_dashboard);

card1 = (CardView) findViewById(R.id.card_height);
card2 = (CardView) findViewById(R.id.card_weight);
card3 = (CardView) findViewById(R.id.card_vaccine);

card1.setOnClickListener(this);
card2.setOnClickListener(this);
card3.setOnClickListener(this);
}

@Override
public void onClick(View view) {
Intent intent;

switch (view.getId()){
case R.id.card_height:
intent = new Intent(DashboardActivity.this,HeightTrackerActivity.class);
startActivity(intent);
break;

case R.id.card_weight:
intent = new Intent(DashboardActivity.this,WeightTrackerActivity.class);
startActivity(intent);
break;

case R.id.card_vaccine:
intent = new Intent(DashboardActivity.this,VaccinationTrackerActivity.class);
startActivity(intent);
break;
}

}
}
38 changes: 38 additions & 0 deletions app/src/main/java/com/example/babycare/FirstPageActivity.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
package com.example.babycare;

import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.content.Intent;
import android.view.View;

public class FirstPageActivity extends AppCompatActivity {
public Button button1,button2;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_first_page);

button1 = (Button) findViewById(R.id.btn_signin);

button1.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v1){
Intent intent1 = new Intent(FirstPageActivity.this,AddBabyActivity.class);
startActivity(intent1);
}
});

button2 = (Button) findViewById(R.id.btn_login);

button2.setOnClickListener(new View.OnClickListener(){
@Override
public void onClick(View v2){
Intent intent2 = new Intent(FirstPageActivity.this,DashboardActivity.class);
startActivity(intent2);
}
});
}
}
27 changes: 27 additions & 0 deletions app/src/main/java/com/example/babycare/HeightTrackerActivity.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
package com.example.babycare;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

public class HeightTrackerActivity extends AppCompatActivity {
public Button button;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_height_tracker);

button = (Button)findViewById(R.id.btn_height_back);
button.setOnClickListener(new View.OnClickListener(){
@Override
public void onClick(View v){
Intent intent = new Intent(HeightTrackerActivity.this,DashboardActivity.class);
startActivity(intent);
}
});
}
}
16 changes: 15 additions & 1 deletion app/src/main/java/com/example/babycare/MainActivity.java
Original file line number Diff line number Diff line change
@@ -1,14 +1,28 @@
package com.example.babycare;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.widget.Button;
import android.content.Intent;
import android.view.View;

public class MainActivity extends AppCompatActivity {

public Button button;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);

button = (Button) findViewById(R.id.btn_start);

button.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v){
Intent intent = new Intent( MainActivity.this,FirstPageActivity.class);
startActivity(intent);
}
});
}
}
26 changes: 26 additions & 0 deletions app/src/main/java/com/example/babycare/VaccinationActivity.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package com.example.babycare;

import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

public class VaccinationActivity extends AppCompatActivity {
public Button button;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_vaccination);

button = (Button)findViewById(R.id.btn_firstVaccineDone);
button.setOnClickListener(new View.OnClickListener(){
@Override
public void onClick(View v){
Intent intent = new Intent(VaccinationActivity.this,DashboardActivity.class);
startActivity(intent);
}
});
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
package com.example.babycare;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

public class VaccinationTrackerActivity extends AppCompatActivity {
public Button button;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_vaccination_tracker);

button = (Button)findViewById(R.id.btn_vaccine_back);
button.setOnClickListener(new View.OnClickListener(){
@Override
public void onClick(View v){
Intent intent = new Intent(VaccinationTrackerActivity.this,DashboardActivity.class);
startActivity(intent);
}
});
}
}
27 changes: 27 additions & 0 deletions app/src/main/java/com/example/babycare/WeightTrackerActivity.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
package com.example.babycare;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

public class WeightTrackerActivity extends AppCompatActivity {
public Button button;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_weight_tracker);

button = (Button)findViewById(R.id.btn_weight_back);
button.setOnClickListener(new View.OnClickListener(){
@Override
public void onClick(View v){
Intent intent = new Intent(WeightTrackerActivity.this,DashboardActivity.class);
startActivity(intent);
}
});
}
}
Loading

0 comments on commit 1101c4c

Please sign in to comment.