Skip to content

Instantly share code, notes, and snippets.

View AndroidBullOfficial's full-sized avatar

Waqas Younis AndroidBullOfficial

View GitHub Profile
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 29
buildToolsVersion "29.0.2"
defaultConfig {
applicationId "com.arslan6015.demodatabase"
minSdkVersion 21
package com.arslan6015.demodatabase;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import com.arslan6015.demodatabase.databinding.ActivityStdDetailsBinding;
<?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"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".StdDetails">
<androidx.cardview.widget.CardView
android:id="@+id/cardViewStdDetails"
package com.arslan6015.demodatabase.Interface;
import android.view.View;
//call the interface so that we call implements instead of extends.
public interface ItemClickListener {
//according to interface rules we can only declare method here.
void onClick(View view, int position, boolean isLongClick);
}
package com.arslan6015.demodatabase;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
package com.arslan6015.demodatabase;
import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import android.os.Bundle;
import android.util.Log;
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
android:layout_height="wrap_content"
android:layout_width="match_parent"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<androidx.cardview.widget.CardView
android:id="@+id/cardViewUploadResults"
android:layout_width="match_parent"
<FrameLayout
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=".RollNoActivity">
<androidx.recyclerview.widget.RecyclerView android:id="@+id/recyclerView"
package com.arslan6015.demodatabase;
public class StdRollNoModel {
private String StudentRollNo,TotalMarks,ObtainedMarks;
private double percentage;
public StdRollNoModel() {
}
public StdRollNoModel(String studentRollNo,String totalMarks, String obtainedMarks, double percentage) {
package com.arslan6015.demodatabase;
import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;