Skip to content

Instantly share code, notes, and snippets.

View abd3lraouf's full-sized avatar
📸
Storyteller

Abdelraouf Sabri abd3lraouf

📸
Storyteller
View GitHub Profile
@abd3lraouf
abd3lraouf / KeyboardVisibilityDetector.kt
Last active May 5, 2024 06:23
Android Compose Keyboard Visibility Detector: A Jetpack Compose implementation to detect the visibility of the software keyboard in an Android app. This example demonstrates the use of WindowInsets and isImeVisible in a simple Compose layout
package dev.abd3lraouf.learn.myapplication
import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.activity.enableEdgeToEdge
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.ExperimentalLayoutApi
import androidx.compose.foundation.layout.WindowInsets
import androidx.compose.foundation.layout.fillMaxSize

Senior Android Developer å abdelraoufsabri@gmail.com

| S abd3lraouf.dev

AbdElraouf Sabri | E github.com/abd3lraouf

| D linkedin.com/in/abd3lraouf

@abd3lraouf
abd3lraouf / CustomLoadControl.java
Created October 25, 2022 10:00
exo player custom load control with drip-feeding
/**
* The default {@link LoadControl} implementation.
*/
public final class CustomLoadControl implements LoadControl {
/**
* The default minimum duration of media that the player will attempt to ensure is buffered at all
* times, in milliseconds.
*/
public static final int DEFAULT_MIN_BUFFER_MS = 5_000;
@abd3lraouf
abd3lraouf / Readme.md
Last active October 1, 2022 21:20
Handbrakecli bash script to convert all videos from all subdirectories

Handbrake CLI script

Features

  1. Traverse any deep folder/file tree.
  2. Rename original files.
  3. Convert with x265 codec (20-50% space improvment).
  4. Use GPU in encoding (improved performance).
  5. Use it with care.
@abd3lraouf
abd3lraouf / MockPlaceHolder.kt
Created August 4, 2022 14:20
How to make placeholder items in Android RecyclerView Android
package com.store.ui.widget
import android.content.Context
import android.util.AttributeSet
import android.widget.LinearLayout
class MockPlaceHolder(context: Context, attrs: AttributeSet?): LinearLayout(context, attrs) {
var repeact = 1
var layoutResource = android.R.layout.activity_list_item
@abd3lraouf
abd3lraouf / Crack Sublime Text Windows and Linux.md
Created January 28, 2022 09:41 — forked from JerryLokjianming/Crack Sublime Text Windows and Linux.md
Crack Sublime Text 3.2.2 Build 3211 and Sublime Text 4 Alpha 4098 with Hex

YouTube Channel https://www.youtube.com/c/jerrylokjianming


How to Crack Sublime Text 3.2.2 Build 3211 with Hex Editor (Windows | Without License) ↓

  1. Download & Install Sublime Text 3.2.2 Build 3211
  2. Visit https://hexed.it/
@abd3lraouf
abd3lraouf / 1.kt
Created December 10, 2021 10:52
Android WebView The Missing guide
binding.webview.apply {
settings.javaScriptEnabled = true
loadUrl("https://abd3lraouf.github.io/webview_code_injection_from_android")
}
package vodafone.vis.engezly.ui.screens.services.web_view_service;
import android.annotation.SuppressLint;
import android.content.ContentUris;
import android.content.Context;
import android.database.Cursor;
import android.net.Uri;
import android.os.Build;
import android.os.Environment;
import android.provider.DocumentsContract;

Keybase proof

I hereby claim:

  • I am abd3lraouf on github.
  • I am abd3lraouf (https://keybase.io/abd3lraouf) on keybase.
  • I have a public key ASBOjyTLhRr8q-hQMn9y6mOwAFJwyQoRIpkoHEHsSGpZUgo

To claim this, I am signing this object:

@abd3lraouf
abd3lraouf / Readme.md
Last active March 31, 2021 09:39 — forked from damokuro/fix_github_https_repo.sh
Convert HTTPS github clones to use SSH

Introduction

converts git remote from https to ssh using sed

One line

wget https://bit.ly/https_ssh_manoo -O- | bash

Features:

  1. Downlaod