first commit

This commit is contained in:
Nadea Mefira 2025-07-10 13:15:14 +07:00
commit 8405122a1d
123 changed files with 5115 additions and 0 deletions

15
.gitignore vendored Normal file
View File

@ -0,0 +1,15 @@
*.iml
.gradle
/local.properties
/.idea/caches
/.idea/libraries
/.idea/modules.xml
/.idea/workspace.xml
/.idea/navEditor.xml
/.idea/assetWizardSettings.xml
.DS_Store
/build
/captures
.externalNativeBuild
.cxx
local.properties

3
.idea/.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
# Default ignored files
/shelf/
/workspace.xml

6
.idea/compiler.xml Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<bytecodeTargetLevel target="17" />
</component>
</project>

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="deploymentTargetDropDown">
<value>
<entry key="app">
<State />
</entry>
</value>
</component>
</project>

19
.idea/gradle.xml Normal file
View File

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="GradleMigrationSettings" migrationVersion="1" />
<component name="GradleSettings">
<option name="linkedExternalProjectsSettings">
<GradleProjectSettings>
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="gradleJvm" value="#GRADLE_LOCAL_JAVA_HOME" />
<option name="modules">
<set>
<option value="$PROJECT_DIR$" />
<option value="$PROJECT_DIR$/app" />
</set>
</option>
<option name="resolveExternalAnnotations" value="false" />
</GradleProjectSettings>
</option>
</component>
</project>

10
.idea/migrations.xml Normal file
View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectMigrations">
<option name="MigrateToGradleLocalJavaHome">
<set>
<option value="$PROJECT_DIR$" />
</set>
</option>
</component>
</project>

9
.idea/misc.xml Normal file
View File

@ -0,0 +1,9 @@
<project version="4">
<component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="jbr-17" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
<component name="ProjectType">
<option name="id" value="Android" />
</component>
</project>

6
.idea/vcs.xml Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

1
app/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/build

62
app/build.gradle.kts Normal file
View File

@ -0,0 +1,62 @@
plugins {
id("com.android.application")
id("com.google.gms.google-services")
}
android {
namespace = "com.nurulwafa.nufakuproject"
compileSdk = 34
defaultConfig {
applicationId = "com.nurulwafa.nufakuproject"
minSdk = 24
targetSdk = 34
versionCode = 1
versionName = "1.0"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
signingConfigs {
create("release") {
storeFile = rootProject.file("keystore.jks")
storePassword = "NufaAra2025!"
keyAlias = "nufaku-key"
keyPassword = "NufaAra2025!"
}
}
buildTypes {
getByName("release") {
isMinifyEnabled = false
isShrinkResources = false
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
signingConfig = signingConfigs.getByName("release")
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
dependencies {
implementation("androidx.appcompat:appcompat:1.7.0")
implementation("com.google.android.material:material:1.12.0")
implementation("androidx.constraintlayout:constraintlayout:2.1.4")
testImplementation("junit:junit:4.13.2")
androidTestImplementation("androidx.test.ext:junit:1.2.1")
androidTestImplementation("androidx.test.espresso:espresso-core:3.6.1")
implementation ("com.android.volley:volley:1.2.1")
implementation ("org.json:json:20210307")
implementation ("com.github.bumptech.glide:glide:4.16.0")
annotationProcessor ("com.github.bumptech.glide:compiler:4.16.0")
implementation(platform("com.google.firebase:firebase-bom:33.16.0"))
implementation("com.google.firebase:firebase-messaging")
implementation("com.google.firebase:firebase-analytics")
}
}

48
app/google-services.json Normal file
View File

@ -0,0 +1,48 @@
{
"project_info": {
"project_number": "527409377974",
"project_id": "notification-31080",
"storage_bucket": "notification-31080.firebasestorage.app"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:527409377974:android:af4396bdd6754dc5302c17",
"android_client_info": {
"package_name": "com.example.nufakuproject"
}
},
"oauth_client": [],
"api_key": [
{
"current_key": "AIzaSyAEUotmyaw6LWdylLHvpufoWTml9PYbYJI"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": []
}
}
},
{
"client_info": {
"mobilesdk_app_id": "1:527409377974:android:45b57d5470c9efd6302c17",
"android_client_info": {
"package_name": "com.nurulwafa.nufakuproject"
}
},
"oauth_client": [],
"api_key": [
{
"current_key": "AIzaSyAEUotmyaw6LWdylLHvpufoWTml9PYbYJI"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": []
}
}
}
],
"configuration_version": "1"
}

21
app/proguard-rules.pro vendored Normal file
View File

@ -0,0 +1,21 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile

View File

@ -0,0 +1,26 @@
package com.nurulwafa.nufakuproject;
import android.content.Context;
import androidx.test.platform.app.InstrumentationRegistry;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
/**
* Instrumented test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
assertEquals("com.example.nufakuproject", appContext.getPackageName());
}
}

View File

@ -0,0 +1,48 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<application
android:networkSecurityConfig="@xml/network_security_config"
android:usesCleartextTraffic="true"
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.NufakuProject"
tools:targetApi="31">
<activity
android:name=".MainActivity"
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=".PonpesActivity"/>
<activity android:name=".DataWaliSantriActivity"/>
<activity android:name=".DataSantriActivity"/>
<activity android:name=".KegiatanSantriActivity"/>
<activity android:name=".DetailKegiatanActivity"/>
<activity android:name=".PrestasiSantriActivity"/>
<activity android:name=".PelanggaranSantriActivity"/>
<activity android:name=".InformasiSPPActivity"/>
<activity android:name=".BeritaActivity"/>
<activity android:name=".DetailBeritaActivity"/>
<activity android:name=".HomeActivity"/>
<activity android:name=".ChatActivity"/>
<service android:name=".MyFirebaseMessagingService"
android:exported="false">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>
</application>
<uses-permission android:name="android.permission.INTERNET"/>
</manifest>

View File

@ -0,0 +1,31 @@
package com.nurulwafa.nufakuproject;
public class ApiHelper {
private static final String EMULATOR_BASE_URL = "http://10.0.2.2:8080/admin-nufa/api/";
private static final String DEVICE_BASE_URL = "http://192.168.0.80:8080/admin-nufa/api/";
private static final String HOSTING_BASE_URL = "https://admin-nufa.my.id/api/";
public static String getBaseUrl() {
boolean useHosting = true; // Ubah ke true nanti saat hosting aktif
if (useHosting) {
return HOSTING_BASE_URL;
}
if (isEmulator()) {
return EMULATOR_BASE_URL;
} else {
return DEVICE_BASE_URL;
}
}
private static boolean isEmulator() {
return android.os.Build.FINGERPRINT.contains("generic") ||
android.os.Build.MODEL.contains("Emulator") ||
android.os.Build.HARDWARE.contains("goldfish") ||
android.os.Build.PRODUCT.contains("sdk");
}
}

View File

@ -0,0 +1,31 @@
package com.nurulwafa.nufakuproject;
public class Berita {
private String judul;
private String gambar;
private String tanggal;
private String deskripsi;
public Berita(String judul, String gambar, String tanggal, String deskripsi) {
this.judul = judul;
this.gambar = gambar;
this.tanggal = tanggal;
this.deskripsi = deskripsi;
}
public String getJudul() {
return judul;
}
public String getGambar() {
return gambar;
}
public String getTanggal() {
return tanggal;
}
public String getDeskripsi() {
return deskripsi;
}
}

View File

@ -0,0 +1,99 @@
package com.nurulwafa.nufakuproject;
import android.content.Intent;
import android.os.Bundle;
import android.widget.Toast;
import androidx.appcompat.app.AppCompatActivity;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.android.volley.Request;
import com.android.volley.toolbox.JsonObjectRequest;
import com.android.volley.toolbox.Volley;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import java.util.ArrayList;
import java.util.List;
public class BeritaActivity extends AppCompatActivity {
private RecyclerView recyclerView;
private BeritaAdapter adapter;
private List<Berita> beritaList = new ArrayList<>();
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_berita);
// Tampilkan toast jika dibuka dari notifikasi
// if (getIntent().getBooleanExtra("from_notif", false)) {
// String berita = getIntent().getStringExtra("berita");
// Toast.makeText(this, "Berita baru: " + berita, Toast.LENGTH_LONG).show();
// }
recyclerView = findViewById(R.id.rvBerita);
recyclerView.setLayoutManager(new LinearLayoutManager(this));
adapter = new BeritaAdapter(this, beritaList, berita -> {
// Intent ke Detail saat berita diklik
Intent intent = new Intent(BeritaActivity.this, DetailBeritaActivity.class);
intent.putExtra("judul", berita.getJudul());
intent.putExtra("tanggal", berita.getTanggal());
intent.putExtra("deskripsi", berita.getDeskripsi());
intent.putExtra("gambar", berita.getGambar());
// Tambahkan log dan toast DI SINI
// Log.d("BERITA_GAMBAR_URL", berita.getGambar());
// Toast.makeText(this, "Gambar: " + berita.getGambar(), Toast.LENGTH_LONG).show();
startActivity(intent);
});
recyclerView.setAdapter(adapter);
getBerita();
}
private void getBerita() {
String baseUrl = ApiHelper.getBaseUrl();
String requestUrl = baseUrl + "getBerita";
JsonObjectRequest request = new JsonObjectRequest(Request.Method.GET, requestUrl, null,
response -> {
try {
if (response.has("data")) {
JSONArray jsonArray = response.getJSONArray("data");
if (jsonArray.length() == 0) {
Toast.makeText(this, "Data berita tidak ditemukan", Toast.LENGTH_SHORT).show();
return;
}
beritaList.clear();
for (int i = 0; i < jsonArray.length(); i++) {
JSONObject obj = jsonArray.getJSONObject(i);
Berita berita = new Berita(
obj.getString("judul"),
obj.getString("gambar"),
obj.getString("tanggal"),
obj.getString("deskripsi")
);
beritaList.add(berita);
}
adapter.notifyDataSetChanged();
} else {
Toast.makeText(this, "Data berita tidak ditemukan", Toast.LENGTH_SHORT).show();
}
} catch (JSONException e) {
e.printStackTrace();
Toast.makeText(this, "Gagal parsing data", Toast.LENGTH_SHORT).show();
}
},
error -> Toast.makeText(this, "Gagal ambil data: " + error.getMessage(), Toast.LENGTH_SHORT).show()
);
Volley.newRequestQueue(this).add(request);
}
}

View File

@ -0,0 +1,65 @@
package com.nurulwafa.nufakuproject;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import java.util.List;
public class BeritaAdapter extends RecyclerView.Adapter<BeritaAdapter.BeritaViewHolder> {
private List<Berita> listBerita;
private Context context;
private OnItemClickListener listener;
public interface OnItemClickListener {
void onItemClick(Berita berita);
}
public BeritaAdapter(Context context, List<Berita> listBerita, OnItemClickListener listener) {
this.context = context;
this.listBerita = listBerita;
this.listener = listener;
}
@NonNull
@Override
public BeritaViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
View view = LayoutInflater.from(context).inflate(R.layout.item_berita, parent, false);
return new BeritaViewHolder(view);
}
@Override
public void onBindViewHolder(@NonNull BeritaViewHolder holder, int position) {
Berita berita = listBerita.get(position);
holder.tvJudulBerita.setText(berita.getJudul());
// Jika kamu ingin klik tombol detail untuk pindah halaman:
holder.btnDetailBerita.setOnClickListener(v -> listener.onItemClick(berita));
}
@Override
public int getItemCount() {
return listBerita.size();
}
public class BeritaViewHolder extends RecyclerView.ViewHolder {
TextView tvJudulBerita;
ImageView btnDetailBerita;
public BeritaViewHolder(@NonNull View itemView) {
super(itemView);
tvJudulBerita = itemView.findViewById(R.id.tvJudulBerita);
btnDetailBerita = itemView.findViewById(R.id.btnDetailBerita);
}
}
}

View File

@ -0,0 +1,134 @@
package com.nurulwafa.nufakuproject;
import android.os.Bundle;
import android.util.Log;
import android.widget.EditText;
import android.widget.ImageButton;
import android.widget.Toast;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.android.volley.Request;
import com.android.volley.RequestQueue;
import com.android.volley.toolbox.JsonObjectRequest;
import com.android.volley.toolbox.StringRequest;
import com.android.volley.toolbox.Volley;
import org.json.JSONArray;
import org.json.JSONObject;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class ChatActivity extends AppCompatActivity {
private RecyclerView recyclerView;
private EditText inputMessage;
private List<ChatModel> chatList;
private ChatAdapter chatAdapter;
private String sender = "wali"; // Ganti jika admin
String idWaliSantri;
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_chat);
recyclerView = findViewById(R.id.recyclerChat);
inputMessage = findViewById(R.id.inputMessage);
ImageButton btnSend = findViewById(R.id.btnSend);
chatList = new ArrayList<>();
chatAdapter = new ChatAdapter(chatList, sender);
recyclerView.setLayoutManager(new LinearLayoutManager(this));
recyclerView.setAdapter(chatAdapter);
idWaliSantri = getIntent().getStringExtra("id_wali_santri");
Log.d("CheckID", "idWaliSantri: " + idWaliSantri);
Log.d("ChatActivity", "ID dari Intent: " + idWaliSantri);
// Cek sebelum loadChat
Log.d("Sender", "Before loadChat: " + sender);
loadChat();
// Cek sesudah loadChat (optional, tapi bagus untuk jaga-jaga)
Log.d("Sender", "After loadChat: " + sender);
btnSend.setOnClickListener(v -> {
String msg = inputMessage.getText().toString().trim();
if (!msg.isEmpty()) {
if (idWaliSantri == null || idWaliSantri.isEmpty()) {
Toast.makeText(ChatActivity.this, "ID Wali Santri tidak ditemukan", Toast.LENGTH_SHORT).show();
return;
}
sendMessage(msg);
inputMessage.setText("");
}
});
}
private void loadChat() {
String baseUrl = ApiHelper.getBaseUrl();
String requestUrl = baseUrl + "getChatByWali/" + idWaliSantri;
RequestQueue queue = Volley.newRequestQueue(this);
JsonObjectRequest request = new JsonObjectRequest(Request.Method.GET, requestUrl, null,
response -> {
try {
JSONArray chatArray = response.getJSONArray("data");
chatList.clear();
for (int i = 0; i < chatArray.length(); i++) {
JSONObject obj = chatArray.getJSONObject(i);
String messageSender = obj.getString("sender");
String message = obj.getString("message");
String timestamp = obj.getString("timestamp");
Log.d("ChatDebug", "sender = " + messageSender + ", message = " + message + ", timestamp = " + timestamp);
// ChatModel sudah parse timestamp ke Date di dalam konstruktor
chatList.add(new ChatModel(messageSender, message, timestamp));
}
chatList.sort(Comparator.comparing(ChatModel::getParsedTimestamp));
chatAdapter.notifyDataSetChanged();
recyclerView.scrollToPosition(chatList.size() - 1);
} catch (Exception e) {
e.printStackTrace();
}
},
error -> error.printStackTrace()
);
queue.add(request);
}
private void sendMessage(String message) {
String baseUrl = ApiHelper.getBaseUrl();
String requestUrl = baseUrl + "sendChat";
StringRequest request = new StringRequest(Request.Method.POST, requestUrl,
response -> loadChat(),
error -> error.printStackTrace()
) {
@Override
protected Map<String, String> getParams() {
Map<String, String> params = new HashMap<>();
params.put("sender", sender);
params.put("id_wali_santri", idWaliSantri); // Ambil ID sesuai login
params.put("message", message);
return params;
}
};
RequestQueue queue = Volley.newRequestQueue(this);
queue.add(request);
}
}

View File

@ -0,0 +1,76 @@
package com.nurulwafa.nufakuproject;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import androidx.recyclerview.widget.RecyclerView;
import java.util.List;
public class ChatAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
private static final int TYPE_WALI = 0;
private static final int TYPE_ADMIN = 1;
private List<ChatModel> chatList;
private String currentUser; // "wali" or "admin"
public ChatAdapter(List<ChatModel> chatList, String currentUser) {
this.chatList = chatList;
this.currentUser = currentUser;
}
@Override
public int getItemViewType(int position) {
if (chatList.get(position).getSender().equals(currentUser)) {
return TYPE_WALI;
} else {
return TYPE_ADMIN;
}
}
@Override
public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
if (viewType == TYPE_WALI) {
View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_chat_right, parent, false);
return new WaliViewHolder(view);
} else {
View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_chat_left, parent, false);
return new AdminViewHolder(view);
}
}
@Override
public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) {
ChatModel chat = chatList.get(position);
if (holder instanceof WaliViewHolder) {
((WaliViewHolder) holder).message.setText(chat.getMessage());
} else {
((AdminViewHolder) holder).message.setText(chat.getMessage());
}
}
@Override
public int getItemCount() {
return chatList.size();
}
static class WaliViewHolder extends RecyclerView.ViewHolder {
TextView message;
public WaliViewHolder(View itemView) {
super(itemView);
message = itemView.findViewById(R.id.textMessageRight);
}
}
static class AdminViewHolder extends RecyclerView.ViewHolder {
TextView message;
public AdminViewHolder(View itemView) {
super(itemView);
message = itemView.findViewById(R.id.textMessageLeft);
}
}
}

View File

@ -0,0 +1,45 @@
package com.nurulwafa.nufakuproject;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;
public class ChatModel {
private String sender;
private String message;
private String timestamp;
private Date parsedTimestamp;
public ChatModel(String sender, String message, String timestamp) {
this.sender = sender;
this.message = message;
this.timestamp = timestamp;
// Parse timestamp ke Date saat objek dibuat
try {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss", Locale.getDefault());
this.parsedTimestamp = sdf.parse(timestamp);
} catch (ParseException e) {
e.printStackTrace();
this.parsedTimestamp = new Date(); // fallback: waktu saat ini
}
}
public String getSender() {
return sender;
}
public String getMessage() {
return message;
}
public String getTimestamp() {
return timestamp;
}
public Date getParsedTimestamp() {
return parsedTimestamp;
}
}

View File

@ -0,0 +1,83 @@
package com.nurulwafa.nufakuproject;
import android.os.Bundle;
import android.widget.TextView;
import android.widget.Toast;
import androidx.appcompat.app.AppCompatActivity;
import com.android.volley.Request;
import com.android.volley.RequestQueue;
import com.android.volley.toolbox.JsonObjectRequest;
import com.android.volley.toolbox.Volley;
import org.json.JSONException;
import org.json.JSONObject;
public class DataSantriActivity extends AppCompatActivity {
private TextView tvNIS, tvNamaSantri, tvKelasDiniyah, tvStatusSantri, tvTahunMasuk, tvTahunKeluar, tvKeteranganKeluar,
tvTempatLahir, tvTanggalLahir, tvAlamatSantri;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_data_santri);
// Inisialisasi TextView
tvNIS = findViewById(R.id.tvNIS);
tvNamaSantri = findViewById(R.id.tvNamaSantri);
tvKelasDiniyah = findViewById(R.id.tvKelasDiniyah);
tvStatusSantri = findViewById(R.id.tvStatusSantri);
tvTahunMasuk = findViewById(R.id.tvTahunMasuk);
tvTahunKeluar = findViewById(R.id.tvTahunKeluar);
tvKeteranganKeluar = findViewById(R.id.tvKeteranganKeluar);
tvTempatLahir = findViewById(R.id.tvTempatLahir);
tvTanggalLahir = findViewById(R.id.tvTanggalLahir);
tvAlamatSantri = findViewById(R.id.tvAlamatSantri);
String loginKey = getIntent().getStringExtra("login_key");
String loginValue = getIntent().getStringExtra("login_value");
if (loginKey != null && loginValue != null) {
getDataSantri(loginKey, loginValue);
} else {
Toast.makeText(this, "Data login tidak ditemukan", Toast.LENGTH_SHORT).show();
}
}
private void getDataSantri(String key, String value) {
String baseUrl = ApiHelper.getBaseUrl(); // Ambil base URL fleksibel
String requestUrl = baseUrl + "getDataSantri?" + key + "=" + value;
JsonObjectRequest request = new JsonObjectRequest(Request.Method.GET, requestUrl, null,
response -> {
try {
if (response.getBoolean("status")) {
// Ambil objek santri
JSONObject data = response.getJSONObject("data");
JSONObject santri = data.getJSONObject("santri");
tvNIS.setText(santri.getString("NIS"));
tvNamaSantri.setText(santri.getString("nama_santri"));
tvKelasDiniyah.setText(santri.getString("kelas_diniyah"));
tvStatusSantri.setText(santri.getString("status_santri"));
tvTahunMasuk.setText(santri.getString("tahun_masuk"));
tvTahunKeluar.setText(santri.getString("tahun_keluar"));
tvKeteranganKeluar.setText(santri.getString("keterangan_keluar"));
tvTempatLahir.setText(santri.getString("tempat_lahir"));
tvTanggalLahir.setText(santri.getString("tanggal_lahir"));
tvAlamatSantri.setText(santri.getString("alamat_santri"));
} else {
Toast.makeText(this, "Data tidak ditemukan", Toast.LENGTH_SHORT).show();
}
} catch (JSONException e) {
e.printStackTrace();
Toast.makeText(this, "Gagal parsing data", Toast.LENGTH_SHORT).show();
}
},
error -> Toast.makeText(this, "Gagal ambil data: " + error.getMessage(), Toast.LENGTH_SHORT).show()
);
RequestQueue queue = Volley.newRequestQueue(this);
queue.add(request);
}
}

View File

@ -0,0 +1,75 @@
package com.nurulwafa.nufakuproject;
import android.os.Bundle;
import android.widget.TextView;
import android.widget.Toast;
import androidx.appcompat.app.AppCompatActivity;
import com.android.volley.Request;
import com.android.volley.RequestQueue;
import com.android.volley.toolbox.JsonObjectRequest;
import com.android.volley.toolbox.Volley;
import org.json.JSONException;
import org.json.JSONObject;
public class DataWaliSantriActivity extends AppCompatActivity {
private TextView tvEmail, tvPassword, tvNamaWaliSantri, tvAlamat, tvNoTelepon, tvPekerjaan;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_data_wali_santri);
// Inisialisasi TextView
tvEmail = findViewById(R.id.tvEmail);
tvPassword = findViewById(R.id.tvPassword);
tvNamaWaliSantri = findViewById(R.id.tvNamaWaliSantri);
tvAlamat = findViewById(R.id.tvAlamat);
tvNoTelepon = findViewById(R.id.tvNoTelepon);
tvPekerjaan = findViewById(R.id.tvPekerjaan);
String loginKey = getIntent().getStringExtra("login_key");
String loginValue = getIntent().getStringExtra("login_value");
if (loginKey != null && loginValue != null) {
getDataSantri(loginKey, loginValue);
} else {
Toast.makeText(this, "Data login tidak ditemukan", Toast.LENGTH_SHORT).show();
}
}
private void getDataSantri(String key, String value) {
String baseUrl = ApiHelper.getBaseUrl(); // Ambil base URL fleksibel
String requestUrl = baseUrl + "getDataSantri?" + key + "=" + value;
JsonObjectRequest request = new JsonObjectRequest(Request.Method.GET, requestUrl, null,
response -> {
try {
if (response.getBoolean("status")) {
// Ambil objek wali_santri
JSONObject data = response.getJSONObject("data");
JSONObject waliSantri = data.getJSONObject("wali_santri");
tvEmail.setText(waliSantri.getString("email"));
tvPassword.setText(waliSantri.getString("password")); // Tidak ada di response, bisa dikosongkan atau ditambah di API jika perlu
tvNamaWaliSantri.setText(waliSantri.getString("nama_wali_santri"));
tvAlamat.setText(waliSantri.getString("alamat"));
tvNoTelepon.setText(waliSantri.getString("no_telepon"));
tvPekerjaan.setText(waliSantri.getString("pekerjaan"));
} else {
Toast.makeText(this, "Data tidak ditemukan", Toast.LENGTH_SHORT).show();
}
} catch (JSONException e) {
e.printStackTrace();
Toast.makeText(this, "Gagal parsing data", Toast.LENGTH_SHORT).show();
}
},
error -> Toast.makeText(this, "Gagal ambil data: " + error.getMessage(), Toast.LENGTH_SHORT).show()
);
RequestQueue queue = Volley.newRequestQueue(this);
queue.add(request);
}
}

View File

@ -0,0 +1,52 @@
package com.nurulwafa.nufakuproject;
import android.os.Bundle;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.appcompat.app.AppCompatActivity;
import com.bumptech.glide.Glide;
public class DetailBeritaActivity extends AppCompatActivity {
TextView tvJudul, tvTanggal, tvDeskripsi;
ImageView imgBerita;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_detail_berita);
tvJudul = findViewById(R.id.tvJudul);
tvTanggal = findViewById(R.id.tvTanggal);
tvDeskripsi = findViewById(R.id.tvDeskripsi);
imgBerita = findViewById(R.id.imgBerita);
// Ambil data dari intent
String judul = getIntent().getStringExtra("judul");
String tanggal = getIntent().getStringExtra("tanggal");
String deskripsi = getIntent().getStringExtra("deskripsi");
String gambar = getIntent().getStringExtra("gambar");
tvJudul.setText(judul);
tvTanggal.setText(tanggal);
tvDeskripsi.setText(deskripsi);
Glide.with(this).load(gambar).into(imgBerita);
// Glide.with(this)
// .load(gambar)
// .listener(new RequestListener<Drawable>() {
// @Override
// public boolean onLoadFailed(@Nullable GlideException e, Object model, Target<Drawable> target, boolean isFirstResource) {
// e.printStackTrace(); // cetak error ke logcat
// return false;
// }
//
// @Override
// public boolean onResourceReady(Drawable resource, Object model, Target<Drawable> target, DataSource dataSource, boolean isFirstResource) {
// return false;
// }
// })
// .into(imgBerita);
}
}

View File

@ -0,0 +1,80 @@
package com.nurulwafa.nufakuproject;
import android.os.Bundle;
import android.widget.TextView;
import android.widget.Toast;
import androidx.appcompat.app.AppCompatActivity;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.android.volley.Request;
import com.android.volley.toolbox.JsonObjectRequest;
import com.android.volley.toolbox.Volley;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import java.util.ArrayList;
import java.util.List;
public class DetailKegiatanActivity extends AppCompatActivity {
private TextView tvHari;
private RecyclerView rvKegiatanSantri;
private List<KegiatanSantri> kegiatanList;
private KegiatanSantriAdapter adapter;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_detail_kegiatan);
tvHari = findViewById(R.id.homeTitle);
rvKegiatanSantri = findViewById(R.id.rvKegiatanSantri);
String hari = getIntent().getStringExtra("hari");
tvHari.setText("Kegiatan Hari " + hari);
kegiatanList = new ArrayList<>();
adapter = new KegiatanSantriAdapter(this, kegiatanList);
rvKegiatanSantri.setLayoutManager(new LinearLayoutManager(this));
rvKegiatanSantri.setAdapter(adapter);
getDetailKegiatan(hari);
}
private void getDetailKegiatan(String hari) {
String url = ApiHelper.getBaseUrl() + "getKegiatan?hari=" + hari;
JsonObjectRequest request = new JsonObjectRequest(Request.Method.GET, url, null,
response -> {
try {
if (response.getBoolean("status")) {
JSONArray dataArray = response.getJSONArray("data");
kegiatanList.clear();
for (int i = 0; i < dataArray.length(); i++) {
JSONObject item = dataArray.getJSONObject(i);
String namaKegiatan = item.getString("nama_kegiatan");
String waktu = item.getString("waktu");
kegiatanList.add(new KegiatanSantri(namaKegiatan, waktu));
}
adapter.notifyDataSetChanged();
} else {
Toast.makeText(this, "Data tidak tersedia", Toast.LENGTH_SHORT).show();
}
} catch (JSONException e) {
Toast.makeText(this, "Gagal parsing data", Toast.LENGTH_SHORT).show();
e.printStackTrace();
}
},
error -> Toast.makeText(this, "Gagal mengambil data: " + error.getMessage(), Toast.LENGTH_SHORT).show()
);
Volley.newRequestQueue(this).add(request);
}
}

View File

@ -0,0 +1,197 @@
package com.nurulwafa.nufakuproject;
import android.content.Intent;
import android.os.Bundle;
import android.content.SharedPreferences;
import androidx.appcompat.app.AlertDialog;
import androidx.cardview.widget.CardView;
import android.util.Log;
import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;
import androidx.appcompat.app.AppCompatActivity;
public class HomeActivity extends AppCompatActivity {
String idSantri;
CardView cardKesehatan;
TextView txtKesehatan;
ImageView imgKesehatan;
@Override
protected void onCreate(Bundle savedInstanceState) {
// Ambil data dari notifikasi (jika ada)
Intent notifIntent = getIntent(); // jangan pakai nama 'intent'
String idSantriFromNotif = notifIntent.getStringExtra("id_santri");
String kondisiFromNotif = notifIntent.getStringExtra("kondisi_kesehatan");
// Simpan ke SharedPreferences jika berasal dari notifikasi
if (idSantriFromNotif != null && kondisiFromNotif != null) {
Log.d("NOTIF", "ID Santri dari Notif: " + idSantriFromNotif);
SharedPreferences preferences = getSharedPreferences("santri", MODE_PRIVATE);
SharedPreferences.Editor editor = preferences.edit();
editor.putString("kondisi_kesehatan", kondisiFromNotif);
editor.apply();
}
SharedPreferences preferences = getSharedPreferences("santri", MODE_PRIVATE);
String idSantri = preferences.getString("id_santri", null);
if (idSantri == null) {
// Jika datang dari notifikasi
if (getIntent().getBooleanExtra("from_notif", false)) {
String idFromNotif = getIntent().getStringExtra("id_santri");
if (idFromNotif != null) {
SharedPreferences.Editor editor = preferences.edit();
editor.putString("id_santri", idFromNotif);
editor.apply();
idSantri = idFromNotif;
// Log.d("HOME_ID_SANTRI", "Disimpan dari notifikasi: " + idSantri);
}
}
if (idSantri == null) {
Toast.makeText(this, "ID Santri tidak ditemukan!", Toast.LENGTH_SHORT).show();
finish();
return;
}
}
// Terima login key dan value dari LoginActivity
String loginKey = getIntent().getStringExtra("login_key");
String loginValue = getIntent().getStringExtra("login_value");
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_home); // pastikan xml-nya activity_home.xml
// Terima id_santri dari intent
idSantri = getIntent().getStringExtra("id_santri");
if (idSantri == null) {
Toast.makeText(this, "ID Santri tidak ditemukan!", Toast.LENGTH_SHORT).show();
finish();
return;
}
String idWaliSantri = getIntent().getStringExtra("id_wali_santri");
// Hubungkan semua CardView
CardView cardPonpes = findViewById(R.id.cardPonpes);
CardView cardSantri = findViewById(R.id.cardSantri);
CardView cardWaliSantri = findViewById(R.id.cardWaliSantri);
CardView cardKegiatan = findViewById(R.id.cardKegiatan);
CardView cardPrestasi = findViewById(R.id.cardPrestasi);
CardView cardPelanggaran = findViewById(R.id.cardPelanggaran);
CardView cardSPP = findViewById(R.id.cardSPP);
CardView cardBerita = findViewById(R.id.cardBerita);
cardKesehatan = findViewById(R.id.cardKesehatan);
txtKesehatan = findViewById(R.id.txtKesehatan);
imgKesehatan = findViewById(R.id.imgKesehatan);
// Pasang onClick untuk tiap CardView
cardPonpes.setOnClickListener(v -> {
Intent intent = new Intent(HomeActivity.this, PonpesActivity.class);
startActivity(intent);
});
cardSantri.setOnClickListener(v -> {
Intent intent = new Intent(HomeActivity.this, DataSantriActivity.class);
intent.putExtra("login_key", loginKey);
intent.putExtra("login_value", loginValue);
startActivity(intent);
});
cardWaliSantri.setOnClickListener(v -> {
Intent intent = new Intent(HomeActivity.this, DataWaliSantriActivity.class);
intent.putExtra("login_key", loginKey);
intent.putExtra("login_value", loginValue);
startActivity(intent);
});
cardKegiatan.setOnClickListener(v -> {
Intent intent = new Intent(HomeActivity.this, KegiatanSantriActivity.class);
startActivity(intent);
});
cardPrestasi.setOnClickListener(v -> {
Intent intent = new Intent(HomeActivity.this, PrestasiSantriActivity.class);
intent.putExtra("login_key", loginKey);
intent.putExtra("login_value", loginValue);
startActivity(intent);
});
cardPelanggaran.setOnClickListener(v -> {
Intent intent = new Intent(HomeActivity.this, PelanggaranSantriActivity.class);
intent.putExtra("login_key", loginKey);
intent.putExtra("login_value", loginValue);
startActivity(intent);
});
cardSPP.setOnClickListener(v -> {
Intent intent = new Intent(HomeActivity.this, InformasiSPPActivity.class);
intent.putExtra("login_key", loginKey);
intent.putExtra("login_value", loginValue);
startActivity(intent);
});
cardBerita.setOnClickListener(v -> {
Intent intent = new Intent(HomeActivity.this, BeritaActivity.class);
startActivity(intent);
});
ImageButton btnChat = findViewById(R.id.btnChat);
btnChat.setOnClickListener(v -> {
Intent intent = new Intent(HomeActivity.this, ChatActivity.class);
intent.putExtra("id_wali_santri", String.valueOf(idWaliSantri));
startActivity(intent);
});
ImageButton btnLogout = findViewById(R.id.btnLogout);
btnLogout.setOnClickListener(v -> {
new AlertDialog.Builder(HomeActivity.this)
.setTitle("Konfirmasi Logout")
.setMessage("Apakah Anda yakin ingin keluar?")
.setPositiveButton("Iya", (dialog, which) -> {
// Hapus sesi login (jika pakai SharedPreferences)
SharedPreferences logoutPrefs = getSharedPreferences("login", MODE_PRIVATE);
logoutPrefs.edit().clear().apply();
// Arahkan ke halaman login
Intent intent = new Intent(HomeActivity.this, MainActivity.class);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
startActivity(intent);
finish();
})
.setNegativeButton("Tidak", (dialog, which) -> {
dialog.dismiss(); // Tutup dialog
})
.show();
});
loadDataSantri();
}
private void loadDataSantri() {
SharedPreferences preferences = getSharedPreferences("santri", MODE_PRIVATE);
String kondisiKesehatan = preferences.getString("kondisi_kesehatan", "Tidak Diketahui");
// Log.d("Kesehatan", "Kondisi: " + kondisiKesehatan);
txtKesehatan.setText(kondisiKesehatan);
if (kondisiKesehatan.equalsIgnoreCase("Dalam Kondisi Sehat")) {
imgKesehatan.setImageResource(R.drawable.sehat);
} else if (kondisiKesehatan.equalsIgnoreCase("Dalam Kondisi Sakit")) {
imgKesehatan.setImageResource(R.drawable.sakit);
} else {
txtKesehatan.setText("Kondisi Tidak Diketahui");
imgKesehatan.setImageResource(R.drawable.ic_unknown);
}
}
}

View File

@ -0,0 +1,43 @@
package com.nurulwafa.nufakuproject;
public class InformasiSPP {
private String namaSantri;
private String bulan;
private String tahun;
private String jumlahPembayaran;
private String jatuhTempo;
private String keterangan;
public InformasiSPP(String namaSantri, String bulan, String tahun, String jumlahPembayaran, String jatuhTempo, String keterangan) {
this.namaSantri = namaSantri;
this.bulan = bulan;
this.tahun = tahun;
this.jumlahPembayaran = jumlahPembayaran;
this.jatuhTempo = jatuhTempo;
this.keterangan = keterangan;
}
public String getNamaSantri() {
return namaSantri;
}
public String getBulan() {
return bulan;
}
public String getTahun() {
return tahun;
}
public String getJumlahPembayaran() {
return jumlahPembayaran;
}
public String getJatuhTempo() {
return jatuhTempo;
}
public String getKeterangan() {
return keterangan;
}
}

View File

@ -0,0 +1,93 @@
package com.nurulwafa.nufakuproject;
import android.os.Bundle;
import android.widget.Toast;
import androidx.appcompat.app.AppCompatActivity;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.android.volley.Request;
import com.android.volley.RequestQueue;
import com.android.volley.toolbox.JsonObjectRequest;
import com.android.volley.toolbox.Volley;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import java.util.ArrayList;
public class InformasiSPPActivity extends AppCompatActivity {
private RecyclerView rvInformasiSPP;
private InformasiSPPAdapter adapter;
private ArrayList<InformasiSPP> informasiSPPList;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_informasi_spp_santri);
rvInformasiSPP = findViewById(R.id.rvInformasiSPP);
rvInformasiSPP.setLayoutManager(new LinearLayoutManager(this));
informasiSPPList = new ArrayList<>();
adapter = new InformasiSPPAdapter(informasiSPPList);
rvInformasiSPP.setAdapter(adapter);
String loginKey = getIntent().getStringExtra("login_key");
String loginValue = getIntent().getStringExtra("login_value");
if (loginKey != null && loginValue != null) {
getDataSantri(loginKey, loginValue);
} else {
Toast.makeText(this, "Data login tidak ditemukan", Toast.LENGTH_SHORT).show();
}
}
private void getDataSantri(String key, String value) {
String baseUrl = ApiHelper.getBaseUrl();
String requestUrl = baseUrl + "getDataSantri?" + key + "=" + value;
JsonObjectRequest request = new JsonObjectRequest(Request.Method.GET, requestUrl, null,
response -> {
try {
if (response.getBoolean("status")) {
informasiSPPList.clear();
// Ambil objek "data"
JSONObject dataObject = response.getJSONObject("data");
// Ambil array "pelanggaran_santri" dari dalam "data"
JSONArray informasiSPPArray = dataObject.getJSONArray("informasi_spp_santri");
for (int i = 0; i < informasiSPPArray.length(); i++) {
JSONObject informasiSPP = informasiSPPArray.getJSONObject(i);
String nama = informasiSPP.getString("nama_santri");
String bulan = informasiSPP.optString("bulan", "-");
String tahun = informasiSPP.optString("tahun", "-");
String jumlahPembayaran = informasiSPP.optString("jumlah_pembayaran", "-");
String jatuhTempo = informasiSPP.optString("jatuh_tempo", "-");
String keterangan = informasiSPP.optString("keterangan", "-");
InformasiSPP p = new InformasiSPP(nama, bulan, tahun, jumlahPembayaran, jatuhTempo, keterangan);
informasiSPPList.add(p);
}
adapter.notifyDataSetChanged();
} else {
Toast.makeText(this, "Data tidak ditemukan", Toast.LENGTH_SHORT).show();
}
} catch (JSONException e) {
e.printStackTrace();
Toast.makeText(this, "Gagal parsing data", Toast.LENGTH_SHORT).show();
}
},
error -> Toast.makeText(this, "Gagal ambil data: " + error.getMessage(), Toast.LENGTH_SHORT).show()
);
RequestQueue queue = Volley.newRequestQueue(this);
queue.add(request);
}
}

View File

@ -0,0 +1,56 @@
package com.nurulwafa.nufakuproject;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import java.util.List;
public class InformasiSPPAdapter extends RecyclerView.Adapter<InformasiSPPAdapter.InformasiSPPViewHolder> {
private final List<InformasiSPP> informasiSPPList;
public InformasiSPPAdapter(List<InformasiSPP> informasiSPPList) {
this.informasiSPPList = informasiSPPList;
}
@NonNull
@Override
public InformasiSPPAdapter.InformasiSPPViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
View v = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_informasi_spp, parent, false);
return new InformasiSPPAdapter.InformasiSPPViewHolder(v);
}
@Override
public void onBindViewHolder(@NonNull InformasiSPPAdapter.InformasiSPPViewHolder holder, int position) {
InformasiSPP informasiSPP = informasiSPPList.get(position);
holder.tvNamaSantri.setText(informasiSPP.getNamaSantri());
holder.tvBulan.setText("Bulan: " + informasiSPP.getBulan());
holder.tvTahun.setText("Tahun: " + informasiSPP.getTahun());
holder.tvJumlahPembayaran.setText("Jumlah Pembayaran: " + informasiSPP.getJumlahPembayaran());
holder.tvJatuhTempo.setText("Jatuh Tempo: " + informasiSPP.getJatuhTempo());
holder.tvKeterangan.setText("Keterangan: " + informasiSPP.getKeterangan());
}
@Override
public int getItemCount() {
return informasiSPPList.size();
}
static class InformasiSPPViewHolder extends RecyclerView.ViewHolder {
TextView tvNamaSantri, tvBulan, tvTahun, tvJumlahPembayaran, tvJatuhTempo, tvKeterangan;
public InformasiSPPViewHolder(@NonNull View itemView) {
super(itemView);
tvNamaSantri = itemView.findViewById(R.id.tvNamaSantri);
tvBulan = itemView.findViewById(R.id.tvBulan);
tvTahun = itemView.findViewById(R.id.tvTahun);
tvJumlahPembayaran = itemView.findViewById(R.id.tvJumlahPembayaran);
tvJatuhTempo = itemView.findViewById(R.id.tvJatuhTempo);
tvKeterangan = itemView.findViewById(R.id.tvKeterangan);
}
}
}

View File

@ -0,0 +1,19 @@
package com.nurulwafa.nufakuproject;
public class KegiatanSantri {
private String namaKegiatan;
private String waktu;
public KegiatanSantri(String namaKegiatan, String waktu) {
this.namaKegiatan = namaKegiatan;
this.waktu = waktu;
}
public String getNamaKegiatan() {
return namaKegiatan;
}
public String getWaktu() {
return waktu;
}
}

View File

@ -0,0 +1,98 @@
package com.nurulwafa.nufakuproject;
import android.graphics.Typeface;
import android.os.Bundle;
import android.widget.LinearLayout;
import android.widget.TextView;
import android.widget.Toast;
import androidx.appcompat.app.AppCompatActivity;
import com.android.volley.Request;
import com.android.volley.RequestQueue;
import com.android.volley.toolbox.JsonObjectRequest;
import com.android.volley.toolbox.Volley;
import org.json.JSONException;
import org.json.JSONObject;
import org.json.JSONArray;
public class KegiatanSantriActivity extends AppCompatActivity {
private LinearLayout layoutKonten;
RequestQueue requestQueue;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_kegiatan_santri);
layoutKonten = findViewById(R.id.layoutKonten);
requestQueue = Volley.newRequestQueue(this);
// Panggil method untuk ambil dan tampilkan data
fetchKegiatanSantri();
}
private void fetchKegiatanSantri() {
String url = ApiHelper.getBaseUrl() + "getKegiatan";
JsonObjectRequest request = new JsonObjectRequest(Request.Method.GET, url, null,
response -> {
try {
boolean status = response.getBoolean("status");
if (status) {
JSONArray dataArray = response.getJSONArray("data");
for (int i = 0; i < dataArray.length(); i++) {
JSONObject kegiatan = dataArray.getJSONObject(i);
String namaKegiatan = kegiatan.getString("nama_kegiatan");
String waktu = kegiatan.getString("waktu");
// Tambahkan ke layoutKonten
addKegiatanCard(namaKegiatan, waktu);
}
} else {
Toast.makeText(this, "Tidak ada data kegiatan ditemukan.", Toast.LENGTH_SHORT).show();
}
} catch (JSONException e) {
e.printStackTrace();
Toast.makeText(this, "Error parsing data", Toast.LENGTH_SHORT).show();
}
},
error -> {
error.printStackTrace();
Toast.makeText(this, "Gagal mengambil data dari server", Toast.LENGTH_SHORT).show();
}
);
requestQueue.add(request);
}
private void addKegiatanCard(String nama, String waktu) {
LinearLayout layoutKonten = findViewById(R.id.layoutKonten);
LinearLayout card = new LinearLayout(this);
card.setOrientation(LinearLayout.VERTICAL);
card.setPadding(24, 24, 24, 24);
card.setBackgroundResource(R.drawable.custom_editcard); // opsional: drawable card background
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(
LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT);
params.setMargins(0, 30, 0, 0);
card.setLayoutParams(params);
TextView tvNama = new TextView(this);
tvNama.setText(nama);
tvNama.setTextSize(16f);
tvNama.setTypeface(null, Typeface.BOLD);
TextView tvWaktu = new TextView(this);
tvWaktu.setText(waktu);
tvWaktu.setTextSize(14f);
card.addView(tvNama);
card.addView(tvWaktu);
layoutKonten.addView(card);
}
}

View File

@ -0,0 +1,51 @@
package com.nurulwafa.nufakuproject;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import java.util.List;
public class KegiatanSantriAdapter extends RecyclerView.Adapter<KegiatanSantriAdapter.ViewHolder> {
private List<KegiatanSantri> kegiatanList;
private Context context;
public KegiatanSantriAdapter(Context context, List<KegiatanSantri> kegiatanList) {
this.context = context;
this.kegiatanList = kegiatanList;
}
@NonNull
@Override
public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
View view = LayoutInflater.from(context).inflate(R.layout.item_kegiatan_santri, parent, false);
return new ViewHolder(view);
}
@Override
public void onBindViewHolder(@NonNull ViewHolder holder, int position) {
KegiatanSantri kegiatan = kegiatanList.get(position);
holder.tvNamaKegiatan.setText(kegiatan.getNamaKegiatan());
holder.tvWaktu.setText(kegiatan.getWaktu());
}
@Override
public int getItemCount() {
return kegiatanList.size();
}
public static class ViewHolder extends RecyclerView.ViewHolder {
TextView tvNamaKegiatan, tvWaktu;
public ViewHolder(@NonNull View itemView) {
super(itemView);
tvNamaKegiatan = itemView.findViewById(R.id.tvNamaKegiatan);
tvWaktu = itemView.findViewById(R.id.tvWaktu);
}
}
}

View File

@ -0,0 +1,214 @@
package com.nurulwafa.nufakuproject;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.text.InputType;
import android.util.Log;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.Toast;
import com.android.volley.Request;
import com.android.volley.toolbox.JsonObjectRequest;
import com.android.volley.toolbox.Volley;
import com.google.firebase.messaging.FirebaseMessaging;
import org.json.JSONException;
import org.json.JSONObject;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.net.HttpURLConnection;
import java.net.URL;
public class MainActivity extends AppCompatActivity {
private EditText edtEmailOrNIS;
private EditText edtPassword;
private Button btnLogin;
private boolean isPasswordVisible = false;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
edtEmailOrNIS = findViewById(R.id.email);
edtPassword = findViewById(R.id.password);
btnLogin = findViewById(R.id.loginButton);
ImageView togglePasswordVisibility = findViewById(R.id.togglePasswordVisibility);
togglePasswordVisibility.setOnClickListener(v -> {
if (isPasswordVisible) {
edtPassword.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_PASSWORD);
togglePasswordVisibility.setImageResource(R.drawable.ic_eye_closed);
isPasswordVisible = false;
} else {
edtPassword.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD);
togglePasswordVisibility.setImageResource(R.drawable.ic_eye_open);
isPasswordVisible = true;
}
edtPassword.setSelection(edtPassword.getText().length());
});
btnLogin.setOnClickListener(view -> {
String inputEmailOrNIS = edtEmailOrNIS.getText().toString().trim();
String inputPassword = edtPassword.getText().toString().trim();
if (inputEmailOrNIS.isEmpty() || inputPassword.isEmpty()) {
Toast.makeText(MainActivity.this, "Email/NIS dan Password tidak boleh kosong!", Toast.LENGTH_SHORT).show();
return;
}
new Thread(() -> {
try {
String urlLogin = ApiHelper.getBaseUrl() + "loginWaliSantri";
URL url = new URL(urlLogin);
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setRequestMethod("POST");
conn.setRequestProperty("Content-Type", "application/json; charset=UTF-8");
conn.setDoOutput(true);
conn.setDoInput(true);
JSONObject jsonParam = new JSONObject();
jsonParam.put("email_or_NIS", inputEmailOrNIS);
jsonParam.put("password", inputPassword);
OutputStream os = conn.getOutputStream();
os.write(jsonParam.toString().getBytes("UTF-8"));
os.close();
int responseCode = conn.getResponseCode();
if (responseCode == HttpURLConnection.HTTP_OK) {
BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()));
StringBuilder sb = new StringBuilder();
String line;
while ((line = in.readLine()) != null) {
sb.append(line);
}
in.close();
// Tambahkan debug di sini
String responseData = sb.toString();
// Log.d("API_RESPONSE", responseData);
JSONObject responseJson = new JSONObject(responseData);
String status = responseJson.getString("status");
runOnUiThread(() -> {
if (status.equals("success") || status.equals("true")) {
try {
JSONObject santri = responseJson.getJSONObject("santri");
String idSantri = santri.getString("id_santri");
JSONObject waliSantri = responseJson.getJSONObject("wali_santri");
String idWaliSantri = waliSantri.getString("id_wali_santri");
String kondisiKesehatan = waliSantri.optString("kondisi_kesehatan");
// Log.d("Kesehatan", "Login - kondisi dari API: " + kondisiKesehatan);
// Log.d("LOGIN_ID_SANTRI", "ID Santri dari API: " + idSantri);
// SharedPreferences DI SINI di thread utama
SharedPreferences preferences = getSharedPreferences("santri", MODE_PRIVATE);
SharedPreferences.Editor editor = preferences.edit();
editor.putString("id_santri", idSantri);
editor.putString("kondisi_kesehatan", kondisiKesehatan);
editor.apply();
// Log.d("Kesehatan", "Menyimpan kondisi: " + kondisiKesehatan);
// Log.d("LOGIN_ID_SANTRI", "ID Santri disimpan ke SharedPreferences: " + idSantri);
Toast.makeText(MainActivity.this, "Login berhasil!", Toast.LENGTH_SHORT).show();
FirebaseMessaging.getInstance().getToken().addOnCompleteListener(task -> {
if (task.isSuccessful()) {
String fcmToken = task.getResult();
// Log.d("FCM_TOKEN", "Token didapatkan: " + fcmToken);
saveTokenToServer(idWaliSantri, fcmToken, () -> {
// Callback setelah token tersimpan, lanjut ke HomeActivity
Intent intent = new Intent(MainActivity.this, HomeActivity.class);
intent.putExtra("id_santri", idSantri);
intent.putExtra("id_wali_santri", idWaliSantri);
String loginKey = inputEmailOrNIS.contains("@") ? "email" : "NIS";
intent.putExtra("login_key", loginKey);
intent.putExtra("login_value", inputEmailOrNIS);
startActivity(intent);
finish();
});
} else {
// Log.e("FCM_TOKEN_ERR", "Gagal mendapatkan token FCM: " + task.getException());
}
});
Intent intent = new Intent(MainActivity.this, HomeActivity.class);
intent.putExtra("id_santri", idSantri);
intent.putExtra("id_wali_santri", idWaliSantri);
String loginKey = inputEmailOrNIS.contains("@") ? "email" : "NIS";
intent.putExtra("login_key", loginKey);
intent.putExtra("login_value", inputEmailOrNIS);
startActivity(intent);
finish();
} catch (JSONException e) {
e.printStackTrace();
Toast.makeText(MainActivity.this, "Gagal parsing data!", Toast.LENGTH_SHORT).show();
}
} else {
Toast.makeText(MainActivity.this, "Login gagal! Email/NIS atau password salah.", Toast.LENGTH_SHORT).show();
}
});
} else {
runOnUiThread(() ->
Toast.makeText(MainActivity.this, "Gagal terhubung ke server.", Toast.LENGTH_SHORT).show()
);
}
conn.disconnect();
} catch (Exception e) {
e.printStackTrace();
runOnUiThread(() ->
Toast.makeText(MainActivity.this, "Terjadi kesalahan: " + e.getMessage(), Toast.LENGTH_SHORT).show()
);
}
}).start();
});
}
private void saveTokenToServer(String idWaliSantri, String token, Runnable onSuccess) {
String url = ApiHelper.getBaseUrl() + "saveToken";
JSONObject jsonBody = new JSONObject();
try {
jsonBody.put("id_wali_santri", idWaliSantri);
jsonBody.put("token", token);
} catch (JSONException e) {
e.printStackTrace();
return;
}
JsonObjectRequest request = new JsonObjectRequest(
Request.Method.POST, url, jsonBody,
response -> {
Log.d("FCM_TOKEN", "Token berhasil dikirim: " + token);
if (onSuccess != null) {
onSuccess.run(); // jalankan callback jika tidak null
}
},
error -> Log.e("FCM_TOKEN_ERR", "Gagal kirim token: " + error.toString())
);
Volley.newRequestQueue(this).add(request);
}
}

View File

@ -0,0 +1,6 @@
package com.nurulwafa.nufakuproject;
import com.bumptech.glide.module.AppGlideModule;
public class MyAppGlideModule extends AppGlideModule {
}

View File

@ -0,0 +1,113 @@
package com.nurulwafa.nufakuproject;
import android.app.NotificationChannel;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.ContentResolver;
import android.content.Intent;
import android.graphics.Color;
import android.media.AudioAttributes;
import android.net.Uri;
import android.os.Build;
import android.util.Log;
import androidx.annotation.NonNull;
import androidx.core.app.NotificationCompat;
import com.google.firebase.messaging.FirebaseMessagingService;
import com.google.firebase.messaging.RemoteMessage;
import com.nurulwafa.nufakuproject.R;
public class MyFirebaseMessagingService extends FirebaseMessagingService {
private static final String CHANNEL_ID = "NUFA_CHANNEL_2";
@Override
public void onMessageReceived(@NonNull RemoteMessage remoteMessage) {
String title = "Notifikasi Baru";
String body = "Ada pesan masuk";
if (remoteMessage.getNotification() != null) {
title = remoteMessage.getNotification().getTitle();
body = remoteMessage.getNotification().getBody();
} else if (remoteMessage.getData().size() > 0) {
title = remoteMessage.getData().get("title");
body = remoteMessage.getData().get("body");
}
String idSantri = remoteMessage.getData().get("id_santri");
String idWaliSantri = remoteMessage.getData().get("id_wali_santri");
String kondisi = remoteMessage.getData().get("kondisi_kesehatan");
String type = remoteMessage.getData().get("type");
String apiUrl = remoteMessage.getData().get("api_url");
Intent intent;
if ("kesehatan".equalsIgnoreCase(type)) {
intent = new Intent(this, HomeActivity.class);
intent.putExtra("id_santri", idSantri);
intent.putExtra("id_wali_santri", idWaliSantri);
intent.putExtra("kondisi_kesehatan", kondisi);
intent.putExtra("from_notif", true);
} else if ("pelanggaran".equalsIgnoreCase(type)) {
intent = new Intent(this, PelanggaranSantriActivity.class);
intent.putExtra("login_key", "id_santri");
intent.putExtra("login_value", idSantri);
intent.putExtra("from_notif", true);
} else if ("berita".equalsIgnoreCase(type)) {
intent = new Intent(this, DetailBeritaActivity.class);
intent.putExtra("from_notif", true);
intent.putExtra("judul", remoteMessage.getData().get("judul"));
intent.putExtra("gambar", remoteMessage.getData().get("gambar"));
intent.putExtra("tanggal", remoteMessage.getData().get("tanggal"));
intent.putExtra("deskripsi", remoteMessage.getData().get("deskripsi"));
} else {
intent = new Intent(this, HomeActivity.class);
}
PendingIntent pendingIntent = PendingIntent.getActivity(
this,
0,
intent,
PendingIntent.FLAG_ONE_SHOT | PendingIntent.FLAG_IMMUTABLE
);
// Deklarasikan di atas agar bisa digunakan dua kali
Uri soundUri = Uri.parse(ContentResolver.SCHEME_ANDROID_RESOURCE + "://" + getPackageName() + "/raw/nufa_alert");
Log.d("NOTIF_SOUND", "Sound URI: " + soundUri.toString());
NotificationCompat.Builder builder = new NotificationCompat.Builder(this, CHANNEL_ID)
.setSmallIcon(R.drawable.logo)
.setContentTitle(title)
.setContentText(body)
.setAutoCancel(true)
.setColor(Color.GREEN)
.setContentIntent(pendingIntent)
.setPriority(NotificationCompat.PRIORITY_HIGH)
.setSound(soundUri); // dipakai di sini
NotificationManager notificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
AudioAttributes audioAttributes = new AudioAttributes.Builder()
.setUsage(AudioAttributes.USAGE_NOTIFICATION)
.setContentType(AudioAttributes.CONTENT_TYPE_SONIFICATION)
.build();
NotificationChannel channel = new NotificationChannel(
CHANNEL_ID,
"Notifikasi NUFA",
NotificationManager.IMPORTANCE_HIGH
);
channel.setDescription("Channel untuk notifikasi");
channel.enableLights(true);
channel.enableVibration(true);
channel.setSound(soundUri, audioAttributes); // dipakai di sini juga
notificationManager.createNotificationChannel(channel);
}
// BARIS INI YANG BELUM ADA
notificationManager.notify(1, builder.build());
}
}

View File

@ -0,0 +1,37 @@
package com.nurulwafa.nufakuproject;
public class Pelanggaran {
private String namaSantri;
private String pelanggaran;
private String tanggal;
private String sanksi;
private String keterangan;
public Pelanggaran(String namaSantri, String pelanggaran, String tanggal, String sanksi, String keterangan) {
this.namaSantri = namaSantri;
this.pelanggaran = pelanggaran;
this.tanggal = tanggal;
this.sanksi = sanksi;
this.keterangan = keterangan;
}
public String getNamaSantri() {
return namaSantri;
}
public String getPelanggaran() {
return pelanggaran;
}
public String getTanggal() {
return tanggal;
}
public String getSanksi() {
return sanksi;
}
public String getKeterangan() {
return keterangan;
}
}

View File

@ -0,0 +1,54 @@
package com.nurulwafa.nufakuproject;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import java.util.List;
public class PelanggaranAdapter extends RecyclerView.Adapter<PelanggaranAdapter.PelanggaranViewHolder> {
private final List<Pelanggaran> pelanggaranList;
public PelanggaranAdapter(List<Pelanggaran> pelanggaranList) {
this.pelanggaranList = pelanggaranList;
}
@NonNull
@Override
public PelanggaranAdapter.PelanggaranViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
View v = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_pelanggaran, parent, false);
return new PelanggaranAdapter.PelanggaranViewHolder(v);
}
@Override
public void onBindViewHolder(@NonNull PelanggaranAdapter.PelanggaranViewHolder holder, int position) {
Pelanggaran pelanggaran = pelanggaranList.get(position);
holder.tvNamaSantri.setText(pelanggaran.getNamaSantri());
holder.tvPelanggaran.setText("Pelanggaran: " + pelanggaran.getPelanggaran());
holder.tvTanggal.setText("Tanggal: " + pelanggaran.getTanggal());
holder.tvSanksi.setText("Sanksi: " + pelanggaran.getSanksi());
holder.tvKeterangan.setText("Keterangan: " + pelanggaran.getKeterangan());
}
@Override
public int getItemCount() {
return pelanggaranList.size();
}
static class PelanggaranViewHolder extends RecyclerView.ViewHolder {
TextView tvNamaSantri, tvPelanggaran, tvTanggal, tvSanksi, tvKeterangan;
public PelanggaranViewHolder(@NonNull View itemView) {
super(itemView);
tvNamaSantri = itemView.findViewById(R.id.tvNamaSantri);
tvPelanggaran = itemView.findViewById(R.id.tvPelanggaran);
tvTanggal = itemView.findViewById(R.id.tvTanggal);
tvSanksi = itemView.findViewById(R.id.tvSanksi);
tvKeterangan = itemView.findViewById(R.id.tvKeterangan);
}
}
}

View File

@ -0,0 +1,95 @@
package com.nurulwafa.nufakuproject;
import android.os.Bundle;
import android.util.Log;
import android.widget.Toast;
import androidx.appcompat.app.AppCompatActivity;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.android.volley.Request;
import com.android.volley.RequestQueue;
import com.android.volley.toolbox.JsonObjectRequest;
import com.android.volley.toolbox.Volley;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import java.util.ArrayList;
public class PelanggaranSantriActivity extends AppCompatActivity {
private RecyclerView rvPelanggaran;
private PelanggaranAdapter adapter;
private ArrayList<Pelanggaran> pelanggaranList;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_pelanggaran_santri);
rvPelanggaran = findViewById(R.id.rvPelanggaran);
rvPelanggaran.setLayoutManager(new LinearLayoutManager(this));
pelanggaranList = new ArrayList<>();
adapter = new PelanggaranAdapter(pelanggaranList);
rvPelanggaran.setAdapter(adapter);
String loginKey = getIntent().getStringExtra("login_key");
String loginValue = getIntent().getStringExtra("login_value");
if (loginKey != null && loginValue != null) {
getDataSantri(loginKey, loginValue);
} else {
Toast.makeText(this, "Data login tidak ditemukan", Toast.LENGTH_SHORT).show();
}
}
private void getDataSantri(String key, String value) {
String baseUrl = ApiHelper.getBaseUrl();
String requestUrl = baseUrl + "getDataSantri?" + key + "=" + value;
Log.d("PEL_REQ_URL", "URL: " + requestUrl);
JsonObjectRequest request = new JsonObjectRequest(Request.Method.GET, requestUrl, null,
response -> {
try {
if (response.getBoolean("status")) {
pelanggaranList.clear();
// Ambil objek "data"
JSONObject dataObject = response.getJSONObject("data");
// Ambil array "pelanggaran_santri" dari dalam "data"
JSONArray pelanggaranArray = dataObject.getJSONArray("pelanggaran_santri");
for (int i = 0; i < pelanggaranArray.length(); i++) {
JSONObject pelanggaran = pelanggaranArray.getJSONObject(i);
String nama = pelanggaran.getString("nama_santri");
String namaPelanggaran = pelanggaran.optString("pelanggaran", "-");
String tanggal = pelanggaran.optString("tanggal", "-");
String sanksi = pelanggaran.optString("sanksi", "-");
String keterangan = pelanggaran.optString("keterangan", "-");
Pelanggaran p = new Pelanggaran(nama, namaPelanggaran, tanggal, sanksi, keterangan);
pelanggaranList.add(p);
}
adapter.notifyDataSetChanged();
} else {
Toast.makeText(this, "Data tidak ditemukan", Toast.LENGTH_SHORT).show();
}
} catch (JSONException e) {
e.printStackTrace();
Toast.makeText(this, "Gagal parsing data", Toast.LENGTH_SHORT).show();
}
},
error -> Toast.makeText(this, "Gagal ambil data: " + error.getMessage(), Toast.LENGTH_SHORT).show()
);
RequestQueue queue = Volley.newRequestQueue(this);
queue.add(request);
}
}

View File

@ -0,0 +1,63 @@
package com.nurulwafa.nufakuproject;
import android.os.Bundle;
import android.widget.TextView;
import android.widget.Toast;
import androidx.appcompat.app.AppCompatActivity;
import com.android.volley.Request;
import com.android.volley.RequestQueue;
import com.android.volley.toolbox.JsonObjectRequest;
import com.android.volley.toolbox.Volley;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
public class PonpesActivity extends AppCompatActivity {
private TextView tvSejarah;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_sejarah);
tvSejarah = findViewById(R.id.tvSejarah);
getSejarah(); // langsung ambil data sejarah
}
private void getSejarah() {
String baseUrl = ApiHelper.getBaseUrl();
String requestUrl = baseUrl + "getSejarah"; // Sesuaikan dengan controller kamu
JsonObjectRequest request = new JsonObjectRequest(Request.Method.GET, requestUrl, null,
response -> {
try {
if (response.getBoolean("status")) {
JSONArray sejarahArray = response.getJSONArray("data");
StringBuilder sejarahGabungan = new StringBuilder();
for (int i = 0; i < sejarahArray.length(); i++) {
JSONObject sejarahItem = sejarahArray.getJSONObject(i);
String isi = sejarahItem.getString("sejarah");
sejarahGabungan.append(isi).append("\n\n");
}
tvSejarah.setText(sejarahGabungan.toString());
} else {
Toast.makeText(this, "Data sejarah tidak ditemukan", Toast.LENGTH_SHORT).show();
}
} catch (JSONException e) {
e.printStackTrace();
Toast.makeText(this, "Gagal parsing data", Toast.LENGTH_SHORT).show();
}
},
error -> Toast.makeText(this, "Gagal ambil data: " + error.getMessage(), Toast.LENGTH_SHORT).show()
);
RequestQueue queue = Volley.newRequestQueue(this);
queue.add(request);
}
}

View File

@ -0,0 +1,43 @@
package com.nurulwafa.nufakuproject;
public class Prestasi {
private String namaSantri;
private String prestasi;
private String agenda;
private String perlombaan;
private String tanggal;
private String buktiPrestasi;
public Prestasi(String namaSantri, String prestasi, String agenda, String perlombaan, String tanggal, String buktiPrestasi) {
this.namaSantri = namaSantri;
this.prestasi = prestasi;
this.agenda = agenda;
this.perlombaan = perlombaan;
this.tanggal = tanggal;
this.buktiPrestasi = buktiPrestasi;
}
public String getNamaSantri() {
return namaSantri;
}
public String getPrestasi() {
return prestasi;
}
public String getAgenda() {
return agenda;
}
public String getPerlombaan() {
return perlombaan;
}
public String getTanggal() {
return tanggal;
}
public String getBuktiPrestasi() {
return buktiPrestasi;
}
}

View File

@ -0,0 +1,113 @@
package com.nurulwafa.nufakuproject;
import android.content.ActivityNotFoundException;
import android.content.Intent;
import android.graphics.Color;
import android.graphics.Paint;
import android.net.Uri;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import android.widget.Toast;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import java.util.List;
public class PrestasiAdapter extends RecyclerView.Adapter<PrestasiAdapter.PrestasiViewHolder> {
private final List<Prestasi> prestasiList;
public PrestasiAdapter(List<Prestasi> prestasiList) {
this.prestasiList = prestasiList;
}
@NonNull
@Override
public PrestasiViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
View v = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_prestasi, parent, false);
return new PrestasiViewHolder(v);
}
@Override
public void onBindViewHolder(@NonNull PrestasiViewHolder holder, int position) {
Prestasi prestasi = prestasiList.get(position);
holder.tvNamaSantri.setText(prestasi.getNamaSantri());
holder.tvPrestasi.setText("Prestasi: " + prestasi.getPrestasi());
holder.tvAgenda.setText("Agenda: " + prestasi.getAgenda());
holder.tvPerlombaan.setText("Perlombaan: " + prestasi.getPerlombaan());
holder.tvTanggal.setText("Tanggal: " + prestasi.getTanggal());
String buktiUrl = prestasi.getBuktiPrestasi();
if (buktiUrl != null && !buktiUrl.isEmpty()) {
holder.tvBuktiPrestasi.setText("Lihat Bukti Prestasi");
holder.tvBuktiPrestasi.setTextColor(Color.BLUE);
holder.tvBuktiPrestasi.setPaintFlags(holder.tvBuktiPrestasi.getPaintFlags() | Paint.UNDERLINE_TEXT_FLAG);
holder.tvBuktiPrestasi.setOnClickListener(v -> {
try {
String fileId = "";
if (buktiUrl.contains("/d/")) {
String[] parts = buktiUrl.split("/d/");
if (parts.length > 1) {
fileId = parts[1].split("/")[0];
}
} else if (buktiUrl.contains("id=")) {
Uri uri = Uri.parse(buktiUrl);
fileId = uri.getQueryParameter("id");
}
if (fileId != null && !fileId.isEmpty()) {
// Pakai format view langsung, bukan uc?export
String directLink = "https://drive.google.com/file/d/" + fileId + "/view";
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(directLink));
intent.setPackage("com.android.chrome");
try {
v.getContext().startActivity(intent);
} catch (ActivityNotFoundException e) {
intent.setPackage(null); // fallback ke browser default
v.getContext().startActivity(intent);
}
} else {
Toast.makeText(v.getContext(), "Link file tidak valid", Toast.LENGTH_SHORT).show();
}
} catch (Exception e) {
Toast.makeText(v.getContext(), "Gagal membuka link", Toast.LENGTH_SHORT).show();
e.printStackTrace();
}
});
} else {
holder.tvBuktiPrestasi.setText("Tidak Ada Bukti");
holder.tvBuktiPrestasi.setTextColor(Color.GRAY);
holder.tvBuktiPrestasi.setPaintFlags(0);
holder.tvBuktiPrestasi.setOnClickListener(null); // tidak ada aksi
}
}
@Override
public int getItemCount() {
return prestasiList.size();
}
static class PrestasiViewHolder extends RecyclerView.ViewHolder {
TextView tvNamaSantri, tvPrestasi, tvAgenda, tvPerlombaan, tvTanggal, tvBuktiPrestasi;
public PrestasiViewHolder(@NonNull View itemView) {
super(itemView);
tvNamaSantri = itemView.findViewById(R.id.tvNamaSantri);
tvPrestasi = itemView.findViewById(R.id.tvPrestasi);
tvAgenda = itemView.findViewById(R.id.tvAgenda);
tvPerlombaan = itemView.findViewById(R.id.tvPerlombaan);
tvTanggal = itemView.findViewById(R.id.tvTanggal);
tvBuktiPrestasi = itemView.findViewById(R.id.tvBuktiPrestasi);
}
}
}

View File

@ -0,0 +1,95 @@
package com.nurulwafa.nufakuproject;
import android.os.Bundle;
import android.widget.Toast;
import androidx.appcompat.app.AppCompatActivity;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.android.volley.Request;
import com.android.volley.RequestQueue;
import com.android.volley.toolbox.JsonObjectRequest;
import com.android.volley.toolbox.Volley;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import java.util.ArrayList;
public class PrestasiSantriActivity extends AppCompatActivity {
private RecyclerView rvPrestasi;
private PrestasiAdapter adapter;
private ArrayList<Prestasi> prestasiList;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_prestasi_santri);
rvPrestasi = findViewById(R.id.rvPrestasi);
rvPrestasi.setLayoutManager(new LinearLayoutManager(this));
prestasiList = new ArrayList<>();
adapter = new PrestasiAdapter(prestasiList);
rvPrestasi.setAdapter(adapter);
String loginKey = getIntent().getStringExtra("login_key");
String loginValue = getIntent().getStringExtra("login_value");
if (loginKey != null && loginValue != null) {
getDataSantri(loginKey, loginValue);
} else {
Toast.makeText(this, "Data login tidak ditemukan", Toast.LENGTH_SHORT).show();
}
}
private void getDataSantri(String key, String value) {
String baseUrl = ApiHelper.getBaseUrl();
String requestUrl = baseUrl + "getDataSantri?" + key + "=" + value;
JsonObjectRequest request = new JsonObjectRequest(Request.Method.GET, requestUrl, null,
response -> {
try {
if (response.getBoolean("status")) {
prestasiList.clear();
// Ambil objek "data"
JSONObject dataObject = response.getJSONObject("data");
// Ambil array "prestasi_santri" dari dalam "data"
JSONArray prestasiArray = dataObject.getJSONArray("prestasi_santri");
for (int i = 0; i < prestasiArray.length(); i++) {
JSONObject prestasi = prestasiArray.getJSONObject(i);
String nama = prestasi.getString("nama_santri");
String namaPrestasi = prestasi.optString("prestasi", "-");
String agenda = prestasi.optString("agenda", "-");
String perlombaan = prestasi.optString("perlombaan", "-");
String tanggal = prestasi.optString("tanggal", "-");
String buktiPrestasi = prestasi.optString("bukti_prestasi", "-");
Prestasi p = new Prestasi(nama, namaPrestasi, agenda, perlombaan, tanggal, buktiPrestasi);
prestasiList.add(p);
}
adapter.notifyDataSetChanged();
} else {
Toast.makeText(this, "Data tidak ditemukan", Toast.LENGTH_SHORT).show();
}
} catch (JSONException e) {
e.printStackTrace();
Toast.makeText(this, "Gagal parsing data", Toast.LENGTH_SHORT).show();
}
},
error -> Toast.makeText(this, "Gagal ambil data: " + error.getMessage(), Toast.LENGTH_SHORT).show()
);
RequestQueue queue = Volley.newRequestQueue(this);
queue.add(request);
}
}

View File

@ -0,0 +1,55 @@
package com.nurulwafa.nufakuproject;
import android.content.Context;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
public class RegisterDBHelper extends SQLiteOpenHelper {
private static final String DATABASE_NAME = "UserDatabase.db";
private static final int DATABASE_VERSION = 1;
public RegisterDBHelper(Context context) {
super(context, DATABASE_NAME, null, DATABASE_VERSION);
}
@Override
public void onCreate(SQLiteDatabase db) {
// TIDAK perlu membuat tabel di sini, karena kamu pakai tb_santri dari awal (imported / prepopulated)
}
@Override
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
// Kosongkan juga kalau kamu nggak perlu upgrade schema
}
// Mengecek login dari tb_santri berdasarkan email/nis dan password
public boolean checkUser(String emailOrNis, String password) {
SQLiteDatabase db = this.getReadableDatabase();
String query = "SELECT * FROM tb_santri WHERE (email = ? OR nis = ?) AND password = ?";
Cursor cursor = db.rawQuery(query, new String[]{emailOrNis, emailOrNis, password});
boolean result = cursor.moveToFirst();
cursor.close();
db.close();
return result;
}
// Ambil id_santri setelah login berhasil
public String getUserId(String emailOrNis) {
SQLiteDatabase db = this.getReadableDatabase();
String query = "SELECT id_santri FROM tb_santri WHERE email = ? OR nis = ?";
Cursor cursor = db.rawQuery(query, new String[]{emailOrNis, emailOrNis});
if (cursor.moveToFirst()) {
String id = cursor.getString(0);
cursor.close();
return id;
}
cursor.close();
return null;
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 166 KiB

View File

@ -0,0 +1,5 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="#E0E0E0" />
<corners android:radius="16dp"/>
</shape>

View File

@ -0,0 +1,5 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@color/green" />
<corners android:radius="16dp"/>
</shape>

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

View File

@ -0,0 +1,4 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">
<solid android:color="#FFFFFF" /> <!-- Warna putih -->
</shape>

View File

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<!-- Background putih -->
<solid android:color="@color/white" />
<!-- Garis pinggir hijau -->
<stroke
android:width="3dp"
android:color="@color/green" />
<!-- Sudut melengkung -->
<corners android:radius="20dp" />
</shape>

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<stroke
android:width="3dp"
android:color="@color/green" />
<corners android:radius="20dp" />
</shape>

Binary file not shown.

After

Width:  |  Height:  |  Size: 701 KiB

View File

@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="#000000"
android:pathData="M10,17l5,-5 -5,-5v10z"/>
</vector>

View File

@ -0,0 +1,5 @@
<vector android:autoMirrored="true" android:height="24dp"
android:tint="#225417" android:viewportHeight="24"
android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="@android:color/white" android:pathData="M20,2L4,2c-1.1,0 -1.99,0.9 -1.99,2L2,22l4,-4h14c1.1,0 2,-0.9 2,-2L22,4c0,-1.1 -0.9,-2 -2,-2zM6,9h12v2L6,11L6,9zM14,14L6,14v-2h8v2zM18,8L6,8L6,6h12v2z"/>
</vector>

Binary file not shown.

After

Width:  |  Height:  |  Size: 719 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 500 B

View File

@ -0,0 +1,170 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<path
android:fillColor="#3DDC84"
android:pathData="M0,0h108v108h-108z" />
<path
android:fillColor="#00000000"
android:pathData="M9,0L9,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,0L19,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M29,0L29,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M39,0L39,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M49,0L49,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M59,0L59,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M69,0L69,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M79,0L79,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M89,0L89,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M99,0L99,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,9L108,9"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,19L108,19"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,29L108,29"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,39L108,39"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,49L108,49"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,59L108,59"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,69L108,69"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,79L108,79"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,89L108,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,99L108,99"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,29L89,29"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,39L89,39"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,49L89,49"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,59L89,59"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,69L89,69"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,79L89,79"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M29,19L29,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M39,19L39,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M49,19L49,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M59,19L59,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M69,19L69,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M79,19L79,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
</vector>

View File

@ -0,0 +1,30 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<path android:pathData="M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z">
<aapt:attr name="android:fillColor">
<gradient
android:endX="85.84757"
android:endY="92.4963"
android:startX="42.9492"
android:startY="49.59793"
android:type="linear">
<item
android:color="#44000000"
android:offset="0.0" />
<item
android:color="#00000000"
android:offset="1.0" />
</gradient>
</aapt:attr>
</path>
<path
android:fillColor="#FFFFFF"
android:fillType="nonZero"
android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z"
android:strokeWidth="1"
android:strokeColor="#00000000" />
</vector>

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 948 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 138 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 208 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

View File

@ -0,0 +1,39 @@
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/green"
android:padding="16dp">
<!-- Judul -->
<TextView
android:id="@+id/homeTitle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="Berita Terkini"
android:textAlignment="center"
android:textColor="@color/green"
android:textSize="20sp"
android:textStyle="bold"
android:layout_marginTop="20dp"
android:layout_marginBottom="16dp"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
<!-- RecyclerView untuk daftar berita -->
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rvBerita"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginTop="20dp"
app:layout_constraintTop_toBottomOf="@id/homeTitle"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:padding="4dp"
android:clipToPadding="false"
android:scrollbars="vertical" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -0,0 +1,55 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/green">
<!-- Daftar Chat -->
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerChat"
android:layout_width="0dp"
android:layout_height="0dp"
android:padding="8dp"
android:clipToPadding="false"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toTopOf="@+id/layoutInput"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
<!-- Input Chat -->
<LinearLayout
android:id="@+id/layoutInput"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:padding="8dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent">
<EditText
android:id="@+id/inputMessage"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:minHeight="48dp"
android:layout_weight="1"
android:hint="Ketik pesan..."
android:background="@drawable/custom_editcard"
android:padding="10dp"
android:layout_marginEnd="5dp"/>
<ImageButton
android:id="@+id/btnSend"
android:layout_width="48dp"
android:layout_height="48dp"
android:src="@drawable/send2"
android:background="@drawable/circle_white"
android:scaleType="centerInside"
android:padding="8dp"
android:contentDescription="Kirim"
/>
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -0,0 +1,191 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/green"
android:padding="16dp">
<!-- Judul -->
<TextView
android:id="@+id/homeTitle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="Data Diri Santri"
android:textAlignment="center"
android:textColor="@color/green"
android:textSize="20sp"
android:textStyle="bold"
android:layout_marginTop="20dp"
android:layout_marginBottom="16dp"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
<!-- ScrollView untuk konten -->
<ScrollView
android:id="@+id/scrollArea"
android:layout_width="0dp"
android:layout_height="0dp"
android:fillViewport="true"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/homeTitle"
app:layout_constraintVertical_bias="1.0">
<!-- Konten di dalam ScrollView -->
<LinearLayout
android:id="@+id/layoutKonten"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="1dp"
android:layout_marginBottom="32dp"
android:orientation="vertical"
android:padding="16dp">
<!-- Reusable item -->
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="NIS"
android:textStyle="bold"/>
<TextView
android:id="@+id/tvNIS"
style="@style/CustomBox"
android:textColor="@color/black"
android:textSize="18sp"
android:textStyle="normal"
android:layout_marginTop="3dp"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Nama Santri"
android:textStyle="bold"/>
<TextView
android:id="@+id/tvNamaSantri"
style="@style/CustomBox"
android:textColor="@color/black"
android:textSize="18sp"
android:textStyle="normal"
android:layout_marginTop="3dp"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Kelas Diniyah"
android:textStyle="bold"/>
<TextView
android:id="@+id/tvKelasDiniyah"
style="@style/CustomBox"
android:textColor="@color/black"
android:textSize="18sp"
android:textStyle="normal"
android:layout_marginTop="3dp"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Status Santri"
android:textStyle="bold"/>
<TextView
android:id="@+id/tvStatusSantri"
style="@style/CustomBox"
android:textColor="@color/black"
android:textSize="18sp"
android:textStyle="normal"
android:layout_marginTop="3dp"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Tahun Masuk"
android:textStyle="bold"/>
<TextView
android:id="@+id/tvTahunMasuk"
style="@style/CustomBox"
android:textColor="@color/black"
android:textSize="18sp"
android:textStyle="normal"
android:layout_marginTop="3dp"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Tahun Keluar"
android:textStyle="bold"/>
<TextView
android:id="@+id/tvTahunKeluar"
style="@style/CustomBox"
android:textColor="@color/black"
android:textSize="18sp"
android:textStyle="normal"
android:layout_marginTop="3dp"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Keterangan Keluar"
android:textStyle="bold"/>
<TextView
android:id="@+id/tvKeteranganKeluar"
style="@style/CustomBox"
android:textColor="@color/black"
android:textSize="18sp"
android:textStyle="normal"
android:layout_marginTop="3dp"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Tempat Lahir"
android:textStyle="bold"/>
<TextView
android:id="@+id/tvTempatLahir"
style="@style/CustomBox"
android:textColor="@color/black"
android:textSize="18sp"
android:textStyle="normal"
android:layout_marginTop="3dp"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Tanggal Lahir"
android:textStyle="bold"/>
<TextView
android:id="@+id/tvTanggalLahir"
style="@style/CustomBox"
android:textColor="@color/black"
android:textSize="18sp"
android:textStyle="normal"
android:layout_marginTop="3dp"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Alamat"
android:textStyle="bold"/>
<TextView
android:id="@+id/tvAlamatSantri"
style="@style/CustomBox"
android:textColor="@color/black"
android:textSize="18sp"
android:textStyle="normal"
android:layout_marginTop="3dp"/>
</LinearLayout>
</ScrollView>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -0,0 +1,175 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/green"
android:padding="16dp">
<!-- Judul -->
<TextView
android:id="@+id/homeTitle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="Data Diri Wali Santri"
android:textAlignment="center"
android:textColor="@color/green"
android:textSize="20sp"
android:textStyle="bold"
android:layout_marginTop="20dp"
android:layout_marginBottom="16dp"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
<!-- ScrollView untuk konten -->
<ScrollView
android:id="@+id/scrollArea"
android:layout_width="0dp"
android:layout_height="0dp"
android:fillViewport="true"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/homeTitle"
app:layout_constraintVertical_bias="1.0">
<!-- Konten di dalam ScrollView -->
<LinearLayout
android:id="@+id/layoutKonten"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="1dp"
android:layout_marginBottom="32dp"
android:orientation="vertical"
android:padding="16dp">
<!-- Reusable item -->
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Email"
android:textStyle="bold"/>
<TextView
android:id="@+id/tvEmail"
style="@style/CustomBox"
android:textColor="@color/black"
android:textSize="18sp"
android:textStyle="normal"
android:layout_marginTop="3dp"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Password"
android:textStyle="bold"/>
<TextView
android:id="@+id/tvPassword"
style="@style/CustomBox"
android:textColor="@color/black"
android:textSize="18sp"
android:textStyle="normal"
android:layout_marginTop="3dp"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Nama Wali Santri"
android:textStyle="bold"/>
<TextView
android:id="@+id/tvNamaWaliSantri"
style="@style/CustomBox"
android:textColor="@color/black"
android:textSize="18sp"
android:textStyle="normal"
android:layout_marginTop="3dp"/>
<!-- <TextView-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:text="No KTP"-->
<!-- android:textStyle="bold"/>-->
<!-- <TextView-->
<!-- android:id="@+id/tvNoKTP"-->
<!-- style="@style/CustomBox"-->
<!-- android:textColor="@color/black"-->
<!-- android:textSize="18sp"-->
<!-- android:textStyle="normal"-->
<!-- android:layout_marginTop="3dp" />-->
<!-- <TextView-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:text="Tempat Lahir"-->
<!-- android:textStyle="bold"/>-->
<!-- <TextView-->
<!-- android:id="@+id/tvTempatLahir"-->
<!-- style="@style/CustomBox"-->
<!-- android:textColor="@color/black"-->
<!-- android:textSize="18sp"-->
<!-- android:textStyle="normal"-->
<!-- android:layout_marginTop="3dp" />-->
<!-- <TextView-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:text="Tanggal Lahir"-->
<!-- android:textStyle="bold"/>-->
<!-- <TextView-->
<!-- android:id="@+id/tvTanggalLahir"-->
<!-- style="@style/CustomBox"-->
<!-- android:textColor="@color/black"-->
<!-- android:textSize="18sp"-->
<!-- android:textStyle="normal"-->
<!-- android:layout_marginTop="3dp" />-->
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Alamat"
android:textStyle="bold"/>
<TextView
android:id="@+id/tvAlamat"
style="@style/CustomBox"
android:textColor="@color/black"
android:textSize="18sp"
android:textStyle="normal"
android:layout_marginTop="3dp" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="No Telepon"
android:textStyle="bold"/>
<TextView
android:id="@+id/tvNoTelepon"
style="@style/CustomBox"
android:textColor="@color/black"
android:textSize="18sp"
android:textStyle="normal" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Pekerjaan"
android:textStyle="bold"/>
<TextView
android:id="@+id/tvPekerjaan"
style="@style/CustomBox"
android:textColor="@color/black"
android:textSize="18sp"
android:textStyle="normal"
android:layout_marginTop="3dp" />
</LinearLayout>
</ScrollView>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -0,0 +1,80 @@
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/green"
android:padding="16dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<!-- Tulisan Berita Terkini -->
<TextView
android:id="@+id/tvHeader"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Berita Terkini"
android:textSize="20sp"
android:textStyle="bold"
android:textColor="@color/green"
android:layout_gravity="center_horizontal"
android:layout_marginTop="20dp"
android:paddingBottom="16dp" />
<!-- CardView Berita -->
<androidx.cardview.widget.CardView
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:layout_margin="0dp"
android:elevation="0dp"
app:cardElevation="0dp"
app:cardUseCompatPadding="false"
app:cardCornerRadius="0dp"
app:cardBackgroundColor="@android:color/transparent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="0dp"
android:layout_marginTop="20dp">
<TextView
android:id="@+id/tvJudul"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="20sp"
android:textStyle="bold"
android:textColor="@android:color/black"
android:paddingBottom="8dp" />
<TextView
android:id="@+id/tvTanggal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@android:color/darker_gray"
android:layout_marginBottom="8dp" />
<ImageView
android:id="@+id/imgBerita"
android:layout_width="match_parent"
android:layout_height="250dp"
android:scaleType="centerCrop"
android:layout_marginBottom="8dp" />
<TextView
android:id="@+id/tvDeskripsi"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="16sp"
android:textColor="@android:color/black" />
</LinearLayout>
</androidx.cardview.widget.CardView>
</LinearLayout>
</ScrollView>

View File

@ -0,0 +1,36 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/green"
android:padding="16dp">
<TextView
android:id="@+id/homeTitle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="Kegiatan Santri"
android:textAlignment="center"
android:textColor="@color/green"
android:textSize="20sp"
android:textStyle="bold"
android:layout_marginTop="20dp"
android:layout_marginBottom="16dp"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rvKegiatanSantri"
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintTop_toBottomOf="@id/homeTitle"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:clipToPadding="false"
android:paddingBottom="16dp"
android:layout_marginTop="20dp"/>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -0,0 +1,473 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".HomeActivity"
android:background="@drawable/green">
<TextView
android:id="@+id/homeTitle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="@string/app_title"
android:textAlignment="center"
android:textColor="@color/green"
android:textSize="20sp"
android:textStyle="bold"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:layout_marginTop="130dp" />
<GridLayout
android:id="@+id/gridMenu"
android:layout_width="350dp"
android:layout_height="wrap_content"
android:columnCount="3"
android:clipToPadding="false"
android:clipChildren="false"
android:paddingBottom="0dp"
android:layout_marginBottom="0dp"
android:useDefaultMargins="true"
android:padding="4dp"
android:layout_marginTop="20dp"
app:layout_constraintTop_toBottomOf="@id/homeTitle"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent">
<!-- Card Ponpes -->
<androidx.cardview.widget.CardView
android:id="@+id/cardPonpes"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_rowWeight="1"
android:layout_columnWeight="1"
android:layout_margin="4dp"
app:cardBackgroundColor="@android:color/transparent"
app:cardCornerRadius="0dp"
app:cardElevation="0dp"
app:cardPreventCornerOverlap="false"
app:cardUseCompatPadding="false">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="126dp"
android:background="@drawable/custom_edittext"
android:gravity="center"
android:orientation="vertical"
android:padding="8dp">
<FrameLayout
android:layout_width="80dp"
android:layout_height="80dp"
android:layout_gravity="center_horizontal">
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:contentDescription="@string/label_ponpes"
android:src="@drawable/ponpes" />
</FrameLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:text="@string/label_ponpes"
android:textColor="@android:color/black"
android:textSize="12sp"
android:textStyle="bold" />
</LinearLayout>
</androidx.cardview.widget.CardView>
<!-- Card Santri -->
<androidx.cardview.widget.CardView
android:id="@+id/cardSantri"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_rowWeight="1"
android:layout_columnWeight="1"
app:cardCornerRadius="20dp"
app:cardElevation="0dp"
app:cardUseCompatPadding="false"
app:cardPreventCornerOverlap="false"
app:cardBackgroundColor="@android:color/transparent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="126dp"
android:background="@drawable/custom_edittext"
android:gravity="center"
android:orientation="vertical"
android:padding="8dp">
<FrameLayout
android:layout_width="80dp"
android:layout_height="80dp"
android:layout_gravity="center_horizontal">
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:contentDescription="@string/label_data_santri"
android:src="@drawable/santri" />
</FrameLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:text="@string/label_data_santri"
android:textColor="@android:color/black"
android:textSize="12sp"
android:textStyle="bold" />
</LinearLayout>
</androidx.cardview.widget.CardView>
<!-- Card Wali Santri -->
<androidx.cardview.widget.CardView
android:id="@+id/cardWaliSantri"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_rowWeight="1"
android:layout_columnWeight="1"
app:cardCornerRadius="20dp"
app:cardElevation="0dp"
app:cardUseCompatPadding="false"
app:cardPreventCornerOverlap="false"
app:cardBackgroundColor="@android:color/transparent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:gravity="center"
android:background="@drawable/custom_edittext"
android:padding="8dp">
<FrameLayout
android:layout_width="80dp"
android:layout_height="80dp"
android:layout_gravity="center_horizontal">
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:src="@drawable/wali"
android:contentDescription="@string/label_data_wali"/>
</FrameLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:text="@string/label_data_wali"
android:textColor="@android:color/black"
android:textStyle="bold"
android:textSize="12sp" />
</LinearLayout>
</androidx.cardview.widget.CardView>
<!-- Card Kegiatan -->
<androidx.cardview.widget.CardView
android:id="@+id/cardKegiatan"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_rowWeight="1"
android:layout_columnWeight="1"
app:cardCornerRadius="20dp"
app:cardElevation="0dp"
app:cardUseCompatPadding="false"
app:cardPreventCornerOverlap="false"
app:cardBackgroundColor="@android:color/transparent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:gravity="center"
android:background="@drawable/custom_edittext"
android:padding="8dp">
<FrameLayout
android:layout_width="80dp"
android:layout_height="80dp"
android:layout_gravity="center_horizontal">
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:src="@drawable/kegiatan"
android:contentDescription="@string/label_kegiatan"/>
</FrameLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="32dp"
android:gravity="center"
android:text="@string/label_kegiatan"
android:textColor="@android:color/black"
android:textSize="12sp"
android:textStyle="bold" />
</LinearLayout>
</androidx.cardview.widget.CardView>
<!-- Card Prestasi -->
<androidx.cardview.widget.CardView
android:id="@+id/cardPrestasi"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_rowWeight="1"
android:layout_columnWeight="1"
app:cardCornerRadius="20dp"
app:cardElevation="0dp"
app:cardUseCompatPadding="false"
app:cardPreventCornerOverlap="false"
app:cardBackgroundColor="@android:color/transparent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="128dp"
android:background="@drawable/custom_edittext"
android:gravity="center"
android:orientation="vertical"
android:padding="8dp">
<FrameLayout
android:layout_width="80dp"
android:layout_height="80dp"
android:layout_gravity="center_horizontal">
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:contentDescription="@string/label_prestasi"
android:src="@drawable/prestasi" />
</FrameLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:text="@string/label_prestasi"
android:textColor="@android:color/black"
android:textSize="12sp"
android:textStyle="bold" />
</LinearLayout>
</androidx.cardview.widget.CardView>
<!-- Card Pelanggaran -->
<androidx.cardview.widget.CardView
android:id="@+id/cardPelanggaran"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_rowWeight="1"
android:layout_columnWeight="1"
app:cardCornerRadius="20dp"
app:cardElevation="0dp"
app:cardUseCompatPadding="false"
app:cardPreventCornerOverlap="false"
app:cardBackgroundColor="@android:color/transparent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:gravity="center"
android:background="@drawable/custom_edittext"
android:padding="8dp">
<FrameLayout
android:layout_width="75dp"
android:layout_height="80dp"
android:layout_gravity="center_horizontal">
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:src="@drawable/pelanggaran"
android:contentDescription="@string/label_pelanggaran"/>
</FrameLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:text="@string/label_pelanggaran"
android:textColor="@android:color/black"
android:textStyle="bold"
android:textSize="12sp" />
</LinearLayout>
</androidx.cardview.widget.CardView>
<!-- Card SPP -->
<androidx.cardview.widget.CardView
android:id="@+id/cardSPP"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_rowWeight="1"
android:layout_columnWeight="1"
app:cardCornerRadius="20dp"
app:cardElevation="0dp"
app:cardUseCompatPadding="false"
app:cardPreventCornerOverlap="false"
app:cardBackgroundColor="@android:color/transparent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/custom_edittext"
android:gravity="center"
android:orientation="vertical"
android:padding="8dp">
<FrameLayout
android:layout_width="80dp"
android:layout_height="80dp"
android:layout_gravity="center_horizontal">
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:contentDescription="@string/label_spp"
android:src="@drawable/informasispp" />
</FrameLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:text="@string/label_spp"
android:textColor="@android:color/black"
android:textSize="12sp"
android:textStyle="bold" />
</LinearLayout>
</androidx.cardview.widget.CardView>
<!-- Card Berita -->
<androidx.cardview.widget.CardView
android:id="@+id/cardBerita"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_rowWeight="1"
android:layout_columnWeight="1"
app:cardCornerRadius="20dp"
app:cardElevation="0dp"
app:cardUseCompatPadding="false"
app:cardPreventCornerOverlap="false"
app:cardBackgroundColor="@android:color/transparent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/custom_edittext"
android:gravity="center"
android:orientation="vertical"
android:padding="8dp">
<FrameLayout
android:layout_width="80dp"
android:layout_height="80dp"
android:layout_gravity="center_horizontal">
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:contentDescription="@string/label_berita"
android:src="@drawable/berita" />
</FrameLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:text="@string/label_berita"
android:textColor="@android:color/black"
android:textSize="12sp"
android:textStyle="bold" />
</LinearLayout>
</androidx.cardview.widget.CardView>
<!-- Card Kesehatan -->
<androidx.cardview.widget.CardView
android:id="@+id/cardKesehatan"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_rowWeight="1"
android:layout_columnWeight="1"
app:cardCornerRadius="20dp"
app:cardElevation="0dp"
app:cardUseCompatPadding="false"
app:cardPreventCornerOverlap="false"
app:cardBackgroundColor="@android:color/transparent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:gravity="center"
android:background="@drawable/custom_edittext"
android:padding="8dp">
<FrameLayout
android:layout_width="80dp"
android:layout_height="80dp"
android:layout_gravity="center_horizontal">
<ImageView
android:id="@+id/imgKesehatan"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:src="@drawable/sehat"
android:contentDescription="@string/label_logout"/>
</FrameLayout>
<TextView
android:id="@+id/txtKesehatan"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:text="Dalam Kondisi Sehat"
android:textColor="@android:color/black"
android:textStyle="bold"
android:textSize="12sp" />
</LinearLayout>
</androidx.cardview.widget.CardView>
</GridLayout>
<ImageButton
android:id="@+id/btnChat"
android:layout_width="72dp"
android:layout_height="72dp"
android:src="@drawable/chat2"
android:background="@drawable/circle_white"
android:scaleType="centerInside"
android:contentDescription="Chat"
android:elevation="16dp"
android:padding="12dp"
android:layout_margin="16dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
<ImageButton
android:id="@+id/btnLogout"
android:layout_width="72dp"
android:layout_height="72dp"
android:src="@drawable/logout"
android:background="@drawable/circle_white"
android:scaleType="centerInside"
android:contentDescription="Logout"
android:elevation="16dp"
android:padding="5dp"
android:layout_marginStart="16dp"
android:layout_marginBottom="16dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintBottom_toBottomOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -0,0 +1,36 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/green"
android:padding="16dp">
<TextView
android:id="@+id/homeTitle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="SPP Santri"
android:textAlignment="center"
android:textColor="@color/green"
android:textSize="20sp"
android:textStyle="bold"
android:layout_marginTop="20dp"
android:layout_marginBottom="16dp"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rvInformasiSPP"
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintTop_toBottomOf="@id/homeTitle"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:clipToPadding="false"
android:paddingBottom="16dp"
android:layout_marginTop="20dp"/>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -0,0 +1,48 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/green"
android:padding="16dp">
<!-- Judul -->
<TextView
android:id="@+id/homeTitle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="Jadwal Kegiatan Santri"
android:textAlignment="center"
android:textColor="@color/green"
android:textSize="20sp"
android:textStyle="bold"
android:layout_marginTop="20dp"
android:layout_marginBottom="16dp"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
<ScrollView
android:id="@+id/scrollArea"
android:layout_width="0dp"
android:layout_height="0dp"
android:fillViewport="true"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/homeTitle">
<LinearLayout
android:id="@+id/layoutKonten"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="8dp"
android:layout_marginTop="20dp">
<!-- CATATAN: Semua item dari API akan ditambahkan dari Java secara dinamis ke sini -->
</LinearLayout>
</ScrollView>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -0,0 +1,135 @@
<?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"
android:background="@drawable/green"
android:gravity="center"
android:orientation="vertical"
tools:context=".MainActivity">
<androidx.cardview.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="30dp"
android:background="@drawable/custom_edittext"
app:cardCornerRadius="30dp"
app:cardElevation="20dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:orientation="vertical"
android:padding="24dp">
<TextView
android:id="@+id/welcome"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:text="@string/welcome_text"
android:textAlignment="center"
android:textColor="@color/green"
android:textSize="25sp"
android:textStyle="bold" />
<FrameLayout
android:layout_width="164dp"
android:layout_height="135dp"
android:layout_gravity="center_horizontal"
android:background="#FFFFFF">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:src="@drawable/logo"
android:contentDescription="@string/logo_description"/>
</FrameLayout>
<TextView
android:id="@+id/registerText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:text="@string/login_instruction"
android:textAlignment="center"
android:textColor="@color/green"
android:textSize="20sp"
android:textStyle="bold" />
<EditText
android:id="@+id/email"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_marginTop="20dp"
android:background="@drawable/custom_edittext"
android:hint="@string/username_hint"
android:inputType="text"
android:autofillHints="email"
android:padding="8dp"
android:textColor="@color/black"
android:textColorHighlight="@color/cardview_dark_background" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
>
<EditText
android:id="@+id/password"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_marginTop="20dp"
android:autofillHints="password"
android:background="@drawable/custom_edittext"
android:hint="@string/password_hint"
android:inputType="textPassword"
android:padding="8dp"
android:textColor="@color/black"
android:textColorHighlight="@color/cardview_dark_background" />
<ImageView
android:id="@+id/togglePasswordVisibility"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_alignParentEnd="true"
android:layout_alignBottom="@id/password"
android:layout_marginEnd="12dp"
android:layout_marginBottom="12dp"
android:src="@drawable/ic_eye_closed"
app:tint="@color/green"
android:contentDescription="Toggle Password Visibility" />
</RelativeLayout>
<Button
android:id="@+id/loginButton"
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_marginTop="30dp"
android:backgroundTint="@color/green"
android:text="@string/login_button"
android:textSize="18sp"
app:cornerRadius="20dp" />
</LinearLayout>
</androidx.cardview.widget.CardView>
<!-- <TextView-->
<!-- android:id="@+id/eText"-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="48dp"-->
<!-- android:layout_marginBottom="20dp"-->
<!-- android:clickable="true"-->
<!-- android:padding="8dp"-->
<!-- android:text="Have an account? SignIn Now"-->
<!-- android:textAlignment="center"-->
<!-- android:textColor="@color/green"-->
<!-- android:textSize="14sp" />-->
</LinearLayout>

View File

@ -0,0 +1,36 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/green"
android:padding="16dp">
<TextView
android:id="@+id/homeTitle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="Pelanggaran Santri"
android:textAlignment="center"
android:textColor="@color/green"
android:textSize="20sp"
android:textStyle="bold"
android:layout_marginTop="20dp"
android:layout_marginBottom="16dp"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rvPelanggaran"
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintTop_toBottomOf="@id/homeTitle"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:clipToPadding="false"
android:paddingBottom="16dp"
android:layout_marginTop="20dp"/>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -0,0 +1,36 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/green"
android:padding="16dp">
<TextView
android:id="@+id/homeTitle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="Prestasi Santri"
android:textAlignment="center"
android:textColor="@color/green"
android:textSize="20sp"
android:textStyle="bold"
android:layout_marginTop="20dp"
android:layout_marginBottom="16dp"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rvPrestasi"
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintTop_toBottomOf="@id/homeTitle"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:clipToPadding="false"
android:paddingBottom="16dp"
android:layout_marginTop="20dp"/>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -0,0 +1,122 @@
<?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:card_view="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/green"
android:gravity="center"
android:orientation="vertical"
tools:context=".MainActivity">
<androidx.cardview.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="30dp"
android:background="@drawable/custom_edittext"
app:cardCornerRadius="30dp"
app:cardElevation="20dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:orientation="vertical"
android:padding="24dp">
<TextView
android:id="@+id/registerText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Register"
android:textAlignment="center"
android:textColor="@color/green"
android:textSize="36sp"
android:textStyle="bold" />
<EditText
android:id="@+id/name"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_marginTop="40dp"
android:background="@drawable/custom_edittext"
android:hint="Name"
android:padding="8dp"
android:textColor="@color/black"
android:textColorHighlight="@color/cardview_dark_background" />
<EditText
android:id="@+id/username"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_marginTop="20dp"
android:background="@drawable/custom_edittext"
android:hint="Username"
android:padding="8dp"
android:textColor="@color/black"
android:textColorHighlight="@color/cardview_dark_background" />
<EditText
android:id="@+id/email"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_marginTop="20dp"
android:background="@drawable/custom_edittext"
android:hint="Email"
android:padding="8dp"
android:textColor="@color/black"
android:textColorHighlight="@color/cardview_dark_background" />
<EditText
android:id="@+id/password"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_marginTop="20dp"
android:background="@drawable/custom_edittext"
android:hint="Password"
android:inputType="textPassword"
android:padding="8dp"
android:textColor="@color/black"
android:textColorHighlight="@color/cardview_dark_background" />
<EditText
android:id="@+id/address"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_marginTop="20dp"
android:background="@drawable/custom_edittext"
android:hint="Address"
android:padding="8dp"
android:textColor="@color/black"
android:textColorHighlight="@color/cardview_dark_background" />
<Button
android:id="@+id/registerButton"
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_marginTop="30dp"
android:backgroundTint="@color/green"
android:text="Register"
android:textSize="18sp"
app:cornerRadius="20dp" />
</LinearLayout>
</androidx.cardview.widget.CardView>
<TextView
android:id="@+id/eText"
android:layout_width="wrap_content"
android:layout_height="48dp"
android:layout_marginBottom="20dp"
android:clickable="true"
android:padding="8dp"
android:text="Have an account? SignIn Now"
android:textAlignment="center"
android:textColor="@color/green"
android:textSize="14sp" />
</LinearLayout>

View File

@ -0,0 +1,66 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/green"
android:padding="16dp">
<!-- Judul -->
<TextView
android:id="@+id/homeTitle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="Sejarah Singkat Berdirinya Pondok Pesantren Nurul Wafa"
android:textAlignment="center"
android:textColor="@color/green"
android:textSize="20sp"
android:textStyle="bold"
android:layout_marginTop="20dp"
android:layout_marginBottom="16dp"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
<!-- ScrollView untuk konten -->
<ScrollView
android:id="@+id/scrollArea"
android:layout_width="0dp"
android:layout_height="0dp"
android:fillViewport="true"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/homeTitle"
app:layout_constraintVertical_bias="1.0">
<!-- Konten di dalam ScrollView -->
<LinearLayout
android:id="@+id/layoutKonten"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:layout_marginBottom="32dp"
android:orientation="vertical"
android:padding="0dp"
android:paddingLeft="16dp"
android:paddingRight="16dp" >
<!-- Reusable item -->
<TextView
android:id="@+id/tvSejarah"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="#000000"
android:textSize="16sp"
android:lineSpacingExtra="8dp"
android:padding="10dp"
android:justificationMode="inter_word"
android:textAlignment="viewStart" />
</LinearLayout>
</ScrollView>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
style="@style/CustomCard"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:padding="12dp"
android:layout_marginBottom="8dp">
<TextView
android:id="@+id/tvJudulBerita"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Judul Berita"
android:textSize="16sp"
android:textColor="@android:color/black"
android:textStyle="bold" />
<ImageView
android:id="@+id/btnDetailBerita"
android:layout_width="24dp"
android:layout_height="24dp"
android:src="@drawable/ic_arrow_right"
android:contentDescription="Lihat Detail" />
</LinearLayout>

View File

@ -0,0 +1,15 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="start"
android:padding="8dp">
<TextView
android:id="@+id/textMessageLeft"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/bg_chat_left"
android:padding="12dp"
android:textColor="@android:color/black"
android:textSize="14sp" />
</LinearLayout>

View File

@ -0,0 +1,15 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="end"
android:padding="8dp">
<TextView
android:id="@+id/textMessageRight"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/bg_chat_right"
android:padding="12dp"
android:textColor="@android:color/white"
android:textSize="14sp" />
</LinearLayout>

View File

@ -0,0 +1,83 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.cardview.widget.CardView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:card_view="http://schemas.android.com/apk/res-auto"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
card_view:cardCornerRadius="0dp"
card_view:cardElevation="0dp"
app:cardBackgroundColor="@android:color/transparent"
android:padding="12dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
style="@style/CustomCard">
<TextView
android:id="@+id/tvNamaSantri"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Nama Santri"
android:textStyle="bold"
android:textSize="16sp"
android:textColor="@android:color/black"
android:layout_marginLeft="8dp"
android:layout_marginTop="5dp" />
<TextView
android:id="@+id/tvBulan"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Bulan"
android:textSize="15sp"
android:textColor="@android:color/black"
android:layout_marginTop="4dp"
android:layout_marginLeft="8dp"/>
<TextView
android:id="@+id/tvTahun"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Tahun"
android:textSize="15sp"
android:textColor="@android:color/black"
android:layout_marginTop="2dp"
android:layout_marginLeft="8dp"/>
<TextView
android:id="@+id/tvJumlahPembayaran"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Jumlah Pembayaran"
android:textSize="15sp"
android:textColor="@android:color/black"
android:layout_marginTop="2dp"
android:layout_marginLeft="8dp"/>
<TextView
android:id="@+id/tvJatuhTempo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Jatuh Tempo"
android:textSize="15sp"
android:textColor="@android:color/black"
android:layout_marginTop="2dp"
android:layout_marginLeft="8dp"/>
<TextView
android:id="@+id/tvKeterangan"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Keterangan"
android:textSize="15sp"
android:textColor="@android:color/black"
android:layout_marginTop="2dp"
android:layout_marginLeft="8dp"
android:layout_marginBottom="5dp" />
</LinearLayout>
</androidx.cardview.widget.CardView>

View File

@ -0,0 +1,54 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.cardview.widget.CardView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:card_view="http://schemas.android.com/apk/res-auto"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
card_view:cardCornerRadius="0dp"
card_view:cardElevation="0dp"
app:cardBackgroundColor="@android:color/transparent"
android:padding="12dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
style="@style/CustomCard">
<TextView
android:id="@+id/tvHari"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Hari"
android:textStyle="bold"
android:textSize="16sp"
android:textColor="@android:color/black"
android:layout_marginLeft="8dp"
android:layout_marginTop="5dp"
android:visibility="gone" />
<TextView
android:id="@+id/tvNamaKegiatan"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Nama Kegiatan"
android:textSize="15sp"
android:textColor="@android:color/black"
android:layout_marginTop="4dp"
android:layout_marginLeft="8dp"/>
<TextView
android:id="@+id/tvWaktu"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Waktu"
android:textSize="15sp"
android:textColor="@android:color/black"
android:layout_marginTop="2dp"
android:layout_marginLeft="8dp"/>
</LinearLayout>
</androidx.cardview.widget.CardView>

View File

@ -0,0 +1,73 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.cardview.widget.CardView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:card_view="http://schemas.android.com/apk/res-auto"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
card_view:cardCornerRadius="0dp"
card_view:cardElevation="0dp"
app:cardBackgroundColor="@android:color/transparent"
android:padding="12dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
style="@style/CustomCard">
<TextView
android:id="@+id/tvNamaSantri"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Nama Santri"
android:textStyle="bold"
android:textSize="16sp"
android:textColor="@android:color/black"
android:layout_marginLeft="8dp"
android:layout_marginTop="5dp" />
<TextView
android:id="@+id/tvPelanggaran"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Pelanggaran"
android:textSize="15sp"
android:textColor="@android:color/black"
android:layout_marginTop="4dp"
android:layout_marginLeft="8dp"/>
<TextView
android:id="@+id/tvTanggal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Tanggal"
android:textSize="15sp"
android:textColor="@android:color/black"
android:layout_marginTop="2dp"
android:layout_marginLeft="8dp"/>
<TextView
android:id="@+id/tvSanksi"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Sanksi"
android:textSize="15sp"
android:textColor="@android:color/black"
android:layout_marginTop="2dp"
android:layout_marginLeft="8dp"/>
<TextView
android:id="@+id/tvKeterangan"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Keterangan"
android:textSize="15sp"
android:textColor="@android:color/black"
android:layout_marginTop="2dp"
android:layout_marginLeft="8dp"
android:layout_marginBottom="5dp" />
</LinearLayout>
</androidx.cardview.widget.CardView>

View File

@ -0,0 +1,84 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.cardview.widget.CardView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:card_view="http://schemas.android.com/apk/res-auto"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
card_view:cardCornerRadius="0dp"
card_view:cardElevation="0dp"
app:cardBackgroundColor="@android:color/transparent"
android:padding="12dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
style="@style/CustomCard">
<TextView
android:id="@+id/tvNamaSantri"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Nama Santri"
android:textStyle="bold"
android:textSize="16sp"
android:textColor="@android:color/black"
android:layout_marginLeft="8dp"
android:layout_marginTop="5dp" />
<TextView
android:id="@+id/tvPrestasi"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Prestasi"
android:textSize="15sp"
android:textColor="@android:color/black"
android:layout_marginTop="4dp"
android:layout_marginLeft="8dp"/>
<TextView
android:id="@+id/tvAgenda"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Agenda"
android:textSize="15sp"
android:textColor="@android:color/black"
android:layout_marginTop="2dp"
android:layout_marginLeft="8dp"/>
<TextView
android:id="@+id/tvPerlombaan"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Perlombaan"
android:textSize="15sp"
android:textColor="@android:color/black"
android:layout_marginTop="2dp"
android:layout_marginLeft="8dp"/>
<TextView
android:id="@+id/tvTanggal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Tanggal"
android:textSize="15sp"
android:textColor="@android:color/black"
android:layout_marginTop="2dp"
android:layout_marginLeft="8dp"
android:layout_marginBottom="5dp" />
<TextView
android:id="@+id/tvBuktiPrestasi"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Bukti Prestasi"
android:textSize="15sp"
android:textColor="@android:color/black"
android:layout_marginTop="2dp"
android:layout_marginLeft="8dp"
android:layout_marginBottom="5dp" />
</LinearLayout>
</androidx.cardview.widget.CardView>

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
<monochrome android:drawable="@drawable/ic_launcher_foreground" />
</adaptive-icon>

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
<monochrome android:drawable="@drawable/ic_launcher_foreground" />
</adaptive-icon>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 982 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Some files were not shown because too many files have changed in this diff Show More