Skip to content

Instantly share code, notes, and snippets.

$OutputEncoding = New-Object -typename System.Text.UTF8Encoding
[Console]::OutputEncoding = New-Object -typename System.Text.UTF8Encoding
@andreynovikov
andreynovikov / OnItemSelectedListener.java
Last active June 14, 2020 17:43
Complete working solution for Android action bar tabs with fragments having separate back stack for each tab.
// Custom interface that enables communication between Fragment and its Activity
public interface OnItemSelectedListener
{
public void onItemSelected(String item);
}
@dhawalhshah
dhawalhshah / ProgressDialogFragment.java
Created November 10, 2011 17:45
Showing a Progress dialog using DialogFragment in Android
public class ProgressDialogFragment extends DialogFragment {
public static LoadingDialogFragment newInstance() {
ProgressDialogFragment frag = new ProgressDialogFragment ();
return frag;
}
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {