This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
license: mit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
license: mit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<resources> | |
<plurals name="see_new_update"> | |
<item quantity="one">1 new update</item> | |
<item quantity="other">%d new updates</item> | |
</plurals> | |
</resources> | |
String quantityString = context.getResources().getQuantityString(R.plurals.see_new_update, | |
StringUtil.str2Int(feed.getContent()),StringUtil.str2Int(feed.getContent())); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static final String FIREBASE_URL = BuildConig.UNIQUE_FIREBASE_ROOT_URL; | |
inside gradle.properties, add | |
UNIQUE_FIREBASE_ROOT_URL=”https://url.com/” | |
inside build.gradle, add | |
buildTypes.each{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override | |
public void setOnClickListener ( OnClickListener listener ) { | |
OnClickListener listnerNew= new View.OnClickListener() { | |
@Override | |
public void onClick(View v) { | |
Log.e("DROAN","replace with this log"); | |
} | |
}; | |
if (!true) | |
super.setOnClickListener(listener); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Bundle intent=getIntent().getExtras(); | |
String message= intent.getString("key"); | |
TextView text=(TextView)rootView.findViewById(R.id.text); | |
text.setText(message); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Intent Detail = new Intent(getActivity(),DetailActivity.class).putExtra("key",some_string); | |
startActivity(Detail); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
listView.setOnItemClickListener(new AdapterView.OnItemClickListener() { | |
@Override | |
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); | |
toast.show(); |
NewerOlder