Android :: ACTION_APPWIDGET_PICK - Filtering The List?
Nov 26, 2009
I have my own widget container. I am running the intent 'ACTION_APPWIDGET_PICK' but I want only to show some items in the list and not all items. Is there a way to filter the list?
if not, is there any way to let the user just add one widget to my container, and not have to select form the list?
View 3 Replies
Oct 17, 2010
Trying to implement simple dictionary. I want to make it so while the user is typing in the EditText box the list to scroll automatically to the best match. I don't want it to filter the list. For example if the user types "s" in the EditText I want the first word that s/he sees under the EditText box to be the first word in the dictionary that starts with "s." But the user should still be able to slide up and down and to be able to see the entire list of words. It is basically like a go to functionality. I used ArrayList to store my list of words. The data is in res/raw/data.xml file. Here is my onCreate method
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
wordListView = (ListView)findViewById(R.id.wordList);
myEditText = (EditText)findViewById(R.id.myEditText);
words = new ArrayList<Word>();
arrAdap = new ArrayAdapter<Word>(this, android.R.layout.simple_list_item_1, words);
wordListView.setAdapter(arrAdap); try {
InputStream inSource = getResources().openRawResource(R.raw.data);
DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
Document doc = builder.parse(inSource, null);
NodeList wordsList = doc.getElementsByTagName("eng-bg");
int length = wordsList.getLength();
for(int i = 0; i<length; i++) {
Element entry = (Element)wordsList.item(i);
Element eng = (Element)entry.getElementsByTagName("english").item(0);
Element bul = (Element)entry.getElementsByTagName("bulgarian").item(0);
Element id = (Element)entry.getElementsByTagName("ID").item(0);
String english = eng.getFirstChild().getNodeValue();
String bulgarian = bul.getFirstChild().getNodeValue();
int wordId = Integer.parseInt(id.getFirstChild().getNodeValue());
Word word = new Word(bulgarian, english, wordId);
addNewWord(word);
} catch (ParserConfigurationException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (SAXException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}wordListView.setOnItemClickListener(new OnItemClickListener(){
public void onItemClick(AdapterView<?> parent, View view, int pos, long id) {
selectedWord = words.get(pos);
showDialog(TRANS_DIALOG);
myEditText.setText(selectedWord.getEnglish());
myEditText.addTextChangedListener(new TextWatcher(){
public void onTextChanged(CharSequence s, int start, int before, int count) {
@Override
public void afterTextChanged(Editable s) {
// TODO Auto-generated method stub
@Override
public void beforeTextChanged(CharSequence s, int start, int count,
int after) {
// TODO Auto-generated method stub
View 1 Replies
View Related
Aug 5, 2010
I have a ListView filled with twitter tweets. I made a custom Tweet class so I could store a special type number. So, I have the Tweet class and custom ArrayAdapter: Code...
View 1 Replies
View Related
Jun 20, 2010
i came from a blackberry so learning here..but i know how to set up my pop email account to go through gmail and get sent to my phone, however can i filter only certain emails to my phone? i really dont want them all going to my phone as i read most via computer, i only want ones coming from certain contacts being sent to my phone.
View 13 Replies
View Related
Oct 31, 2009
I am looking for an all-in-one SMS app that can filter incoming messages based on words and phrases in the message. The reason being that I have monitoring systems at work that send SMS alerts and sometimes the alerts are just FYI, not OMG's
So anyways, right now I have a Hero, so I use Handcent for the replacement of the stock app until it is fixed and SMS Firewall to filter incoming messages and do the alerting. Being a 2 part solution it works very well, but I was curious if anyone has tried anything that has it all in one.
I have tried a few of the apps out there and none seem to work right.
Here's what I tried without success
aFirewall (didn't seem to filter properly)
SMS manager (can't remember what was wrong)
SMS Guard (kept getting a force close when a message came in)
PandaFirewall (didn't filter anything properly when I tested)
GSMS (force close when trying to view inbox)
I was going to try UltimateSMS, but it appears to have been removed from the Market.
View 3 Replies
View Related
Jan 28, 2010
I have a problem, I need some hints. I need to have my app receive certain kind of sms (say meant for my app). is it possible?Is it possible to receive all the sms in my app rather than default sms app? How to configuration my app to receive sms?please help with some links and stuff.
View 3 Replies
View Related
Feb 24, 2010
I am trying to write a clean bit of code that can list the people in a 1.5/1.6 Contacts data store, and I do not see how I filter out the cruft that Google throws in (ad hoc "contacts" literally addressed by other apps and stored, for some reason, in the contact list without a clear means of discerning them from the real people the user cared to enter - the ones that would appear in the contacts app). I see that in 2.0 or so, "IN_VISIBLE_GROUP" is added as a field which seems to differentiate these versions, but what existed to accomplish this before that time? Here is my code which works in 2.x and fails to keep the chaff out in 1.x, as the selection parameter is unsupported:
final String[] proj = new String[] { Contacts.People._ID, Contacts.People.NAME };
final String selection = Build.VERSION.SDK_INT < 5 ? null : ContactsContract.Contacts.IN_VISIBLE_GROUP + "=1";
Cursor people = context.getContentResolver().query( Contacts.People.CONTENT_URI, proj, selection, null, Contacts.People.DEFAULT_SORT_ORDER);
if (people != null) { final int personIdColumn = people .getColumnIndexOrThrow(Contacts.People._ID);
final int nameColumn = people .getColumnIndexOrThrow(Contacts.People.NAME);
while (people.moveToNext()) { if (Thread.interrupted()) { people.close();
outputList.clear(); throw new InterruptedException();
} long personId = people.getLong(personIdColumn);
String name = people.getString(nameColumn);
if (name != null) { outputList.add(new Contact(personId, name));
} } // clean up cursor people.close();
}
View 5 Replies
View Related
Aug 5, 2010
I have a ListView (with setTextFilterEnabled(true)) and a custom adapter (extends ArrayAdapter) which I update from the main UI thread whenever a new item is added/inserted. Everything works fine at first--new items show up in the list immediately. However this stops the moment I try to filter the list.Filtering works, but I do it once and all of my succeeding attempts to modify the contents of the list (add, remove) don't display anymore. I used the Log to see if the adapter's list data gets updated properly, and it does, but it's no longer in sync with the ListView shown.
View 2 Replies
View Related
Feb 27, 2010
Since the query that comprises my ListView basically gets the rowID, name, and a third column from my databases's table, I want to be able to filter the cursor based on the partial value of the name column. However, I am uncertain of whether I can do this directly from runQuery without expanding my DB class since I want to filter the existing cursor, or will I have to create a new query function in my DB class that partially searches my name column, and if so, how would I go about creating the query statement while using the CharSequence constraint argument in runQuery?I am also concerned about the performance issues associated with trying to run multiple queries based on partial text since the DB table in question has about 1300-1400 rows. In other words, would I run into a bottleneck trying to filter the cursor?
View 1 Replies
View Related
Aug 18, 2010
I'm just learning OpenGL ES on Android, and I am trying to get some kind of anisotropic filtering on textures. I want to increase the size of a sprite, with some kind of interpolation, instead of this "nearest-pixel-interpolation".
Is there anything like this in the OpenGL ES standard or do I have to make one texture for each size?
View 2 Replies
View Related
Sep 27, 2010
Is there a way to filter audio in android system? I am interested to get only the audio of a fixed frequency.
View 1 Replies
View Related
May 21, 2010
I'm programming an Augmented Reality application. It's development it's in an advanced state but I can't place the icons on the screen so still as anothers programs does (Layar, in example). This is because of the continuous variations of the sensors. I've tried the three modes of the sensors (FAST, GAME, and NORMAL) but I only get them to move more or less fast. The shivering is the same at different speed.
Finally I thougth I could reach my goal with a digital filter, averaging historical values. But again the icons continues moving, specially the most far placed ones (in the z axis). Please, could some one help me with some clue?
View 8 Replies
View Related
Feb 25, 2010
I need to filter the required information from list of data. I am really looking to use combobox for it
Does the android provide a way to make a combobox to filter the data? I have read on android developer forum that you can build custom components but I don't have any idea how does it work for combobox?
View 1 Replies
View Related
Apr 27, 2010
I'm trying to filter my ListView which is populated with this ArrayAdapter:
CODE:............
However, when I call filter('test') on the filter nothing happens at all (or the background-thread is run, but the list isn't filtered as far as the user conserns).
View 2 Replies
View Related
Apr 16, 2010
Code below creates an Alarm, so far everything is working fine. But i am a bit lost in the Documentaion how to cancel an Alarm. I need to cancel only special Alarm(s) depending on Intent#putExtra(IntentConstants.SELECTED_PRIMARY_KEY,_selectedID);
How can i archive this ?
CODE:.....................
View 3 Replies
View Related
Nov 8, 2010
Anyone know of an app that can take video from the camera and display it live on the screen, but with color filters applied? Specifically, I'm looking for something that can amp up the color saturation. I've got lousy color vision and it'd be handy to have something to help distinguish subtle color variations. Nice-to-have would be an eyedropper mode that can tell me the rgb values of a selected region.
View 1 Replies
View Related
Mar 19, 2013
My concern as a parent now is the internet safety and security. Any good applications for parental control on Android.
View 3 Replies
View Related
Jul 31, 2009
Is there an app or a way to have filters on Facebook AND Twitter (but mostly Facebook) that we can put select people in that whenever those people update their statuses we get alerted. Is there any way to do that either on or off the phone so that we can get updated on the phone and respond?
View 4 Replies
View Related
May 13, 2009
how can I use the new soft keyboard to filter a ListView?
View 5 Replies
View Related
Sep 4, 2010
I just read the developer blog post about non-phone Android devices such as tablets and GoogleTV - http://android-developers.blogspot.com/2010/09/brace-for-future.html.
I'm writing an accelerometer-based game and would like to filter for devices that have an accelerometer (or orientation sensor). Is there a way to do that? It would also be useful to filter for devices with a compass or GPS receiver.
View 2 Replies
View Related
Aug 10, 2009
My application has a ListView displaying some items that are associated with different documents:
CODE:..........
The ListView implements an OnItemLongClickListener and displays the available document types as follows:
CODE:...............
I would like to modify onPrepareDialog to filter the dialog to display only the document types relevant for the long clicked item (like a context menu except that some long clicks will perform a different task: expand or collapse the hierarchy displayed in the custom ListView). For example, if an item is long clicked that is associated with only document types A and B, I would like the dialog to avoid displaying document types C and D as dialog items? However, looking at R.java, it is not clear to me what the id of an individual item in the select_doc_dialog_items array would be.
How to use onPrepareDialog() to filter displayed dialog items?
View 2 Replies
View Related
Oct 28, 2009
How do I filter noise of the accelerometer data in Android? I would like to create a high-pass filter for my sample data so that I could eliminate low frequency components and focus on the high frequency components. I have read that Kalman filter might be the best candidate for this, but how do I integrate or use this method in my application which will mostly written in Android Java? or can it be done in the first place? or through Android NDK? Is there by any chance that this can be done in real-time?
View 4 Replies
View Related
Jul 27, 2010
I want to filter the ListView which containing both contact name and phone number... how do i filter the list.....please provide me the code(mainly for the filtering code)
View 1 Replies
View Related
Nov 23, 2009
On android i have big listview which has to support filtering. For now my implementation is the following. EditText and TextWatcher to listen for text changes. All data is stored in db and when there is event for TextChange fetch a cursor and set new CursorAdapter to the listview. I use AsyncTask to query the db and to update the gui.
View 2 Replies
View Related
Mar 21, 2010
The problem is that when I filter the list the entries switch position in the list view. Take for example three entries: 'A', 'B' and 'C' where 'C' is checked beforehand (i.e. the entry at position 3 in the list). When I type a 'C' on the keyboard, only the 'C' entry is displayed (as intended). Now 'C' is not checked anymore, since the entry has moved from the checked position 3 to the unchecked position 1 in the list.This behavior leads to some not very welcome effects in the app. Is there a way to "move the selection with the filtering", i.e. bind the checked state to the entry and not to its initial position in the list? Or do I need to find a new approach?
View 1 Replies
View Related
May 12, 2010
I have a ListActivity based on an ArrayAdapter with setTextFilterEnabled set to true. This works fine on a device with a physical keyboard. When I start typing something on the keyboard, the items get filtered.My question is how to get the same behavior on a device with no physical keyboard?
View 1 Replies
View Related
Feb 6, 2010
I'm registering an intent-filter on an activity to listen for url clicks from a certain domain:
CODE:.............
This works, but is there a way to filter out certain urls from my domain? For example, my app can only do something useful for the user if it gets a url like: www.mywebsite.com/orange
But if the user clicks on a link like: www.mywebsite.com/blue
I can't do anything useful for them, so I'd like to just let them continue using the browser to open that url. Is there a way I get a chance to see the URL before android pops up the chooser dialog and presents my app as a possible handler for the url? Is there some method in Activity which allows me to filter?
View 3 Replies
View Related
Jun 10, 2012
I am looking for a firewall that allows setting rules for individual apps, for example allow an application to connect to [URL] and nothing else. The firewalls I've tested so far (like avast! Mobile Security) only allow the selected application to connect or not, but not filtering by url, domain, ip or such.
The only firewall I've heard of is WhisperMonitor, and is not public yet. Furthermore, it is supposed to require device encryption.
View 1 Replies
View Related
Sep 23, 2010
My application uses a list of media files on the phone, i.e. images, audio and video. It also allows the user to filter the list via some checkboxes in a menu, so the user can choose to show or hide each type of files. The way I've been doing this is by putting this in the adapter's getView():
// don't show unwanted file types if (cmo.hasType(MediaType.AUDIO_FILE)){
if(!prefs.getBoolean(PREFS_SHOWAUDIO, true)){ return new ViewStub(mContext);;
} }else if(cmo.hasType(MediaType.IMAGE_FILE)){ if(!prefs.getBoolean(PREFS_SHOWIMG, true)){
return new ViewStub(mContext);;
} }else if( cmo.hasType(MediaType.VIDEO_FILE)){ if(!prefs.getBoolean(PREFS_SHOWVIDEO, true)){ return new ViewStub(mContext);; } }
Which is quite effective in the sense that the list doesn't show those elements. However, the ListView still renders a 1px grey line between each View, even if they are ViewStubs, meaning I see a thick gray line whenever a group of consecutive items are filtered away. How can I get rid of those lines? Should I create a new data array, containing only the elements that should show a view?
View 1 Replies
View Related
Sep 29, 2009
I am trying to change the items in a list view based on a value that gets selected in a spinner that is in the same activity. Is there a quick way to do filtering on the list adapter data based on that value, or should I go the long way of changing my adapter implementation for easy filtering?
View 2 Replies
View Related