Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
anwarhakim31 authored Jul 14, 2024
1 parent 86812da commit 6e7198a
Show file tree
Hide file tree
Showing 66 changed files with 3,231 additions and 2,883 deletions.
87 changes: 45 additions & 42 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,43 +1,46 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">

<uses-permission android:name="android.permission.INTERNET" />

<application
android:allowBackup="true"
android:dataExtractionRules="@xml/data_extraction_rules"
android:fullBackupContent="@xml/backup_rules"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.AppCompat.Light.NoActionBar"
tools:targetApi="31">
<activity
android:name=".Forgot"
android:exported="false" />
<activity
android:name=".Diagnosa"
android:exported="false" />
<activity
android:name=".Hasil_Diagnosa"
android:exported="false" />
<activity
android:name=".Register"
android:exported="false" />
<activity
android:name=".Login"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".MainActivity"
android:exported="false" />
</application>

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">

<uses-permission android:name="android.permission.INTERNET" />

<application
android:allowBackup="true"
android:dataExtractionRules="@xml/data_extraction_rules"
android:fullBackupContent="@xml/backup_rules"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.AppCompat.Light.NoActionBar"
tools:targetApi="31">
<activity
android:name=".review"
android:exported="false" />
<activity
android:name=".Forgot"
android:exported="false" />
<activity
android:name=".Diagnosa"
android:exported="false" />
<activity
android:name=".Hasil_Diagnosa"
android:exported="false" />
<activity
android:name=".Register"
android:exported="false" />
<activity
android:name=".Login"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".MainActivity"
android:exported="false" />
</application>

</manifest>
Binary file modified app/src/main/assets/catcare.db
Binary file not shown.
75 changes: 36 additions & 39 deletions app/src/main/java/com/example/catcare/DiagnosisFragment.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
Expand Down Expand Up @@ -40,7 +39,7 @@ public class DiagnosisFragment extends Fragment {
private ArrayList<CheckBox> checkBoxList = new ArrayList<>();

private Button prosesButton;
private String username, email;
private String username;

@Nullable
@Override
Expand All @@ -57,14 +56,14 @@ public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup c
LinearLayout cardContainer = view.findViewById(R.id.cardContainer);
cardContainer.removeAllViews();

cardContainer.setPadding(20, 80, 20, 130);
cardContainer.setPadding(20, 20, 20, 125);

TextView titleTextView = new TextView(requireContext());
LinearLayout.LayoutParams titleLayoutParams = new LinearLayout.LayoutParams(
LinearLayout.LayoutParams.MATCH_PARENT,
LinearLayout.LayoutParams.WRAP_CONTENT
);
titleLayoutParams.setMargins(0, 100, 0, 20); // Mengurangi nilai margin
titleLayoutParams.setMargins(0, 50, 0, 20); // Mengurangi nilai margin
titleTextView.setLayoutParams(titleLayoutParams);
titleTextView.setText("Daftar Gejala");
titleTextView.setTextSize(24);
Expand All @@ -77,45 +76,45 @@ public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup c
LinearLayout.LayoutParams.MATCH_PARENT,
LinearLayout.LayoutParams.WRAP_CONTENT
);
parentLayoutParams.setMargins(40, 0, 0, 100);
parentLayoutParams.setMargins(10, 0, 0, 100);
parentLayout.setLayoutParams(parentLayoutParams);
parentLayout.setOrientation(LinearLayout.VERTICAL);
parentLayout.setPadding(8, 8, 8, 8);
parentLayout.setBackgroundColor(getResources().getColor(android.R.color.transparent)); // Transparent background


TextView titleText = new TextView(requireContext());
LinearLayout.LayoutParams titleLayout = new LinearLayout.LayoutParams(
LinearLayout.LayoutParams.WRAP_CONTENT,
LinearLayout.LayoutParams.WRAP_CONTENT
);
titleLayoutParams.setMargins(0, 0, 0, 40);
titleText.setLayoutParams(titleLayout);
titleText.setText("*Ketentuan");
titleText.setTextSize(20);
parentLayout.addView(titleText);


TextView minRequirementTextView = new TextView(requireContext());
LinearLayout.LayoutParams minLayoutParams = new LinearLayout.LayoutParams(
LinearLayout.LayoutParams.WRAP_CONTENT,
LinearLayout.LayoutParams.WRAP_CONTENT
);
minRequirementTextView.setLayoutParams(minLayoutParams);
minRequirementTextView.setText("- minimal pilih 3 gejala");
minRequirementTextView.setTextSize(16);
parentLayout.addView(minRequirementTextView);

// Menambahkan TextView untuk persyaratan maksimal
TextView maxRequirementTextView = new TextView(requireContext());
LinearLayout.LayoutParams maxLayoutParams = new LinearLayout.LayoutParams(
LinearLayout.LayoutParams.WRAP_CONTENT,
LinearLayout.LayoutParams.WRAP_CONTENT
);
maxRequirementTextView.setLayoutParams(maxLayoutParams);
maxRequirementTextView.setText("- maksimal pilih 5 gejala");
maxRequirementTextView.setTextSize(16);
parentLayout.addView(maxRequirementTextView);
// TextView titleText = new TextView(requireContext());
// LinearLayout.LayoutParams titleLayout = new LinearLayout.LayoutParams(
// LinearLayout.LayoutParams.WRAP_CONTENT,
// LinearLayout.LayoutParams.WRAP_CONTENT
// );
// titleLayoutParams.setMargins(0, 0, 0, 40);
// titleText.setLayoutParams(titleLayout);
// titleText.setText("*Ketentuan");
// titleText.setTextSize(20);
// parentLayout.addView(titleText);


// TextView minRequirementTextView = new TextView(requireContext());
// LinearLayout.LayoutParams minLayoutParams = new LinearLayout.LayoutParams(
// LinearLayout.LayoutParams.WRAP_CONTENT,
// LinearLayout.LayoutParams.WRAP_CONTENT
// );
// minRequirementTextView.setLayoutParams(minLayoutParams);
// minRequirementTextView.setText("- minimal pilih 3 gejala");
// minRequirementTextView.setTextSize(16);
// parentLayout.addView(minRequirementTextView);
//
// // Menambahkan TextView untuk persyaratan maksimal
// TextView maxRequirementTextView = new TextView(requireContext());
// LinearLayout.LayoutParams maxLayoutParams = new LinearLayout.LayoutParams(
// LinearLayout.LayoutParams.WRAP_CONTENT,
// LinearLayout.LayoutParams.WRAP_CONTENT
// );
// maxRequirementTextView.setLayoutParams(maxLayoutParams);
// maxRequirementTextView.setText("- maksimal pilih 5 gejala");
// maxRequirementTextView.setTextSize(16);
// parentLayout.addView(maxRequirementTextView);


cardContainer.addView(parentLayout);
Expand Down Expand Up @@ -183,7 +182,6 @@ public void onCancelled(@NonNull DatabaseError databaseError) {
Bundle args = getArguments();
if (args != null) {
username = args.getString("username");
email = args.getString("email");
}


Expand Down Expand Up @@ -212,7 +210,6 @@ public void onClick(View v) {
Intent intent = new Intent(requireContext(), Hasil_Diagnosa.class);
intent.putExtra("HASIL", gejalaTerpilih.toString());
intent.putExtra("username", username);
intent.putExtra("email", email);
startActivity(intent);
getActivity().finish();
}
Expand Down
Loading

0 comments on commit 6e7198a

Please sign in to comment.