What is the difference between the three drawable folders in the res folder in the project hierarchy? If I have an image to put into a folder, which folder do I put it in?
Hello,
When i try to shorten a link with "#,&" Character i got an exception.
is there a way to handle them .
this is a sample of code that works
String shortUrl = bitly.getShortUrl("http://z"); //Works
but if i add for example '&' or '%25' to the string it will produce exption :
- String shortUrl = bitly.getShortUrl("http://z%26"); //…
I have a form with 2 fields where you can enter in either months or years. How do I setup the form so that if you enter in the years, the months edittext field will be automatically calculated and entered into it's own box. Likewise, I want the years to be calculated if you entered in the months
Can anyone give me sample code for this?
First off, my application currently defines anyDensity=false in the manifest file. Elsewhere in the app, I'm trying to capture and display a View's DrawingCache but I'm not able to get a clear Bitmap without scaling artifacts.
The code below yields a Bitmap but it has scaling artifacts and is generally fuzzy.
myView.setDrawingCacheEnabled(true);…
Hi,
I am using expandable listview i need to refresh as i am searching the list only for parent.I have searched for tutorial in which i can set visibility only for some parent but not all the expandable listview object .
Thanks in advance.
I'm setting out to create a settings activity for my app. I've defined a PreferenceActivity with a nice layout including a ListPreference object for the user to select a bluetooth device. I'm having trouble dynamically populating the list.
I would like to populate ListPreference with values from an array adapter (which I'll create and populate…
I'm trying to implement paging in a custom ListAdapter. Right now I'm just making the request for the next page when the last item in the ListView becomes visible, by checking in getView() if position is >= the size of ListAdapter.getCount().
It works fine, but I'm wondering if there's a better way (or a different way) that will only…
Hi!
Sometimes when trying to get the Latitude span or Longitude span of a mapview with getLatitudeSpan() and getLongitudeSpan() I get 0 and 360*1E6 respectively. This doesn't happen always but it is a problem, has anybody got this problem? Any workarounds? I tried using getProjection() too but I get the same problem. Here is the piece of…
I am using some list item layout and in the item layout, there is a Viewstub where I want to put some image in.I don't have the source of list item layout and just know there are some TextViews and ViewStubs in it.
My purpose is to find the ViewStub first and set my personal layout and play with it. However, some of the ViewStub cannot…
Hello,
I've been successfully testing my app which sends a text message to another phone number. The problem came when I sent this to a buddy that has the NEXUS ONE. I added a pending intent to sendTextMessage() and saw I'm hitting: RESULT_ERROR_GENERIC_FAILURE.
Any ideas?? Thanks,
Jonathan
I am trying to do POST with HttpURLConnection(I need to use it this way, can't use HttpPost) and I'd like to add parameters to that connection such as
post.setEntity(new UrlEncodedFormEntity(nvp));
where
nvp = new ArrayList<NameValuePair>();
having some data stored in. I can't find a way how to add this ArrayList to my…
I'm having trouble with a WebView always filling the full screen and thus covering my tabs. Here is my code for the tabhost..
public class tabNZBMobile extends TabActivity {
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
…
Hi,
I have a listview in which there should be different divider height
between different rows. So, how can we set the divider height
dynamically?
Suppose, I have 10 rows and there should be a divider height of 5
between first 2 rows and then there should be a divider height of 1
between next 5 rows and so on.
Can someone…
I have a PreferenceActivity with a bunch of (Sub)PreferenceScreens. Each such (Sub)PreferenceScreen represents an account and has the account-username as its title.
PreferenceScreen root = mgr.createPreferenceScreen(this);
for (MyAccountClass account : myAccounts) {
final PreferenceScreen accScreen =…
I'm attempting to change the background image of a custom View with some success. The image will change but the problem is that I still see traces of the old image. When I attempt to clear the canvas before drawing the new image, it doesn't appear to work. I create a bitmap to store the image. When…
I have an application that calls a function to send JSON object to a REST API, my problem is how can I handle time delays and repeat this function till i have a response from the server in case of interrupted network connexion ??
I try to use the Handler but i don't know how to stop it when i get a…
My question is why this query does not work?
Cursor c = db.rawQuery("SELECT * FROM tbl_staff WHERE PMajor = '%" + spin.getSelectedItem().toString() + "%'", null);
Cursor c: it is a cursor for handling my query
tbl_staff: my table that consist of PName,PMajor,PCert
spin: is…
Hi
I have this code on my andriod phone.
URI uri = new URI(url);
HttpPost post = new HttpPost(uri);
HttpClient client = new DefaultHttpClient();
HttpResponse response = client.execute(post);
I have a asp.net webform application that has in the page load this
…
Is there a way to make LogCat's output to appear in Console view in Eclipse?
LogCat view is much less convenient that Console, because it's hard to see long messages in it (they are trimmed by column border) and there are no clickable highlighting in exception stack traces…
Hi,
I have multiple ListViews and would like to add those to Gallery.
I tried with addView but it is not supported since Gallery view is an AdapterView.
Can someone let me know how to go about it?
Regards
Sunil
Hi,
I have created an apk which has activities. I have included tabs in my program through which the user can select the required activity. But my main problem is that i couldnt find a way to display the tabs throughout the application. For example, on clicking a tab the…