Skip to content

Instantly share code, notes, and snippets.

View MotasemF's full-sized avatar

MotasemJouda MotasemF

View GitHub Profile
@Preview()
@Composable
fun Card() {
var rotationX by remember { mutableStateOf(0f) }
var rotationY by remember { mutableStateOf(0f) }
Box(
Modifier
.fillMaxSize()
.background(Color.Black)) {
Box(
fun AppCompatActivity.setStatusBarTransparent() {
window.decorView.systemUiVisibility = window.decorView.systemUiVisibility or View.SYSTEM_UI_FLAG_LAYOUT_STABLE or View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
setWindowFlag(this, WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS, false)
window.statusBarColor = Color.TRANSPARENT
}
private fun setWindowFlag(activity: Activity, bits: Int, on: Boolean) {
val win = activity.window
val winParams = win.attributes
if (on) {
function onFormSubmit(e){
var email = e.namedValues['Email address'][0];
var message = "Thank you for submiting your servay your gift will be send to you soon";
sendEmail(email, message);
}
function sendEmail(email, message){
MailApp.sendEmail(email, "whatever", message);
}
class CallReceiver : PhonecallReceiver() {
override fun onIncomingCallStarted(ctx: Context, number: String?, start: Date) {
}
override fun onOutgoingCallStarted(ctx: Context, number: String?, start: Date) {
}
override fun onIncomingCallEnded(ctx: Context, number: String?, start: Date?, end: Date) {
}
@MotasemF
MotasemF / LayoutToImage.java
Created October 7, 2019 09:27
Layout_to_Image
public class Layout_to_Image {
View _view;
Context _context;
Bitmap bMap;
public Layout_to_Image(Context context, View view)
{
this._context=context;
@MotasemF
MotasemF / FlowRadioGroup.kt
Created February 23, 2019 20:12
Multi Line radioButton
class FlowRadioGroup(context: Context) : RadioGroup(context) {
private var lineSpacing: Int = 0
private var itemSpacing: Int = 0
private var singleLine: Boolean = false
constructor (context: Context, attrs: AttributeSet) : this(context, attrs, 0) {}
constructor(context: Context, attrs: AttributeSet, defStyleAttr: Int) : this(context) {
@MotasemF
MotasemF / FlowRadioGroup.kt
Created February 23, 2019 20:07
Multi Line radioButton
class FlowRadioGroup(context: Context) : RadioGroup(context) {
private var lineSpacing: Int = 0
private var itemSpacing: Int = 0
private var singleLine: Boolean = false
constructor (context: Context, attrs: AttributeSet) : this(context, attrs, 0) {}
constructor(context: Context, attrs: AttributeSet, defStyleAttr: Int) : this(context) {