Skip to content

Instantly share code, notes, and snippets.

droan notdrone

Block or report user

Report or block notdrone

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
notdrone / .block
Last active Mar 31, 2018
View .block
license: mit
notdrone / .block
Last active Mar 31, 2018
Selection and Data
View .block
license: mit
notdrone /
Created Feb 4, 2016
Recyclerview with footer template
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ProgressBar;
View plurals.txt
<?xml version="1.0" encoding="utf-8"?>
<plurals name="see_new_update">
<item quantity="one">1 new update</item>
<item quantity="other">%d new updates</item>
String quantityString = context.getResources().getQuantityString(R.plurals.see_new_update,
View While writing pen source apps
public static final String FIREBASE_URL = BuildConig.UNIQUE_FIREBASE_ROOT_URL;
inside, add
inside build.gradle, add
notdrone /
Created Dec 21, 2015
firebas write/remove methods
setValue() writes/ replces data at the specified path replacig any data
at that path
updateChildren() write to specific childern of a parent node but without overwriting
other child nodes
push() add to list of data a. A unique id is generated by push depending
on the timestamp
runTransaction() used in ase of a counter, when seeralpeople update the same list
notdrone /
Created Aug 13, 2015
Creating a custom view to block image clicks
public void setOnClickListener ( OnClickListener listener ) {
OnClickListener listnerNew= new View.OnClickListener() {
public void onClick(View v) {
Log.e("DROAN","replace with this log");
if (!true)
View Recieving Intents
Bundle intent=getIntent().getExtras();
String message= intent.getString("key");
TextView text=(TextView)rootView.findViewById(;
View Starting Explicit Intent
Intent Detail = new Intent(getActivity(),DetailActivity.class).putExtra("key",some_string);
notdrone / toast
Created Feb 15, 2015
list clicks and toast
View toast
listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
String text = (String) listView.getItemAtPosition(position);
int duration = Toast.LENGTH_SHORT;
Toast toast = Toast.makeText(getActivity(), text, duration);;
You can’t perform that action at this time.