Skip to content

Instantly share code, notes, and snippets.

View followthemoney1's full-sized avatar
🏠
Working from home

Dmitry Dyachenko followthemoney1

🏠
Working from home
View GitHub Profile
///interface
public interface FragmentViewInterface {
void onViewCreated(View layout);
void onResumeFragment();
void onPauseFragment();
}
///in fragment
public void onActivityCreated (Bundle savedInstanceState) {
https://github.com/nickbutcher/plaid/blob/master/app/src/main/java/io/plaidapp/ui/widget/ElasticDragDismissFrameLayout.java
https://github.com/nickbutcher/plaid/blob/master/app/src/main/java/io/plaidapp/util/AnimUtils.java
https://github.com/nickbutcher/plaid/blob/master/app/src/main/java/io/plaidapp/util/ColorUtils.java
https://github.com/nickbutcher/plaid/blob/master/app/src/main/java/io/plaidapp/util/ViewUtils.java
////
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2015 Google Inc.
Licensed under the Apache License, Version 2.0 (the "License");
import android.view.View;
import android.view.ViewGroup;
import android.view.animation.Animation;
import android.view.animation.Transformation;
/**
* Created by leaditteam on 29.09.17.
*/
public class AdapterAnimationItemUtil extends Animation {
@followthemoney1
followthemoney1 / .md
Created February 15, 2018 15:46
simple rxbinding
private void createEditTextSearch() {
    RxTextView.afterTextChangeEvents(placeName)
            .debounce(500, TimeUnit.MILLISECONDS)
            .filter(new Predicate<TextViewAfterTextChangeEvent>() {
                @Override
                public boolean test(TextViewAfterTextChangeEvent textViewAfterTextChangeEvent) throws Exception {
                    return isFocused;
                }
            })
            .filter(new Predicate<TextViewAfterTextChangeEvent>() {
@followthemoney1
followthemoney1 / ShareDialogManager
Last active May 4, 2019 18:49
rarare - ShareDialogManager - branch
package com.quayback.rarare.ui.invite;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.util.Log;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
class DesignerNewsCommentsAdapter
extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
private static final int TYPE_HEADER = 0;
private static final int TYPE_NO_COMMENTS = 1;
private static final int TYPE_COMMENT = 2;
private static final int TYPE_COMMENT_REPLY = 3;
private static final int TYPE_FOOTER = 4;
private View header;
@followthemoney1
followthemoney1 / FirebaseManager.md
Last active July 8, 2019 16:05
flutter example
class FirebaseManager {
  static FirebaseDatabase _firebaseDatabase = FirebaseDatabase.instance;
  DatabaseReference _databaseReference = _firebaseDatabase.reference();
  FirebaseAuth _firebaseUser = FirebaseAuth.instance;
  Firestore _firebaseFirestore = Firestore.instance;
  FirebaseStorage _storage = FirebaseStorage.instance;
  NetworkSharedPreferences _networkSharedPreferences =
      NetworkSharedPreferences();
  String _imagePublicUrlPrefix;
/**
 * Created by Dmitry Diachenko on Feb 18, 2020
 * powered by leaditteam.com
 **/

//MARK: widget ext
extension WidgetExtension on Widget {
  Widget setVisibility(VisibilityFlag flag) {
    return MyVisibility(visibility: flag, child: this);
@followthemoney1
followthemoney1 / mobile version
Created August 1, 2020 12:02
flutter GridView\ListView + ScrollView. Create scrollable content with GridView\ListView or scroll inside
mobile(bool isDesktop, NewsListState state) {
return Container(
child: CustomScrollView(
slivers: <Widget>[
SliverList(
delegate: SliverChildListDelegate([
Row(
children: [
Text(NewsLocalizations.of(context).titleNews,
style: Theme.of(context).textTheme.headline3)
@followthemoney1
followthemoney1 / info
Last active November 18, 2020 17:03
brach share flutter example
1 файл receive.dart получение (тебя интересует listenDynamicLinks)
2 класс создание( тут все по гайдам, строчка 24 )
ДЛЯ ОТКРЫТИЯ САЙТА В СЛУЧАЕЕ НЕ УСТАНОВЛЕННОГО ПРИЛОЖЕНИЯ
linkProperties.addControlParameter("$desktop_url", "https://example.com/home");