Digital Tasbih With Full Java And XML Source Code





<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#FFDE36"
tools:context=".SplashScreen">

<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_above="@+id/logo"
android:layout_gravity="center"
android:layout_marginBottom="20dp"
android:gravity="center"
android:text="Tesbeeh App"
android:textColor="#111F6C"
android:textSize="40dp"
android:textStyle="bold" />

<ImageView
android:id="@+id/logo"
android:layout_centerVertical="true"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/logo"
android:layout_gravity="center"
/>
</RelativeLayout>

package com.shamimit.tasbeehapp;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;

public class SplashScreen extends AppCompatActivity {
Handler h;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_splash_screen);

h= new Handler();
h.postDelayed(new Runnable() {
@Override
public void run() {
Intent amrIntent= new Intent(SplashScreen.this, MainActivity.class);
startActivity(amrIntent);
finish();
}
}, 3000);


}
}

<?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:orientation="vertical"
android:background="#FFDE36"
tools:context=".MainActivity">

<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Tesbeeh App"
android:layout_gravity="center"
android:gravity="center"
android:textSize="40sp"
android:textStyle="bold"
android:textColor="#111F6C"
android:layout_marginTop="12dp"/>
<LinearLayout
android:id="@+id/TasbihCounter"
android:layout_width="match_parent"
android:layout_gravity="center"
android:gravity="center"
android:layout_height="wrap_content">

<androidx.cardview.widget.CardView
android:layout_width="180dp"
android:layout_height="180dp"
app:cardBackgroundColor="#FAD937"
app:cardCornerRadius="20dp"
app:cardPreventCornerOverlap="true"
app:cardUseCompatPadding="true">

<ImageView

android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:contentDescription="@string/app_name"
android:src="@drawable/img_1" />

</androidx.cardview.widget.CardView>

</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:weightSum="2">

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1">

<androidx.cardview.widget.CardView
android:layout_width="match_parent"
android:layout_height="200dp"
android:layout_marginStart="10dp"
android:layout_marginTop="10dp"
android:layout_marginEnd="10dp"
app:cardBackgroundColor="@color/white"
app:cardCornerRadius="20dp"
app:cardElevation="10dp"
app:cardMaxElevation="12dp"
app:cardPreventCornerOverlap="true"
app:cardUseCompatPadding="true">

<ImageView
android:layout_width="200dp"
android:layout_height="200dp"
android:layout_gravity="center"
android:layout_margin="10dp"
android:contentDescription="@string/app_name"
android:src="@drawable/logo" />

</androidx.cardview.widget.CardView>

</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1">

<androidx.cardview.widget.CardView
android:layout_width="match_parent"
android:layout_height="200dp"
android:layout_marginStart="10dp"
android:layout_marginTop="10dp"
android:layout_marginEnd="10dp"
app:cardBackgroundColor="@color/white"
app:cardCornerRadius="20dp"
app:cardElevation="10dp"
app:cardMaxElevation="12dp"
app:cardPreventCornerOverlap="true"
app:cardUseCompatPadding="true">

<ImageView
android:id="@+id/ijmg"
android:layout_width="200dp"
android:layout_height="200dp"
android:layout_gravity="center"
android:layout_margin="10dp"
android:contentDescription="@string/app_name"
android:src="@drawable/logo" />

</androidx.cardview.widget.CardView>

</LinearLayout>

</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:weightSum="2">

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1">

<androidx.cardview.widget.CardView
android:layout_width="match_parent"
android:layout_height="200dp"
android:layout_marginStart="10dp"
android:layout_marginTop="10dp"
android:layout_marginEnd="10dp"
app:cardBackgroundColor="@color/white"
app:cardCornerRadius="20dp"
app:cardElevation="10dp"
app:cardMaxElevation="12dp"
app:cardPreventCornerOverlap="true"
app:cardUseCompatPadding="true">

<ImageView
android:id="@+id/imhhg"
android:layout_width="200dp"
android:layout_height="200dp"
android:layout_gravity="center"
android:layout_margin="10dp"
android:contentDescription="@string/app_name"
android:src="@drawable/logo" />

</androidx.cardview.widget.CardView>

</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1">

<androidx.cardview.widget.CardView
android:layout_width="match_parent"
android:layout_height="200dp"
android:layout_marginStart="10dp"
android:layout_marginTop="10dp"
android:layout_marginEnd="10dp"
app:cardBackgroundColor="@color/white"
app:cardCornerRadius="20dp"
app:cardElevation="10dp"
app:cardMaxElevation="12dp"
app:cardPreventCornerOverlap="true"
app:cardUseCompatPadding="true">

<ImageView
android:layout_width="200dp"
android:layout_height="200dp"
android:layout_gravity="center"
android:layout_margin="10dp"
android:contentDescription="@string/app_name"
android:src="@drawable/logo" />

</androidx.cardview.widget.CardView>

</LinearLayout>

</LinearLayout>
</LinearLayout>
package com.shamimit.tasbeehapp;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;

public class MainActivity extends AppCompatActivity {
LinearLayout TasbihCounter;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);

TasbihCounter=findViewById(R.id.TasbihCounter);





TasbihCounter.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent myIntent = new Intent(MainActivity.this, Tasbeeh.class);
startActivity(myIntent);
}
});
}
}
<?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="#FFDE36"
android:orientation="vertical"
tools:context=".Tasbeeh">




<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">

<androidx.cardview.widget.CardView
android:layout_width="match_parent"
android:layout_height="200dp"
app:cardBackgroundColor="#FAD937"
app:cardCornerRadius="20dp"
app:cardElevation="10dp"
app:cardMaxElevation="12dp"
app:cardPreventCornerOverlap="true"
app:cardUseCompatPadding="true">

<TextView
android:id="@+id/tbDisplay"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="0"
android:layout_gravity="center"
android:gravity="center"
android:textSize="40sp"
android:textStyle="bold"
android:textColor="#111F6C"
android:layout_marginTop="12dp"/>

</androidx.cardview.widget.CardView>

</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:weightSum="2">

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1">

<androidx.cardview.widget.CardView
android:layout_width="match_parent"
android:layout_height="120dp"
app:cardBackgroundColor="@color/white"
app:cardCornerRadius="20dp"
app:cardPreventCornerOverlap="true"
app:cardUseCompatPadding="true">

<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="সুবাহানাল্লাহ"
android:layout_gravity="center"
android:gravity="center"
android:textSize="30sp"
android:textStyle="bold"
android:textColor="#111F6C"
/>

</androidx.cardview.widget.CardView>

</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1">

<androidx.cardview.widget.CardView
android:layout_width="match_parent"
android:layout_height="120dp"
app:cardBackgroundColor="@color/white"
app:cardCornerRadius="20dp"
app:cardPreventCornerOverlap="true"
app:cardUseCompatPadding="true">

<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="আল-হামদুলিল্লাহ্”"
android:layout_gravity="center"
android:gravity="center"
android:textSize="30sp"
android:textStyle="bold"
android:textColor="#111F6C"
/>

</androidx.cardview.widget.CardView>

</LinearLayout>

</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:weightSum="2">

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1">

<androidx.cardview.widget.CardView
android:layout_width="match_parent"
android:layout_height="120dp"
app:cardBackgroundColor="@color/white"
app:cardCornerRadius="20dp"
app:cardPreventCornerOverlap="true"
app:cardUseCompatPadding="true">

<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="লা-ইলাহ ইল্লাল্লা-"
android:layout_gravity="center"
android:gravity="center"
android:textSize="30sp"
android:textStyle="bold"
android:textColor="#111F6C"
/>

</androidx.cardview.widget.CardView>

</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1">

<androidx.cardview.widget.CardView
android:layout_width="match_parent"
android:layout_height="120dp"
app:cardBackgroundColor="@color/white"
app:cardCornerRadius="20dp"
app:cardPreventCornerOverlap="true"
app:cardUseCompatPadding="true">

<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="আল্লাহু আকবার"
android:layout_gravity="center"
android:gravity="center"
android:textSize="30sp"
android:textStyle="bold"
android:textColor="#111F6C"
/>

</androidx.cardview.widget.CardView>

</LinearLayout>

</LinearLayout>


<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:weightSum="2">

<LinearLayout
android:id="@+id/MainusS"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1">

<androidx.cardview.widget.CardView
android:layout_width="match_parent"
android:layout_height="140dp"
app:cardBackgroundColor="#FDE645"
app:cardCornerRadius="20dp"
app:cardElevation="10dp"
app:cardPreventCornerOverlap="true"
app:cardUseCompatPadding="true">

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="SUBB"
android:layout_gravity="center"
android:gravity="center"
android:textSize="40sp"
android:textStyle="bold"
android:textColor="#091355"
/>

</androidx.cardview.widget.CardView>

</LinearLayout>
<LinearLayout
android:id="@+id/PlusS"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1">

<androidx.cardview.widget.CardView
android:layout_width="match_parent"
android:layout_height="140dp"
app:cardBackgroundColor="#FDE645"
app:cardCornerRadius="20dp"
app:cardElevation="10dp"
app:cardPreventCornerOverlap="true"
app:cardUseCompatPadding="true">

<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="ADD"
android:layout_gravity="center"
android:gravity="center"
android:textSize="40sp"
android:textStyle="bold"
android:textColor="#091355"
/>

</androidx.cardview.widget.CardView>

</LinearLayout>


</LinearLayout>
<LinearLayout
android:id="@+id/Reset"
android:layout_width="match_parent"
android:layout_height="wrap_content">

<androidx.cardview.widget.CardView
android:layout_width="match_parent"
android:layout_height="140dp"
app:cardBackgroundColor="#FDE645"
app:cardCornerRadius="20dp"
app:cardElevation="10dp"
app:cardPreventCornerOverlap="true"
app:cardUseCompatPadding="true">

<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Reset"
android:layout_gravity="center"
android:gravity="center"
android:textSize="40sp"
android:textStyle="bold"
android:textColor="#091355"
/>

</androidx.cardview.widget.CardView>

</LinearLayout>
</LinearLayout>

package com.shamimit.tasbeehapp;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.TextView;

public class Tasbeeh extends AppCompatActivity {
LinearLayout MainusSs,PlusS,Reset;
TextView tbDisplay;
int count=0;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_tasbeeh);

MainusSs= findViewById(R.id.MainusS);
PlusS=findViewById(R.id.PlusS);
tbDisplay=findViewById(R.id.tbDisplay);
Reset=findViewById(R.id.Reset);

MainusSs.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
count--;

tbDisplay.setText(""+count);
}
});

PlusS.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
count++;
tbDisplay.setText(""+count);


}
});

Reset.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
count=0;
tbDisplay.setText(""+count);


}
});



}
}






Digital Tasbeeh

Post a Comment

Previous Post Next Post
Girl in a jacket