This file contains 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
<img style="border-radius: 30px;" | |
src="http://static.myopera.com/community/graphics/speeddials/Opera-Background-Colored-Lights.jpg"/> |
This file contains 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 Filter getFilter() { | |
Filter myFilter = new Filter() { | |
@Override | |
protected FilterResults performFiltering(CharSequence constraint) { | |
FilterResults filterResults = new FilterResults(); | |
if(constraint != null) { | |
List<GenericProduct> filteredProducts = new ArrayList<GenericProduct>(); | |
for(GenericProduct currentGenericProduct : genericProductList){ | |
if(currentGenericProduct.getName().contains(constraint)){ |
This file contains 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
/** | |
* Check if an Intent is available to use | |
* @param intent the Intent to check if is available | |
* @return true if is available, false otherwise | |
*/ | |
private boolean isIntentAvailable(Intent intent) { | |
List<ResolveInfo> list = getPackageManager().queryIntentActivities(intent, | |
PackageManager.MATCH_DEFAULT_ONLY); | |
return list.size() > 0; | |
} |
This file contains 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 tweetIntent = new Intent(Intent.ACTION_SEND); | |
tweetIntent.putExtra(Intent.EXTRA_TEXT, "This is a Test."); | |
tweetIntent.setType("text/plain"); | |
PackageManager packManager = getPackageManager(); | |
List<ResolveInfo> resolvedInfoList = packManager. | |
queryIntentActivities(tweetIntent, PackageManager.MATCH_DEFAULT_ONLY); | |
boolean resolved = false; | |
for(ResolveInfo resolveInfo: resolvedInfoList){ |
NewerOlder