Category: General

Implementing backup and restore feature of SQLite Database to comply with Scoped Storage Android 11

package com.abc.def; import android.app.Activity; import android.content.Context; import android.content.Intent; import android.content.pm.PackageManager; import android.net.Uri; import android.os.Build; import android.os.Bundle; import android.os.Environment; import android.util.Log; import android.view.View; import android.widget.Button; import android.widget.TextView; import android.widget.Toast; import androidx.annotation.NonNull; import androidx.appcompat.app.AppCompatActivity; import androidx.core.app.ActivityCompat; import androidx.core.content.ContextCompat; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.nio.channels.FileChannel; import java.text.SimpleDateFormat; import

MikroTik Simple Queue Script – Add All IP

As a network administrator, you may need to create queue for all IP which will limit the internet usage for a particular router. For this the below command is very handy and easy to use. :for x from= 1 to= 254 do={/queue simple add name=”queue-$x” max-limit=1M/1M target=”192.168.24.$x”} Open the New Terminal from Winbox and type

How to show empty View in Activity Recyclerview?

package com.zakasoft.cashreceipt; import android.content.Context; import androidx.recyclerview.widget.RecyclerView; import android.util.AttributeSet; import android.view.View; import androidx.recyclerview.widget.RecyclerView; public class EmptyRecyclerView extends RecyclerView { private View emptyView; final private RecyclerView.AdapterDataObserver observer = new AdapterDataObserver() { @Override public void onChanged() { checkIfEmpty(); } @Override public void onItemRangeInserted(int positionStart, int itemCount) { checkIfEmpty(); } @Override public void onItemRangeRemoved(int positionStart, int itemCount) { checkIfEmpty();

Floating Action Button (Android)

<com.google.android.material.floatingactionbutton.FloatingActionButton android:id="@+id/fab1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="end|bottom" android:layout_margin="16dp" android:contentDescription="Add" android:src="@drawable/ic_add_circle_outline_black_24dp" app:backgroundTint="@color/colorPrimary" app:fabSize="auto" app:maxImageSize="56dp"/> src: https://stackoverflow.com/questions/27484126/adjust-icon-size-of-floating-action-button-fab

বাংলা ভাষার জন্য ভালবাসা, বাংলা বর্ণমালা এপ আজই ডাউনলোড করুন।

https://play.google.com/store/apps/details?id=com.zakasoft.banglabornomala Bangla is a language that is spoken by millions of people around the world. The first step to learn any language is to get familiar with the alphabets and numbers. With this easy to use app and simple interface, anyone can learn the Bengali/Bangla language. It is useful for kids in schools and kindergarten.