LAMPIRAN PROGRAM
Java Tampilan Menu Utama
package com.example.ridho.ayosehat; import android.content.Intent;
import android.support.v7.app.AppCompatActivity; import android.os.Bundle;
import android.view.View;
public class Beranda extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState);
setContentView(R.layout.activity_beranda); }
public void makan (View view){
Intent intent =new Intent(Beranda.this,Makanan.class); startActivity(intent);
}
public void about (View view){
Intent intent =new Intent(Beranda.this,Tentang.class); startActivity(intent);
}
public void gizi (View view){
Intent intent =new Intent(Beranda.this,Gizi.class); startActivity(intent);
}
public void diet (View view){
Intent intent =new Intent(Beranda.this,Diet.class); startActivity(intent);
} }
Java Tampilan Menu Gizi
package com.example.ridho.ayosehat; import android.content.Intent;
import android.support.v7.app.AppCompatActivity; import android.os.Bundle;
import android.view.View;
public class Gizi extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState);
setContentView(R.layout.activity_gizi); }
public void berat (View view){
Intent intent =new Intent(Gizi.this,Ideal.class); startActivity(intent);
}
public void air (View view){
Intent intent =new Intent(Gizi.this,Air.class); startActivity(intent);
}
public void tinggi (View view){
Intent intent =new Intent(Gizi.this,Tinggi.class); startActivity(intent);
} }
Java Tampilan Menu Tinggi
package com.example.ridho.ayosehat; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.EditText; import android.widget.TextView;
public class Tinggi extends AppCompatActivity {
EditText berat, tinggi; TextView hasil,cm; @Override
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState);
setContentView(R.layout.activity_tinggi); berat = (EditText) findViewById(R.id.bb); tinggi = (EditText) findViewById(R.id.tb); hasil = (TextView) findViewById(R.id.hasil); cm = (TextView) findViewById(R.id.cm);
}
public void tes(View view) { Double ideal, teb, beb;
beb = Double.parseDouble(berat.getText().toString()); ideal =(beb +110)-5;
hasil.setText("Tinggi Ideal anda Adalah "+ideal); cm.setText(" Cm");
} }
Java Tampilan Menu Berat Ideal
package com.example.ridho.ayosehat; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.EditText; import android.widget.TextView;public class Ideal extends AppCompatActivity {
EditText berat, tinggi; TextView hasil,kg; @Override
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState);
setContentView(R.layout.activity_ideal); berat = (EditText) findViewById(R.id.bb); tinggi = (EditText) findViewById(R.id.tb); hasil = (TextView) findViewById(R.id.hasil); kg = (TextView) findViewById(R.id.kg);
}
public void tes(View view) { Double ideal, teb, beb;
teb = Double.parseDouble(tinggi.getText().toString()); beb = Double.parseDouble(berat.getText().toString()); ideal =(teb-100) * 0.9;
hasil.setText("Berat badan ideal anda adalah "+ideal); kg.setText(" kg");
} }
Java Tampilan Menu Konsumsi Air Harian
package com.example.ridho.ayosehat; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.EditText; import android.widget.TextView;
public class Air extends AppCompatActivity {
EditText berat;
@Override
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState);
setContentView(R.layout.activity_air); berat = (EditText) findViewById(R.id.bb); hasil = (TextView) findViewById(R.id.hasil); liter = (TextView) findViewById(R.id.liter); }
public void tes(View view) { Double ideal, beb;
beb = Double.parseDouble(berat.getText().toString()); ideal = (15 * beb)+(beb * 24);
hasil.setText("Jumlah Kebutuhan air minum Harian kamu
adalah "+ideal);
liter.setText(" cc/hari"); }
}
Java Tampilan Menu Diet
package com.example.ridho.ayosehat; import android.content.Intent;
import android.support.v7.app.AppCompatActivity; import android.os.Bundle;
import android.view.View;
public class Diet extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState);
setContentView(R.layout.activity_diet); }
public void jenis (View view){
Intent intent =new Intent(Diet.this,Jenisdiet.class); startActivity(intent);
}
public void sehat (View view){
Intent intent =new Intent(Diet.this,Metodediet.class); startActivity(intent);
} }
Java Tampilan Menu Jenis Metode Diet
package com.example.ridho.ayosehat; import android.content.Intent; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View;public class Jenisdiet extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState);
setContentView(R.layout.activity_jenisdiet); }
public void mayo (View view){
Intent intent =new Intent(Jenisdiet.this,Dietmayo.class); startActivity(intent);
}
public void atkins (View view){ Intent intent =new
Intent(Jenisdiet.this,Dietatkins.class); startActivity(intent);
}
public void ocd (View view){
Intent intent =new Intent(Jenisdiet.this,Dietocd.class); startActivity(intent);
}
public void food (View view){
Intent intent =new Intent(Jenisdiet.this,Dietfood.class); startActivity(intent);
} }
Java Tampilan Menu Diet Mayo
package com.example.ridho.ayosehat;
import android.support.v7.app.AppCompatActivity; import android.os.Bundle;
public class Dietmayo extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState);
setContentView(R.layout.activity_dietmayo); }
Java Tampilan Menu Diet Atkins
package com.example.ridho.ayosehat;
import android.support.v7.app.AppCompatActivity; import android.os.Bundle;
public class Dietatkins extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState);
setContentView(R.layout.activity_dietatkins); }
}
Java Tampilan Menu Diet OCD
package com.example.ridho.ayosehat;
import android.support.v7.app.AppCompatActivity; import android.os.Bundle;
public class Dietocd extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState);
setContentView(R.layout.activity_dietocd); }
}
Java Tampilan Menu Diet Food Combining
package com.example.ridho.ayosehat;
import android.support.v7.app.AppCompatActivity; import android.os.Bundle;
public class Dietfood extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState);
setContentView(R.layout.activity_dietfood); }
Java Tampilan Menu Metode Diet Sehat
package com.example.ridho.ayosehat; import android.content.Intent; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.EditText; import android.widget.TextView;public class Metodediet extends AppCompatActivity {
EditText berat, tinggi, umur; TextView hasil;
@Override
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState);
setContentView(R.layout.activity_metodediet); berat = (EditText) findViewById(R.id.bb); tinggi = (EditText) findViewById(R.id.tb); umur = (EditText) findViewById(R.id.umur); hasil = (TextView) findViewById(R.id.hasil); }
public void tes(View view) { Double ideal, teb, beb;
teb = Double.parseDouble(tinggi.getText().toString()); beb = Double.parseDouble(berat.getText().toString()); ideal = beb / (teb * teb);
if (ideal >= 18.5 && ideal <= 24.9) { Intent intent = new
Intent(Metodediet.this,Dietideal.class); startActivity(intent);
}
else if (ideal > 25) { Intent intent = new
Intent(Metodediet.this,Dietobesit.class); startActivity(intent);
} else {
Intent intent = new
Intent(Metodediet.this,Dietkurus.class); startActivity(intent);
} } }
Java Tampilan Menu Diet Ideal
package com.example.ridho.ayosehat;
import android.support.v7.app.AppCompatActivity; import android.os.Bundle;
public class Dietideal extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState);
setContentView(R.layout.activity_dietideal); }
}
Java Tampilan Menu Diet Kegemukan
package com.example.ridho.ayosehat; import android.content.Intent;
import android.support.v7.app.AppCompatActivity; import android.os.Bundle;
import android.view.View;
public class Dietobesit extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState);
setContentView(R.layout.activity_dietobesit); }
public void monitor (View view){ Intent intent =new
Intent(Dietobesit.this,Monitoring.class); startActivity(intent);
} }
Java Tampilan Menu Diet Kurus
package com.example.ridho.ayosehat; import android.content.Intent;
import android.support.v7.app.AppCompatActivity; import android.os.Bundle;
import android.view.View;
@Override
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState);
setContentView(R.layout.activity_dietkurus); }
public void monitor (View view){ Intent intent =new
Intent(Dietkurus.this,Monitoring.class); startActivity(intent);
} }
Java Tampilan Menu Monitoring
package com.example.ridho.ayosehat; import android.content.Intent; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.EditText; import android.widget.TextView;
public class Monitoring extends AppCompatActivity {
EditText berat, tinggi, umur,sebelum; TextView hasil;
@Override
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState);
setContentView(R.layout.activity_monitoring); berat = (EditText) findViewById(R.id.bb); tinggi = (EditText) findViewById(R.id.tb); umur = (EditText) findViewById(R.id.umur); sebelum=(EditText) findViewById(R.id.beseb); hasil = (TextView) findViewById(R.id.hasil); }
public void tes(View view) { Double ideal, teb, beb;
teb = Double.parseDouble(tinggi.getText().toString()); beb = Double.parseDouble(berat.getText().toString()); ideal = beb / (teb * teb);
if (ideal >= 18.5 && ideal <= 24.9) {
hasil.setText("Selamat Berat Badan Kamu telah ideal"); }
else if (ideal > 25) {
hasil.setText("Berat Badan kamu meningkat perhatikan
Pola makan dan Olahraga kamu");
else {
hasil.setText("Berat badan Kamu terlalu Kurus,
Tingkatkan Berat badan kamu");
} } }
Java Tampilan Menu Makanan Sehat dan Tidak
package com.example.ridho.ayosehat; import android.content.Intent;
import android.support.v7.app.AppCompatActivity; import android.os.Bundle;
import android.view.View;
public class Makanan extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState);
setContentView(R.layout.activity_makanan); }
public void mie (View view){
Intent intent =new Intent(Makanan.this,Mie.class); startActivity(intent);
}
public void gorengan (View view){
Intent intent =new Intent(Makanan.this,Gorengan.class); startActivity(intent);
}
public void mata (View view){
Intent intent =new Intent(Makanan.this,Mata.class); startActivity(intent);
}
public void ginjal (View view){
Intent intent =new Intent(Makanan.this,Ginjal.class); startActivity(intent);
} }
Java Tampilan Menu Mie
package com.example.ridho.ayosehat;
import android.support.v7.app.AppCompatActivity; import android.os.Bundle;
@Override
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState);
setContentView(R.layout.activity_mie); }
}
Java Tampilan Menu Gorengan
package com.example.ridho.ayosehat;
import android.support.v7.app.AppCompatActivity; import android.os.Bundle;
public class Gorengan extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState);
setContentView(R.layout.activity_gorengan); }
}
Java Tampilan Menu Mata
package com.example.ridho.ayosehat;
import android.support.v7.app.AppCompatActivity; import android.os.Bundle;
public class Mata extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState);
setContentView(R.layout.activity_mata); }
}
Java Tampilan Menu Ginjal
package com.example.ridho.ayosehat;
import android.support.v7.app.AppCompatActivity; import android.os.Bundle;
public class Ginjal extends AppCompatActivity {
@Override
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_ginjal); }}
Java Tampilan Menu Tentang
package com.example.ridho.ayosehat;
import android.support.v7.app.AppCompatActivity; import android.os.Bundle;
public class Tentang extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState);
setContentView(R.layout.activity_tentang); }
}
Java Tampilan Menu SplashScreen
package com.example.ridho.ayosehat; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.os.Handler; import android.view.Window; import android.view.WindowManager;
public class SplashScreen extends AppCompatActivity {
//Set waktu lama splashscreen
private static int splashInterval = 3000; @Override
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_NO_TITLE); getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); setContentView(R.layout.activity_splash_screen); new Handler().postDelayed(new Runnable() {
@Override
public void run() {
// TODO Auto-generated method stub
Intent i = new Intent(SplashScreen.this,
Beranda.class);
//jeda selesai Splashscreen this.finish();
}
private void finish() {
// TODO Auto-generated method stub
}
}, splashInterval); }
; }
Xml Tampilan Menu Utama
<?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@drawable/is" tools:context="com.example.ridho.ayosehat.Beranda"> <ImageView android:layout_marginTop="5dp" android:layout_width="170dp" android:onClick="gizi" android:layout_height="150dp" android:src="@drawable/gizii"/> <ImageView android:layout_width="170dp" android:layout_marginTop="5dp" android:layout_marginLeft="185dp" android:onClick="diet" android:layout_height="150dp" android:src="@drawable/tu"/> <ImageView android:layout_width="190dp" android:layout_height="200dp" android:layout_marginTop="230dp" android:onClick="makan" android:src="@drawable/makhat"/> <ImageView
android:layout_width="170dp" android:layout_height="170dp" android:layout_marginTop="250dp" android:layout_marginLeft="190dp" android:onClick="about" android:src="@drawable/tentang"/> </RelativeLayout>
Xml Tampilan Menu Gizi
<?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@drawable/is" tools:context="com.example.ridho.ayosehat.Gizi"> <ImageView android:layout_width="match_parent" android:layout_height="100dp" android:layout_marginTop="50dp" android:onClick="tinggi" android:src="@drawable/teb"/> <ImageView android:layout_width="match_parent" android:layout_marginTop="150dp" android:layout_height="100dp" android:onClick="berat" android:src="@drawable/beb"/> <ImageView android:layout_width="match_parent" android:layout_marginTop="250dp" android:layout_height="100dp" android:onClick="air" android:src="@drawable/air"/> </RelativeLayout>
Xml Tampilan Menu Tinggi
<?xml version="1.0" encoding="utf-8"?> <RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@drawable/is" tools:context="com.example.ridho.ayosehat.Tinggi"> <TextView android:layout_width="match_parent" android:layout_height="match_parent" android:textSize="20dp" android:textColor="#000"
android:text="Menghitung tinggi badan ideal seseorang dapat diketahui melalui berat badannya. Untuk mengetahui tinggi idealmu silahkan isi form di bawah ini"/>
<FrameLayout android:layout_width="match_parent" android:layout_height="match_parent" android:layout_marginTop="90dp"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:textSize="20dp" android:layout_marginTop="60dp" android:textColor="#000" android:text="Berat Badan(Kg)" /> <EditText android:id="@+id/bb" android:layout_width="200dp" android:layout_height="55dp" android:ems="10" android:textColor="#000" android:hint="berat badan(Kg)" android:layout_marginLeft="150dp" android:inputType="textPersonName" android:layout_marginTop="50dp" tools:layout_editor_absoluteX="32dp" tools:layout_editor_absoluteY="73dp" /> <ImageView android:layout_width="match_parent" android:layout_height="100dp" android:layout_marginTop="120dp" android:onClick="tes" android:src="@drawable/cek"/> <TableRow android:layout_width="wrap_content" android:layout_height="wrap_content"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="220dp" android:textSize="20dp" android:id="@+id/hasil"/> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="220dp" android:textSize="20dp" android:id="@+id/cm"/> </TableRow> </FrameLayout> </RelativeLayout>
Xml Tampilan Menu Berat Ideal
<?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@drawable/is" tools:context="com.example.ridho.ayosehat.Ideal"> <TextView android:layout_width="match_parent" android:layout_height="match_parent" android:textSize="20dp" android:textColor="#000"
android:text="Berat badan seseorang dapat dihitung melalui rumus BBI. Untuk mengetahui berat badan ideal anda silahkan
mengisi form berat badan(Kg) dan tinggi anda(Cm) dan cek hasil dari berat badan ideal anda."/>
<FrameLayout android:layout_width="match_parent" android:layout_height="match_parent" android:layout_marginTop="100dp"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:textSize="20dp" android:textColor="#000" android:layout_marginTop="60dp" android:text="Berat Badan(Kg)" /> <EditText android:id="@+id/bb" android:layout_width="200dp" android:layout_height="55dp" android:ems="10" android:textColor="#000" android:hint="berat badan(Kg)" android:layout_marginLeft="150dp" android:inputType="textPersonName" android:layout_marginTop="50dp" tools:layout_editor_absoluteX="32dp" tools:layout_editor_absoluteY="73dp" /> <TextView android:layout_width="wrap_content"
android:layout_height="wrap_content" android:textSize="20dp" android:layout_marginTop="140dp" android:textColor="#000" android:text="Tinggi badan(Cm)" /> <EditText android:id="@+id/tb" android:layout_width="334dp" android:layout_height="55dp" android:ems="10" android:layout_marginLeft="150dp" android:layout_marginTop="130dp" android:inputType="textPersonName" android:hint="tinggi badan(Cm)" android:textColor="#000" tools:layout_editor_absoluteY="73dp" tools:layout_editor_absoluteX="32dp" /> <ImageView android:layout_width="match_parent" android:layout_height="100dp" android:layout_marginTop="180dp" android:onClick="tes" android:src="@drawable/cek"/> <TableRow android:layout_width="wrap_content" android:layout_height="wrap_content"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="280dp" android:textSize="20dp" android:id="@+id/hasil"/> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="280dp" android:textSize="20dp" android:id="@+id/kg"/> </TableRow> </FrameLayout> </RelativeLayout>
Xml Tampilan Menu Konsumsi Air Harian
<?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"android:layout_height="match_parent" android:background="@drawable/is" tools:context="com.example.ridho.ayosehat.Air"> <TextView android:layout_width="match_parent" android:layout_height="match_parent" android:textColor="#000" android:textSize="20dp"
android:text="mengkonsumsi air mineral sangatlah penting untuk tubuh kita. Jumlah konsumsi air minum harian kita dapat di ketahui melalui berat badan dan usia kita. Untuk lebih jelasnya silahkan isi form dibawah dan cek hasil anda."/>
<FrameLayout android:layout_width="match_parent" android:layout_height="match_parent" android:layout_marginTop="95dp"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:textSize="20dp" android:layout_marginTop="65dp" android:textColor="#000" android:text="Umur" /> <EditText android:id="@+id/umur" android:layout_width="200dp" android:layout_height="wrap_content" android:ems="10" android:layout_marginLeft="150dp" android:inputType="textPersonName" android:layout_marginTop="60dp" android:textColor="#000" android:hint="umur" /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:textSize="20dp" android:layout_marginTop="130dp" android:textColor="#000" android:text="Berat Badan(Kg)" /> <EditText android:id="@+id/bb" android:layout_width="200dp" android:layout_height="55dp" android:ems="10" android:textColor="#000" android:hint="berat badan(Kg)" android:layout_marginLeft="150dp" android:inputType="textPersonName" android:layout_marginTop="125dp" tools:layout_editor_absoluteX="32dp" tools:layout_editor_absoluteY="73dp" /> <ImageView android:layout_width="match_parent" android:layout_height="100dp"
android:layout_marginTop="180dp" android:onClick="tes" android:src="@drawable/cek"/> <TableRow android:layout_width="wrap_content" android:layout_height="wrap_content"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="280dp" android:textSize="20dp" android:id="@+id/hasil"/> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="280dp" android:textSize="20dp" android:id="@+id/liter"/> </TableRow> </FrameLayout> </RelativeLayout>
Xml Tampilan Menu Diet
<?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@drawable/is" tools:context="com.example.ridho.ayosehat.Diet"> <ImageView android:layout_width="170dp" android:layout_height="160dp" android:layout_marginTop="150dp" android:layout_marginLeft="10dp" android:onClick="jenis" android:src="@drawable/diett" /> <ImageView android:layout_width="170dp" android:layout_height="160dp" android:layout_marginTop="150dp" android:layout_marginLeft="190dp" android:onClick="sehat" android:src="@drawable/bang"/> </RelativeLayout>
Xml Tampilan Menu Jenis Metode Diet
<?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@drawable/is" tools:context="com.example.ridho.ayosehat.Jenisdiet"> <ImageView android:layout_width="match_parent" android:layout_height="83dp" android:layout_marginTop="60dp" android:onClick="mayo" android:src="@drawable/mayoo"/> <ImageView android:layout_width="match_parent" android:layout_height="83dp" android:layout_marginTop="160dp" android:onClick="atkins" android:src="@drawable/atkinss"/> <ImageView android:layout_width="match_parent" android:layout_height="83dp" android:layout_marginTop="260dp" android:onClick="ocd" android:src="@drawable/oocd"/> <ImageView android:layout_width="match_parent" android:layout_height="83dp" android:layout_marginTop="360dp" android:onClick="food" android:src="@drawable/fodc"/> </RelativeLayout>Xml Tampilan Menu Diet Mayo
<?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context="com.example.ridho.ayosehat.Dietmayo"> <ScrollView android:layout_width="match_parent" android:layout_height="match_parent">
<LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> <ImageView android:layout_width="match_parent" android:layout_height="330dp" android:background="@drawable/mayo"/> <ImageView android:layout_width="match_parent" android:layout_height="160dp" android:src="@drawable/msatu"/> <ImageView android:layout_width="match_parent" android:layout_height="160dp" android:src="@drawable/mdua"/> <ImageView android:layout_width="match_parent" android:layout_height="160dp" android:src="@drawable/mtiga"/> <ImageView android:layout_width="match_parent" android:layout_height="160dp" android:src="@drawable/mempat"/> <ImageView android:layout_width="match_parent" android:layout_height="160dp" android:src="@drawable/mlima"/> <ImageView android:layout_width="match_parent" android:layout_height="160dp" android:src="@drawable/menam"/> <ImageView android:layout_width="match_parent" android:layout_height="160dp" android:src="@drawable/mtujuh"/> <ImageView android:layout_width="match_parent" android:layout_height="160dp" android:src="@drawable/mlapan"/> <ImageView android:layout_width="match_parent" android:layout_height="160dp" android:src="@drawable/mbilan"/> <ImageView android:layout_width="match_parent" android:layout_height="160dp" android:src="@drawable/mpuluh"/>
<ImageView android:layout_width="match_parent" android:layout_height="160dp" android:src="@drawable/mbelas"/> <ImageView android:layout_width="match_parent" android:layout_height="160dp" android:src="@drawable/mduabel"/> <ImageView android:layout_width="match_parent" android:layout_height="160dp" android:src="@drawable/mtigbel"/> </LinearLayout> </ScrollView> </RelativeLayout>
Xml Tampilan Menu Diet Atkins
<?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context="com.example.ridho.ayosehat.Dietatkins"> <ScrollView android:layout_width="match_parent" android:layout_height="match_parent"> <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> <ImageView android:layout_width="match_parent" android:layout_height="205dp" android:src="@drawable/atkins"/> <ImageView android:layout_width="match_parent" android:layout_height="230dp" android:src="@drawable/asatu"/> <ImageView android:layout_width="match_parent" android:layout_height="230dp" android:src="@drawable/adua"/>
<ImageView android:layout_width="match_parent" android:layout_height="230dp" android:src="@drawable/atiga"/> <ImageView android:layout_width="match_parent" android:layout_height="230dp" android:src="@drawable/aempat"/> <ImageView android:layout_width="match_parent" android:layout_height="230dp" android:src="@drawable/alima"/> <ImageView android:layout_width="match_parent" android:layout_height="230dp" android:src="@drawable/aenam"/> <ImageView android:layout_width="match_parent" android:layout_height="230dp" android:src="@drawable/atujuh"/> </LinearLayout> </ScrollView> </RelativeLayout>
Xml Tampilan Menu Diet OCD
<?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context="com.example.ridho.ayosehat.Dietocd"> <ScrollView android:layout_width="match_parent" android:layout_height="match_parent"> <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> <ImageView android:layout_width="match_parent" android:layout_height="290dp" android:background="@drawable/ocd"/>
<ImageView android:layout_width="match_parent" android:layout_height="250dp" android:background="@drawable/osatu" /> <ImageView android:layout_width="match_parent" android:layout_height="150dp" android:background="@drawable/odua" /> <ImageView android:layout_width="match_parent" android:layout_height="200dp" android:background="@drawable/otiga" /> <ImageView android:layout_width="match_parent" android:layout_height="250dp" android:background="@drawable/ompat" /> </LinearLayout> </ScrollView> </RelativeLayout>
Xml Tampilan Menu Diet Food Combining
<?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context="com.example.ridho.ayosehat.Dietfood"> <ScrollView android:layout_width="match_parent" android:layout_height="match_parent"> <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> <ImageView android:layout_width="match_parent" android:layout_height="200dp" android:src="@drawable/food"/> <ImageView android:layout_width="match_parent"android:layout_height="200dp" android:src="@drawable/fsatu"/> <ImageView android:layout_width="match_parent" android:layout_height="200dp" android:src="@drawable/fdua"/> <ImageView android:layout_width="match_parent" android:layout_height="200dp" android:src="@drawable/ftiga"/> <ImageView android:layout_width="match_parent" android:layout_height="200dp" android:src="@drawable/fempat"/> <ImageView android:layout_width="match_parent" android:layout_height="200dp" android:src="@drawable/flima"/> <ImageView android:layout_width="match_parent" android:layout_height="200dp" android:src="@drawable/fenam"/> <ImageView android:layout_width="match_parent" android:layout_height="200dp" android:src="@drawable/ftujuh"/> </LinearLayout> </ScrollView> </RelativeLayout>
Xml Tampilan Menu Metode Diet Sehat
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context="com.example.ridho.ayosehat.Metodediet"> <ScrollView android:layout_width="match_parent" android:layout_height="match_parent"> <RelativeLayout android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> <ImageView android:layout_width="match_parent" android:layout_height="200dp" android:src="@drawable/konsul"/><TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:textSize="20dp" android:layout_marginTop="225dp" android:text="Umur" /> <EditText android:id="@+id/umur" android:layout_width="200dp" android:layout_height="wrap_content" android:ems="10" android:layout_marginLeft="150dp" android:inputType="textPersonName" android:layout_marginTop="220dp" android:hint="umur" /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:textSize="20dp" android:layout_marginTop="285dp" android:text="Berat Badan(Kg)" /> <EditText android:id="@+id/bb" android:layout_width="200dp" android:layout_height="wrap_content" android:ems="10" android:hint="berat badan(Kg)" android:layout_marginLeft="150dp" android:inputType="textPersonName" android:layout_marginTop="280dp" tools:layout_editor_absoluteX="32dp" tools:layout_editor_absoluteY="73dp" /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:textSize="20dp" android:layout_marginTop="335dp" android:text="Tinggi badan(M)" /> <EditText android:id="@+id/tb" android:layout_width="334dp" android:layout_height="wrap_content" android:ems="10" android:layout_marginLeft="150dp" android:layout_marginTop="330dp" android:inputType="textPersonName" android:hint="tinggi badan(M)" tools:layout_editor_absoluteY="73dp" tools:layout_editor_absoluteX="32dp" /> <ImageView android:layout_width="match_parent" android:layout_height="match_parent" android:layout_marginTop="450dp" android:onClick="tes" android:src="@drawable/cek"/>
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/hasil"/> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:textSize="20dp" android:layout_marginTop="400dp" android:text="Jenis Kelamin" android:id="@+id/textView2" /> <RadioButton android:id="@+id/radioButton" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignStart="@+id/tb" android:layout_below="@+id/tb" android:layout_marginStart="25dp" android:layout_marginTop="25dp" android:text="Laki-Laki" /> <RadioButton android:id="@+id/radioButton2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Perempuan" android:layout_below="@+id/textView2" android:layout_alignStart="@+id/radioButton" /> </RelativeLayout> </ScrollView> </LinearLayout>
Xml Tampilan Menu Ideal
<?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context="com.example.ridho.ayosehat.Dietideal"> <ScrollView android:layout_width="match_parent" android:layout_height="match_parent"> <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical">
<ImageView android:layout_width="match_parent" android:layout_height="210dp" android:src="@drawable/diag"/> <ImageView android:layout_width="match_parent" android:layout_height="200dp" android:src="@drawable/bbb"/> <ImageView android:id="@+id/imageView" android:layout_width="match_parent" android:layout_height="180dp" android:src="@drawable/ooo" /> <ImageView android:layout_width="match_parent" android:layout_height="180dp" android:src="@drawable/mmm"/> </LinearLayout> </ScrollView> </RelativeLayout>
Xml Tampilan Menu Diet Kegemukan
<?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context="com.example.ridho.ayosehat.Dietobesit"> <ScrollView android:layout_width="match_parent" android:layout_height="match_parent"> <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> <ImageView android:layout_width="match_parent" android:layout_height="210dp" android:src="@drawable/diag"/> <ImageView android:layout_width="match_parent" android:layout_height="200dp" android:src="@drawable/bbbb"/>
<ImageView android:id="@+id/imageView" android:layout_width="match_parent" android:layout_height="220dp" android:src="@drawable/oooo" /> <ImageView android:layout_width="match_parent" android:layout_height="220dp" android:src="@drawable/mmmm"/> <ImageView android:layout_width="match_parent" android:layout_height="60dp" android:onClick="monitor" android:src="@drawable/monitor"/> </LinearLayout> </ScrollView> </RelativeLayout>
Xml Tampilan Menu Kurus
<?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context="com.example.ridho.ayosehat.Dietkurus"> <ScrollView android:layout_width="match_parent" android:layout_height="match_parent"> <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> <ImageView android:layout_width="match_parent" android:layout_height="210dp" android:src="@drawable/diag"/> <ImageView android:layout_width="match_parent" android:layout_height="200dp" android:src="@drawable/bb"/> <ImageView android:id="@+id/imageView" android:layout_width="match_parent"
android:layout_height="220dp" android:src="@drawable/oo" /> <ImageView android:layout_width="match_parent" android:layout_height="380dp" android:src="@drawable/mm"/> <ImageView android:layout_width="match_parent" android:layout_height="60dp" android:onClick="monitor" android:src="@drawable/monitor"/> </LinearLayout> </ScrollView> </RelativeLayout>
Xml Tampilan Menu Monitoring
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context="com.example.ridho.ayosehat.Monitoring"> <ScrollView android:layout_width="match_parent" android:layout_height="match_parent"> <RelativeLayout android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> <ImageView android:layout_width="match_parent" android:layout_height="70dp" android:src="@drawable/monitor"/> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:textSize="20dp" android:layout_marginTop="100dp" android:text="Umur" /> <EditText android:id="@+id/umur" android:layout_width="200dp" android:layout_height="wrap_content" android:ems="10" android:layout_marginLeft="150dp" android:inputType="textPersonName"
android:layout_marginTop="90dp" android:hint="umur" /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:textSize="20dp" android:layout_marginTop="155dp" android:text="Berat Badan(Kg)" /> <EditText android:id="@+id/bb" android:layout_width="200dp" android:layout_height="wrap_content" android:ems="10" android:hint="berat badan(Kg)" android:layout_marginLeft="150dp" android:inputType="textPersonName" android:layout_marginTop="150dp" tools:layout_editor_absoluteX="32dp" tools:layout_editor_absoluteY="73dp" /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:textSize="20dp" android:layout_marginTop="215dp" android:text="Tinggi badan(M)" /> <EditText android:id="@+id/tb" android:layout_width="334dp" android:layout_height="wrap_content" android:ems="10" android:layout_marginLeft="150dp" android:layout_marginTop="210dp" android:inputType="textPersonName" android:hint="tinggi badan(M)" tools:layout_editor_absoluteY="73dp" tools:layout_editor_absoluteX="32dp" /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:textSize="20dp" android:layout_marginTop="280dp" android:text="Berat Sebelumnya" /> <EditText android:id="@+id/beseb" android:layout_width="200dp" android:layout_height="wrap_content" android:ems="10" android:layout_marginLeft="160dp" android:inputType="textPersonName" android:layout_marginTop="270dp" android:hint="Berat Sebelumnya" /> <ImageView android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_marginTop="300dp" android:onClick="tes" android:src="@drawable/cek"/> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="390dp" android:textSize="20dp" android:id="@+id/hasil"/> </RelativeLayout> </ScrollView> </LinearLayout>
Xml Tampilan Menu Makanan Sehat dan Tidak
<?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@drawable/is" tools:context="com.example.ridho.ayosehat.Makanan"> <ScrollView android:layout_width="match_parent" android:layout_height="match_parent" android:layout_alignParentTop="true" android:layout_alignParentEnd="true"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical" > <ImageView android:layout_width="wrap_content" android:layout_height="200dp" android:layout_marginTop="7dp" android:onClick="mie" android:background="@drawable/re"/> <ImageView android:layout_width="wrap_content" android:layout_marginTop="5dp"android:layout_height="200dp" android:onClick="gorengan" android:background="@drawable/rengan"/> <ImageView android:layout_width="wrap_content" android:layout_marginTop="5dp" android:layout_height="200dp" android:onClick="mata" android:background="@drawable/fe"/> <ImageView android:layout_width="wrap_content" android:layout_marginTop="5dp" android:layout_height="200dp" android:onClick="ginjal" android:background="@drawable/jal"/> </LinearLayout> </ScrollView> </RelativeLayout>
Xml Tampilan Menu Mie
<?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context="com.example.ridho.ayosehat.Mie"> <ScrollView android:layout_width="match_parent" android:layout_height="match_parent" android:layout_alignParentTop="true" android:layout_alignParentStart="true"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical"> <ImageView android:layout_width="match_parent" android:layout_height="150dp" android:background="@drawable/re"/>
<TextView
android:id="@+id/textView"
android:layout_width="match_parent" android:layout_height="match_parent"
android:text="Mie instan meskipun diolah dari bahan dasar tepung terigu dan diperkaya dengan vitamin, mineral, dan sebagainya, tetapi di dalamnya juga tersedia bahan kimia lain yang ber bahaya makan mie instant secara berlebihan!. Bahan-bahan tersebut ada pada tepung terigu, bumbu pelengkap, bahan perasa, minyak sayur, kecap dan sambal, dan komposisi lainnya." />
<TextView
android:layout_width="match_parent" android:layout_height="match_parent"
android:text="Meskipun mie instan diolah secara perebusan yang baik, dimasak sampai matang, tidak menuangkan air panas pada kemasan yang berisi mie, dan sampai meningkatkankan sayuran, tetapi mie instan masih mengandung bahaya bagi kesehatan badan apabila sering dikonsumsi."/>
<TextView
android:layout_width="match_parent" android:layout_height="match_parent" android:layout_marginLeft="12dp"
android:text="#1. Mengganggu kerja metabolisme tubuh. Badan membutuhkan sistem kerja metabolisme yang normal supaya sirkulasi darah, penyerapan energi, dan manfaat organ badan berlangsung optimal. Kandungan zat berbahaya yang tersedia dalam mie instan bila sering dikonsumsi setiap hari bakal membuat
terjadinya penumpukan zat yang susah dicerna tubuh, umpama adanya zat pewarna, pengtahan lama, dan penambah rasa."/>
<TextView
android:layout_width="match_parent" android:layout_height="match_parent" android:layout_marginLeft="12dp"
android:text="#2. Bagi anak-anak yang suka makan mie instan, nutrisi yang diserap badan bakal susah diperbuat. Kandungan zat mie instan contohnya di atas sangat tidak tepat bagi usia anak-anak sebab bisa menyebabkan kekekuranganan gizi,
nutrisi, dan asupan makanan sehat."/>
<TextView
android:layout_width="match_parent" android:layout_height="match_parent" android:layout_marginLeft="12dp"
android:text="#3. Mie instan mengandung
karbohidrat dan lemak dalam jumlah tinggi. Apabila dikonsumsi terlalu sering bakal terjadi penumpukan karbohidrat dan lemak yang berakibat pada penambahan jumlah kalori dalam tubuh. Badan bisa mengalami kegemukan dan kekekuranganan gizi sebab minim asupan vitamin, mineral, dan zat sehat lainnya."/>
<TextView
android:layout_width="match_parent" android:layout_height="match_parent" android:layout_marginLeft="12dp"
android:text="#4. Mengganggu sistem pencernaan tubuh. Sering makan mie instan bisa membuat pencernaan menjadi terganggu (gangguan usus). Gejala susah buang air besar, selulit ataupun muncul infeksi pada usus ialah gejala yang sering terjadi