Skip to content

Instantly share code, notes, and snippets.

View Shajeel-Afzal's full-sized avatar
🏠
Working from home

Shajeel Afzal Shajeel-Afzal

🏠
Working from home
View GitHub Profile
import 'dart:async';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
class TextCursor extends StatefulWidget {
const TextCursor({Key? key,
this.duration = const Duration(milliseconds: 500),
this.resumed = false,
@Veeyikpong
Veeyikpong / MiddleDividerItemDecoration.kt
Last active July 15, 2023 11:54
MiddleDividerItemDecoration, suitable for both LinearLayoutManager and GridLayoutManager.
/*
* Copyright 2018 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@cmelchior
cmelchior / BarListParcelConverter.java
Last active August 29, 2019 09:46
Using Parceler 1.0.3 with Realm
// Specific class for a RealmList<Bar> field
public class BarListParcelConverter extends RealmListParcelConverter<Bar> {
@Override
public void itemToParcel(Bar input, Parcel parcel) {
parcel.writeParcelable(Parcels.wrap(input), 0);
}
@Override
public Bar itemFromParcel(Parcel parcel) {
@ManuelPeinado
ManuelPeinado / MainActivity.java
Created October 19, 2014 20:02
Fading action bar effect using the new Toolbar class from the support library
package com.github.manuelpeinado.toolbartest;
import android.graphics.Color;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.support.v7.app.ActionBarActivity;
import android.support.v7.widget.Toolbar;
import android.view.Menu;
import android.view.View;
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);
}