Skip to content

Instantly share code, notes, and snippets.

View jobayer's full-sized avatar

Md Jobayer jobayer

View GitHub Profile
@ozgurg
ozgurg / PlayPauseView.java
Last active June 4, 2024 04:12
Android Animated Play Pause Button by using AnimatedVectorDrawable
public class PlayPauseView extends AppCompatImageView {
public static final int STATE_PLAY = 1;
public static final int STATE_PAUSE = 2;
private AnimatedVectorDrawableCompat mPlayToPauseAnim, mPauseToPlay;
private Animation mFadeOutAnim, mFadeInAnim;
public PlayPauseView(Context context) {
super(context);
Init(context);
@sXakil
sXakil / bd_map.c
Last active December 19, 2022 10:47
A simple program to print the map of Bangladesh based on the ASCII values of a generated string. (Generator script: https://gist.github.com/sXakil/a7377acba95f8ba2b7dddfaf24339c27)
#include <stdio.h>
int main() {
char *str = "ED.GDAD.DLEB.COCC.CV.FS.HQ."
"JN.MP.Go.Cr.Cq.Cp.Fk.Jf.J`.I`.H`ID."
"J^HE.K^FG.N[ABCG.L`CG.MTBT.MUCS.NTD"
"BCBAJ.NUBBHI.OTMI.OROI.OGDCSI.PE[I."
"RC[I.rBDB.rB.sB.tB";
int c, i, j;
for(i = 0, j = 0; str[i] != '\0'; i++, j++) {
c = str[i]-64;
@WSAyan
WSAyan / bd_location_arrays.xml
Last active August 2, 2021 18:34
BD divisions and districts string array list for android array values.
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string-array name="bd_divisions">
<item>Dhaka</item>
<item>Chattogram</item>
<item>Barishal</item>
<item>Khulna</item>
<item>Rajshahi</item>
<item>Rangpur</item>
<item>Sylhet</item>
@gabrielemariotti
gabrielemariotti / Readme.md
Last active March 2, 2024 23:10
A SimpleSectionedRecyclerViewAdapter: use this class to realize a simple sectioned `RecyclerView.Adapter`.

You can use this class to realize a simple sectioned RecyclerView.Adapter without changing your code.

The RecyclerView should use a LinearLayoutManager. You can use this code also with the TwoWayView with the ListLayoutManager (https://github.com/lucasr/twoway-view)

This is a porting of the class SimpleSectionedListAdapter provided by Google

Screen

Example:

@gabrielemariotti
gabrielemariotti / build.gradle
Last active January 12, 2024 17:41
Use signing.properties file which controls which keystore to use to sign the APK with gradle.
android {
signingConfigs {
release
}
buildTypes {
release {
signingConfig signingConfigs.release
}