Search Results

Search found 12892 results on 516 pages for 'android sqlite'.

Page 84/516 | < Previous Page | 80 81 82 83 84 85 86 87 88 89 90 91  | Next Page >

  • android Json show only lasy item

    - by 03uk
    i have one problem, my json parser show only last item! But at Logcat i see all item's! Can you help me? @Override protected void onPostExecute(JSONObject result) { super.onPostExecute(result); Log.d("Log", result.toString()); JSONObject jsn = result; try { JSONArray jarray = jsn.getJSONArray("item"); for (int i = 0; i < jarray.length(); i++){ JSONObject jsno = jarray.getJSONObject(i); title.setText(Html.fromHtml("<a href=\""+jsno.getString("link")+"\">"+jsno.getString("title")+"</a>")); cat.setText(jsno.getString("category")); date.setText(jsno.getString("pubDate")); desc.getSettings().setJavaScriptEnabled(true); desc.getSettings().setDefaultTextEncodingName("charset=UTF-8"); desc.loadData(jsno.getString("description"), "text/html; charset=UTF-8", "utf-8"); } } catch (JSONException e) { e.printStackTrace(); }

    Read the article

  • MapView without Zoom Levels Android

    - by RyanInBinary
    I'm using the MapView object for my app and it's working really well. But I noticed that it "locks" to zoom levels, even if you don't use them. For instance, if you pinch to zoom and barely do it, the view will "snap" either forward or backward to whatever the closest zoom level is. The native google maps application does not do this at all. You can barely pinch, and it'll accept it (there are no 'hard' zoom levels built in). How can I get my mapview to mirror that?

    Read the article

  • How to run "android.bat sdk" in Window 7

    - by user1730495
    I have downloaded and installed Android SDK and tried to start android.bat sdk but got following exception: C:\products\Android\tools>android.bat sdk Exception in thread "main" java.lang.UnsatisfiedLinkError: no swt-win32-3550 or swt-win32 in swt.library.path, java.library.path or the jar file at org.eclipse.swt.internal.Library.loadLibrary(Unknown Source) at org.eclipse.swt.internal.Library.loadLibrary(Unknown Source) at org.eclipse.swt.internal.C.<clinit>(Unknown Source) at org.eclipse.swt.widgets.Display.<clinit>(Unknown Source) at com.android.sdkmanager.Main.showSdkManagerWindow(Main.java:328) at com.android.sdkmanager.Main.doAction(Main.java:302) at com.android.sdkmanager.Main.run(Main.java:118) at com.android.sdkmanager.Main.main(Main.java:101) I have searched for solution a long time but I cannot get it to work. Is there anything I have to set up first?

    Read the article

  • How to create horizontal menu in android ?

    - by sohilv
    Hello Friends, I am working on horizontal menu that will open on top of the screen. Layout is something like following, || < || Menu Item1 || Menu Item2 || Menu Item3 || || I want to put this on top of the screen. It can have more than 3 menu item and it can traverse through previous and next arrow. I started with like this, RelativeLayout ( width - fill_parent) Gallery View ( Here i appended adapter ) There is two problem, - Gallery view contains the space before and after - While scrolling its item gets selected Though its not ideal solution for this. How can i build custom component like this ? Any help appreciated. Thanks

    Read the article

  • Android & Google Maps - close info window with back button

    - by m4ch3t3
    I have an activity that holds a fragment with Google Map view in it. App adds several dozens of markers to the MapView, using MarkerManager and ClusterRenderer to form clusters. The problem is that when I have marker's InfoWindow opened and I press hardware Back button, it closes the app. Instead of that, I would like to have the InfoWindow closed. Is there any straightforward way to achieve this?

    Read the article

  • Android emulator-5554 offline

    - by hanesjw
    I'm having a problem with emulator-5554, it keeps telling me it is offline. When I do a 'adb devices' from the command line it says emulator-5554 offline Even after a fresh restart, I try that command and it still says it is offline. The problem is when I try to install .apk files to the emulator using 'abd install path' from the command prompt, it tells me that it is offline, if I create another device and run that one, then try to install the .apk files, it says i have too many devices connected. So in other words, I can't install my .apk files. How in the world can I get rid of that damn emulator-5554? I heard that if you do a restart, it should clear all the devices, but that does not seem to be working. It is like it is getting initialized when my computer starts up. Has anyone run into this issue? Thanks

    Read the article

  • android drawable changes sizes on screen when reading image from file

    - by Daniel Benedykt
    Hi I have an image on a private file. I read the file, create the drawable, and assign it to an ImageView. The ImageView has WRAP_CONTENT so the size is automatic. On 320x480 screens, the image looks good But on screens with more resolution and high density 480x800 or 480x854 (N1, droid) , when the image is for example 150x150, I see the image as 100x100. Of course it has something to do with the density but not sure how should I resolve this. This is my code: FileInputStream fis = this.openFileInput("icon.png"); icon = Drawable.createFromStream(fis, "icon"); fis.close(); imageView.setImageDrawable(icon); thanks

    Read the article

  • Options for organizing android app with multiple independent apps

    - by lazyguy
    Problem Definition: We have a fairly large app which has multiple use cases such that they are all independent of each other. For example lets say we have a1, a2, a3 & a4 modules that are independent apps or use cases for our main app 'A'. The independent a1, a2, a3, a4 are all purchasable apps such that the user goes to our website instead of play store and activate either a1 or a2 by paying some fees on our website. So basically App 'A' is a free app in play-store and is sort of Dashboard with buttons to launch a1, a2, a3, a4. When the user click on lets say a1 button then we will check if a1 is already installed and launch it but if it is not present then give the user a link to download it. Option 1: Have a main app 'A' and a1, a2, a3, a4 as library project. But with this approach the main app A is too big in size. Option 2: Have a1, a2, a3, a4 build as separate .apk and then put in the assets folder of main app 'A' and then install them as needed. Again size of main app A is bigger. Option 3: Upload a1, a2, a3, a4 to a third party website or play store and download from it as needed. This way the main app remains lighter. Observation: In all these approaches there will be an independent app installed with its own icon on users phone. So basically user can launch from either the Dashboard (which will eventually launch an intent from Activity in a1 app) or user can directly launch app a1. Follow-up Question: Is there any other solution that anyone can suggest to tackle this kind of problem? Another things is by going this approach app a1, a2, a3, a4 can be developed & tested independently of each other.

    Read the article

  • Android ListView Item Visibility

    - by user1478754
    I'm trying to create a screen that displays multiples items. For this, I've created a listview but I'm not sure how to approach how to add/remove items from it. Since I'm using custom listview items, I've created my own listadapter but now I need a way to add items on a button click. Is there a way to create listview that can take an indefinite amount of items (instead of passing it in an fixed length array of View objects)? Also what's the best way to remove items from listviews? setVisibility?

    Read the article

  • Suggestions on search in android?

    - by Praveen Chandrasekaran
    i can implement the QSB on my app using onSearchRequested() method.i have 4 column in my table. when i was type in the QSB. it will give some suggestions on the Suggestion window. how to do that? searchable dictionary example shows the dictionary provider class to retrive the suggestions. but on that no data inserted. then how they getting the suggestions. can you explain me what are the steps we have to follow or tutorials, sample codes are most thankful.

    Read the article

  • important question on Android 2.2

    - by poeschlorn
    Hi guys, I've just updated my nexus one to 2.2...now all of my (own and some from the market) apps throw exceptions and were closed... It's weird, in the app i'm developing atm, there it displays only my start page with buttons, but when i tap on one button to fire an intent to another activity my app gets closed with an exception. Yesterday before the update everything worked fine... The same thing in my emulator: I have two devices, one with API level 7 and one with level 8...Level 7 worked fine, but level 8 killed my app :( What is the problem and how can I solve this? I'm desperatly trying to get it working again :( I hope someone can help me fixing this

    Read the article

  • Make service indepented from activity (Android).

    - by shuwo
    I have an activity with two buttons, start and stop. If the user press the start button a service is created using Context.startService. And the stop button calls Context.stopService. I want the stop button to be the only way to destroy the service. Now, if i end the activity using a task manager, the service is killed as well. Is there any way to avoid this?

    Read the article

  • Android reset activity component state on navigation back

    - by Aure77
    I have 2 activities in my application. In activity1, I set some configuration and I modify the state of some component (ex: set button state disabled). And I navigate to activity2. In activity2 I do some stuff and at end, I finish this activity and come back to activity1. But In activity1, my components state are the same when I leave this activity. How to reset the components state with valuesdeclared in XML file (layout) ?

    Read the article

  • what EVENT LISTENER should i use for my android app

    - by Mithraa
    In my app, when one particular image button is clicked and held, i must be able to calculate the time for which the image button was held pressed. Can any one help me by giving some simple guidance or sample code. i am really stuck up here. Is there any specific event listener for this particular requirement.

    Read the article

  • Android AutocompleteView OnClickListener

    - by Chirag_RB
    I have 2 Auto Complete Views which i have to pre-populate with some text .However as soon as user clicks on the views , the text should disappear and allow user to enter text . I have written two separate on click listeners to do so . The On click listener for the first one is working fine . However i have to double click for the On click listener of the second one to work. Please find the chunk of code below and come up with some solution . final AutoCompleteTextView source = (AutoCompleteTextView) findViewById(R.id.source); ArrayAdapter source_adapter = new ArrayAdapter(this, R.layout.list_item, Model.City); source.setAdapter(source_adapter); source.setOnClickListener(new OnClickListener(){ public void onClick(View v) { source.setText(""); source.setTextSize(14); } }); final AutoCompleteTextView destination = (AutoCompleteTextView) findViewById(R.id.destination); ArrayAdapter destination_adapter = new ArrayAdapter(this, R.layout.list_item, Model.City); destination.setAdapter(destination_adapter); destination.setOnClickListener(new OnClickListener(){ public void onClick(View v) { destination.setText(""); destination.setTextSize(14); } });

    Read the article

  • How to create a generic Android XML layout for all activities

    - by zabawaba
    I have an application that needs the same items [5 buttons acting as tabs] in every screen. Is it possible to create a "base XML layout" that has these 5 buttons and then have all the other XML files extend from the bas layout in some way so that I don't have to have multiple buttons that will ultimately have the same functionality. Is there a better approach to this problem that can be supported by API 9

    Read the article

  • Creation of AsyncTask taking too much time Android

    - by user2842342
    I am making a network call in an AsyncTask, but the problem i am facing is the amount of time it is taking to start the doInBackground method. Here is a part of my code: button.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Log.d("Temp:",System.currentTimeMillis()+""); new Move().execute(); /*some other logic } } And my AsyncTask is: private class Move extends AsyncTask<Void, Void, Void> { @Override protected Void doInBackground(Void... temp) { Log.d("start:",System.currentTimeMillis()+""); gson.fromJson(Web.Request.get(some_URL),Void.class); Log.d("end:",System.currentTimeMillis()+""); return null; } } These are the logs i got: 32658-998/com.example.game D/temp:? 1408923006159 32658-998/com.example.game D/start:? 1408923035163 32658-998/com.example.game D/end:? 1408923035199 So actually it took almost 29 secs to reach the first line in doInBackground method, where as it took just 36 ms to finish the network call. I tried it many times, the time taken is almost in the same order. Is it possible to start the AsyncTask immediately? Or is there any other way to solve this problem.(other than a running a simple thread?) Thank you :)

    Read the article

  • Android Service Testing with messages

    - by Sandeep Dhull
    I have a service which does its work(perform network operation) depending upon the type of message(message.what) property of the message. Then it returns the resoponse, also as a message to the requesting component(depending upon the message.replyTo). So, i am trying to write the testcases.. But how????? My Architecture of service is like this: 1) A component(ex. Activity) bounds to the service. 2) The component sends message to the Service(using Messenger). 3) The service has a nested class that handles the messages and execute the network call and returns a response as message to the sender(who initially sent the message and using its replyTo property). Now to test this.. i am using Junit test cases.. So , in that .. 1) in setUp() i am binding to the service.. 2) on testBusinessLogic() . i am sending the message to the service .. Now problem is where to get the response message.

    Read the article

  • Android how to match text with images by pointing text and images with lines

    - by Shirisha
    I am trying to create app which is match text with appropriate images by pointing with line. I want to create app exactly same which is shown in the below image: can any one please give me an idea? This is my main class: public class MatchActivity extends Activity { ArrayAdapter<String> listadapter; float x1; float y1; float x2; float y2; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); String[] s1 = { "smiley1", "smiley2", "smiley3" }; ListView lv = (ListView) findViewById(R.id.text_list); ArrayList<String> list = new ArrayList<String>(); list.addAll(Arrays.asList(s1)); listadapter = new ArrayAdapter<String>(this, R.layout.rowtext, s1); lv.setAdapter(listadapter); GridView gv = (GridView) findViewById(R.id.image_list); gv.setAdapter(new ImageAdapter(this)); lv.setOnItemClickListener(new OnItemClickListener() { public void onItemClick(AdapterView<?> arg0, View v, int arg2, long arg3){ x1=v.getX(); y1=v.getY(); Log.d("list","text positions x1:"+x1+" y1:"+y1); } }); gv.setOnItemClickListener(new OnItemClickListener() { public void onItemClick(AdapterView<?> arg0, View v, int arg2, long arg3){ DrawView draw=new DrawView(MatchActivity.this); x2=v.getX(); y2=v.getY(); draw.position1.add(x1); draw.position1.add(y1); draw.position2.add( x2); draw.position2.add(y2); Log.d("list","image positions x2:"+x2+" y2:"+y2); LinearLayout ll=LinearLayout)findViewById(R.id.draw_line); ll.addView(draw); } }); } } This is my drawing class to draw a line: public class DrawView extends View { Paint paint = new Paint(); private List<Float> position1=new ArrayList<Float>(); private List<Float> position2=new ArrayList<Float>();; public DrawView(Context context) { super(context); invalidate(); Log.d("drawview","In DrawView class position1:"+position1+" position2:"+position2) ; } @Override public void onDraw(Canvas canvas) { super.onDraw(canvas); Log.d("on draw","IN onDraw() position1:"+position1+" position2:"+position2); assert position1.size() == position2.size(); for (int i = 0; i < position1.size(); i += 2) { float x1 = position1.get(i); float y1 = position1.get(i + 1); float x2 = position2.get(i); float y2 = position2.get(i + 1); paint.setColor(Color.BLACK); paint.setStrokeWidth(3); canvas.drawLine(x1,y1, x2,y2, paint); } } } Thanks in advance .

    Read the article

  • Could not cancel the notifications in android

    - by banti
    I have the Problem when user press the Notification activity is open but notification can not be close help me my code is NotificationManager mNotificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); int icon = R.drawable.ic_launcher; CharSequence tickerText = "Good Morning"; long time = System.currentTimeMillis(); Notification notification = new Notification(icon, tickerText, time); Context context = getApplicationContext(); CharSequence contentTitle = "Title"; CharSequence contentText = "Text"; Intent notificationIntent = new Intent(this, NotificationManagerDemoActivity.class); PendingIntent contentIntent = PendingIntent.getActivity(this, 0, notificationIntent,0); notification.flags = Notification.FLAG_AUTO_CANCEL; notification.setLatestEventInfo(context, contentTitle, contentText, contentIntent); mNotificationManager.notify(1,notification);

    Read the article

  • Getting the number of frames from a video in Android

    - by Jay Patel
    I want to get the number of frames from a video. I'm using the following code: package com.vidualtest; import java.io.File; import java.io.FileDescriptor; import android.app.Activity; import android.graphics.Bitmap; import android.media.MediaMetadataRetriever; import android.os.Bundle; import android.os.Environment; import android.widget.ImageView; public class VidualTestActivity extends Activity { /** Called when the activity is first created. */ File file; ImageView img; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); img = (ImageView) findViewById(R.id.img); File sdcard = Environment.getExternalStorageDirectory(); file = new File(sdcard, "myvid.mp4"); MediaMetadataRetriever retriever = new MediaMetadataRetriever(); try { retriever.setDataSource(file.getAbsolutePath()); img.setImageBitmap(retriever.getFrameAtTime(10000,MediaMetadataRetriever.OPTION_CLOSEST)); } catch (IllegalArgumentException ex) { ex.printStackTrace(); } catch (RuntimeException ex) { ex.printStackTrace(); } finally { try { retriever.release(); } catch (RuntimeException ex) { } } } } In getFrameAtTime() I'm passing different static time values like 10000, 20000, etc. in milliseconds, but still I'm getting the same frame from the video. My goal is to get different frames with a different time interval.

    Read the article

  • Sync Local ICS File with Android via Exchange/Outlook

    - by sinDizzy
    At my company we have a 3rd party app which tracks off-hours duty for all of our engineers. The app is not web-enabled and we cannot make any changes to it. It does write a simple text file and I have created an app that translates that to an ICS file. My goal is to have that appear on my calendar on my Android phone. Here is the path I am working on: DutyApp -- TextFile -- ICSFile -- Outlook(exchange) -- Android (via exchange sync) My problems: If I place the ICS file on our FILE server and then in Outlook if I go to the option CalendarOpen CalendarFrom Internet it shows up in Outlook and looks pretty good. After a couple minutes it shows up on my Android phone as well. If I change the original ICS file those changes never display in Outlook and never sync to my Android phone. This seems to be a one shot deal almost like an import. Now if I place the ICS file on our WEB server and then in Outlook if I go to the option CalendarOpen CalendarFrom Internet and use webcal:\ as the address, it shows up in Outlook and also looks pretty good. Any changes I make to the original ICS file display in Outlook. However the entire calendar never shows up in Android. This calendar is a subscription and it seems, although am not sure, that Android doesn't display Exchange subscription calendars. Yes I know it works with Gmail subscription calendars but this is Exchange. So my question is what other options are there? We are behind a firewall so cant link the ICS file to a Gmail account. I can't put the ICS file anywhere else other than our file or web server.

    Read the article

  • Todo/task manager for android and desktop linux

    - by RiaD
    I'm looking forward to Task/ToDo Manager. It should work under Android, Linux(or Web). If it's very cool, one of them is OK too, Android is preferable in this situation. Necessary features: Russian or English language Possibility to mark task as finished Interesting features: (I want as more, as possible, while it's OK, if some of them isn't avaliable) Nice and easy-to-use interface Possibility to choose finish time for task. After that it's showed as overdue. Possibility to choose start time for task. Before it task is inactive and maybe shown or hide Possibility to add nested tasks. Task marks completed when all sub-tasks are completed. Possibility to make dependencies. If A depends on B, and B isn't finished yet, A is inactive as in third feature. Possibility to create task in a moment without fill-all-this-forms Syncronization between version(Android to linux or Android to web) Notification (on Android only) Features, that I'm not interested in: Creating more than one todo list sharing ToDo's I've seen couple of managers. Best I've seen now is Task Coach for Linux, but I don't very like its interface, and there is no version for Android.

    Read the article

< Previous Page | 80 81 82 83 84 85 86 87 88 89 90 91  | Next Page >