Skip to content

Instantly share code, notes, and snippets.

View SurajBahadur's full-sized avatar
🎯
Focusing

Suraj Bahadur SurajBahadur

🎯
Focusing
View GitHub Profile
public class AnimatedActivity extends Activity
{
@Override
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
//opening transition animations
overridePendingTransition(R.anim.activity_open_translate,R.anim.activity_close_scale);
}
@SurajBahadur
SurajBahadur / README.md
Created September 7, 2019 13:04 — forked from lopspower/README.md
Hexadecimal color code for transparency

Hexadecimal color code for transparency

Twitter

How to set transparency with hex value ?

For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.

All hex value from 100% to 0% alpha:

  1. put this on top:
object GlobalVariable {
    var mp = MediaPlayer()
}
  1. use it everywhere GlobalVariable.mp
@SurajBahadur
SurajBahadur / PhonecallReceiver.java
Created December 18, 2019 11:59 — forked from ftvs/PhonecallReceiver.java
Detecting an incoming call coming to an Android device. Remember to set the appropriate permissions in AndroidManifest.xml as suggested in the Stackoverflow link. Usage example in comments. Source: http://stackoverflow.com/a/15564021/264619 Explanation: http://gabesechansoftware.com/is-the-phone-ringing/#more-8
package com.gabesechan.android.reusable.receivers;
import java.util.Date;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.telephony.TelephonyManager;
public abstract class PhonecallReceiver extends BroadcastReceiver {
@SurajBahadur
SurajBahadur / AdbCommands
Created August 4, 2020 21:38 — forked from Pulimet/AdbCommands
Adb useful commands list
adb help // List all comands
== Adb Server
adb kill-server
adb start-server
== Adb Reboot
adb reboot
adb reboot recovery
adb reboot-bootloader