Skip to content

Instantly share code, notes, and snippets.

View hoseinit's full-sized avatar

Hosein Hamedi hoseinit

  • PAYBACK GmbH
  • Munich
View GitHub Profile
@hoseinit
hoseinit / BaseFragmet.java
Created November 15, 2017 10:13 — forked from philandrews100/BaseFragmet.java
Fragment Implementation
import android.app.Fragment;
import android.content.Context;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.retrofitrealm.controllers.MainActivityInterface;
@hoseinit
hoseinit / RoundImageView.Java
Created October 15, 2017 09:31 — forked from ManzzBaria/RoundImageView.Java
Make ImageView as circle view
import android.annotation.SuppressLint;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapShader;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.Shader;
import android.graphics.drawable.BitmapDrawable;
@hoseinit
hoseinit / install-and-configure-shadowsocks-server.sh
Created April 16, 2017 15:47 — forked from euyuil/install-and-configure-shadowsocks-server.sh
Shadowsocks: Server installation and configuration on Ubuntu 14.04.
#!/bin/bash
sudo apt-get -y update
sudo apt-get -y upgrade
sudo apt-get install -y python-gevent python-pip python-m2crypto supervisor
sudo pip install shadowsocks
sudo mkdir -p touch /etc/shadowsocks
@hoseinit
hoseinit / DialogFragmentCallback.md
Created November 16, 2015 12:46 — forked from Joev-/DialogFragmentCallback.md
Getting results from DialogFragment to calling Fragment using Callbacks

##Getting results from DialogFragments to another Fragment.

When setting up the DialogFragment make a call to Fragment.setTargetFragment()
Then from DialogFragment you can access the main fragment with Fragment.getTargetFragment()
Use interfaces to provide the required actions to the calling Fragment.

##Example code.

###AddFriendDialogFragment - Calls back to calling fragment.