Search Results

Search found 242 results on 10 pages for 'spinner'.

Page 9/10 | < Previous Page | 5 6 7 8 9 10  | Next Page >

  • Custom Attributes in Android

    - by Arun
    I'm trying to create a custom attribute called Tag for all editable elements. I added the following to attrs.xml <declare-styleable name="Spinner"> <attr name="tag" format="string" /> </declare-styleable> <declare-styleable name="EditText"> <attr name="tag" format="string" /> </declare-styleable> I get an error saying "Attribute tag has already been defined" for the EditText. Is it not possible to create a custom attribute of the same name on different elements?

    Read the article

  • Keep a Google Maps v3 Map Hidden, show when needed

    - by Dr1Ku
    Is there a way of preventing Google Maps (JS, v3) of being displayed from the get-go ? I do some pre-processing and would like to show my 'Loading' spinner until everything is good to go (more eloquently put, hide the map -- e.g. the container div -- until all preprocessing is complete -- at which point, show the map). Hooking to the map's 'idle' event doesn't help that much, since the map is already displayed when this event hits. I know that the container div gets inline-styled by GMaps after loading, my first idea is to clear out the style attr (whilst listening to 'idle'), but it would be interesting to see if there is a way of creating the map and not displaying it until all pre-processing is done. Maybe by using an argument to the new google.maps.Map constructor, or a MapOption ? Any thoughts on this ? Thank you in advance !

    Read the article

  • Android changing colors with themes

    - by miannelle
    I am trying to provide user settable colors in my app. White text on black background and black text on white background. I have multiple layouts with many listviews, both standard and custom adapters. People have suggested using Themes, but I have had no luck changing the text colors across all layouts. Can anyone show me an actual Theme layout that can accomplish this? I can easily change the background colors using myscreen.setBackGroundColor(xx), but when I try to change the text with a theme, it also changes spinner text as well.

    Read the article

  • How to deal with callback to your UIController after your UIController unloads?

    - by erotsppa
    Suppose your controller is a table view and one of the cells you are going off to do a length task (say download a thumbnail) to be viewed in the cell. Typically you would have the network call do a callback to your controller when it is done downloading. The callback can then reload the table or do some other form of UI update (hides a spinner etc). However, what if the controller is unloaded? Say the user navigated away from this controller and it got released? What happens? Will the callback still work despite the controller now not in memory? Also, if the callback operates on some objects (say the UITableView) what happens when the controller is deallocated? I suppose the controller can release all the objects and the callback would just be calling methods on nil to prevent crash. But is this the convention?

    Read the article

  • Delete/move a UITableView row that's attached to a web service.

    - by Kevin L.
    Deleting or moving rows for a UITableView that is backed with local data (e.g., NSArray) is easy and instantaneous: Remove the value from the array. Call deleteRowsAtIndexPaths:withRowAnimation:. Profit! But my table view communicates with a web service, which means once the "Delete" button on that row gets tapped, I have to forward a request on to the server (via ASIHTTPRequest, of course), get the response, and then tell the table view to run its little delete-row animation, all with a few seconds of latency in between. From a high-level, what's the best way to do that? Throw some callback selector into ASIHTTPRequest's userInfo dictionary? KVO? Bonus points for some nice UI touch, like some kind of spinner on the soon-to-be-deleted cell.

    Read the article

  • Fetch and load a whole page with AJAX

    - by nimo
    I realize that it's generally not a good idea to do this but the reason why I want to is because it's a really heavy page and I want to show the user progress of the download and when it's done load the page. I can either do this with some kind of spinner but is it possible for me to show the actual progress? Can I see how much and what data has been downloaded? Let's say I use jQuery for the AJAX-request how do I do this? If you have other suggestions please feel free to suggest.

    Read the article

  • allow waiting user experience while file upload with rails and jquery

    - by poseid
    I am trying to display a waiting spinnger, while uploading a file. I am able to show the spinner, and to do the upload, when doing it individually. My problem is how to combine these two. The Jquery Javascript looks like: <% javascript_tag do %> function showLoading() { $("#loading").show(); } function hideLoading() { $("#loading").hide(); } function submitCallback() { showLoading(); $.post("create"); } <% end % My form looks like: <% semantic_form_for @face, :html => {:multipart => true} do |f| %> <%= f.error_messages %> <%= render 'fields', :f => f %> <p> <%= button_to_function 'create', "submitCallback()" %> </p> <% end %>

    Read the article

  • How to store double using SharedPrefrences?

    - by user3924167
    I am having trouble storing a double in the phone's memory. What are my other options if this isnt possible. Basically what the code is aiming to do using sharedprefrences is take the stored value of "Alcohol" spending and then add whatever the input is in the editText to it and then store that new value for the next time. Running total of spending on alcohol **Can someone please help with this issue and be detailed where x y & z should go in the project. The user selects from a spinner, which works. public void addInput(){ double dblCostInput = Double.valueOf(inputBox.getText().toString()); String strCategories= spinnerCategories.getSelectedItem().toString(); if(strCategories.equals("Alcohol")) { alcoholSpend = alcoholSpend + dblCostInput; inputBox.setText(""); nextInput(); inputBox.setText("Your Spending on"+strCategories+" is: " +d.format(alcoholSpend)); }

    Read the article

  • Hard drive causing BSOD

    - by JoshIrving
    I've come across a problem after building my new PC and installing a clean Windows 7. I originally planed on a RAID 1 or 0 but after further research I decided against it. So I was left with two 1TB Western Digital Black SATA 6Gb/s hard drives. My plan now was to use my second hard drive as a backup (using Windows Backup or 3rd party software). I set both hard drives to AHCI in the BIOS and installed Windows 7. I went through the lengthy process of downloading and installing each driver manually (latest versions), using the motherboard disk for a list of what I need. After a few restarts and before installing any software, I took an image backup onto DVD and the second hard drive. First witnessed the problem during the first scheduled Windows backup. The progress bar froze at about 70% (doc backup done, image backup in progress). It stayed still for 2 hours until it blue screened. Next time the backup froze, I tried shutting down. It logged me out and got stuck at the last step ("Shutting down" and blue spinner) for an hour, until I hard shutdown. I later realised this hasn't got anything to do with the backup. I ended up blue screening on almost every shut down (same place). Turns out, it's because of the second hard drive spinning down or turning off. The computer will now shutdown properly, as long as I remember to read or write to the second drive before executing shutdown. I've now set "Turn off hard disk after: Never" - No problems, so far. Do I have dodgy hard drive(s) or should I investigate the POWER_STATE_DRIVER_FAILURE BSOD - can it be a driver issue? AHCI?

    Read the article

  • Windows 8 install from USB freezes

    - by Rafael Almeida
    I'm trying to install Windows 8 from an 8GB Kingston Data Traveler. I'm currently using the Windows 7 USB DVD Download Tool to put the iso into the flash drive. It copies the files, but in the end it says it 'had a problem with bootsect' and could not make the flash drive bootable. This seems to be because my current system is Windows 7 32bits, and the bootsect.exe in the ISO is a 64-bit executable. Then I downloaded the 32-bit bootsect.exe and made the drive bootable by running: bootsect /nt60 E: /mbr Then I restarted and managed to boot via the flash drive, but now everything is very slow. It takes about two minutes for the initial black screen with the Windows logo and the spinner go away, then it goes to a purple-ish blank screen that stays on for about five more minutes and then it finally shows a dialog asking for the installation, date/time and keyboard languages. I input then, click "Install Now" and it takes about three more minutes with a "Setup is starting" screen. After that, the PC apparently reboots, the CPU fan speeds up considerably, and there's no video and nothing more happens even after more than ten minutes. What is happening? I already tried using another USB port and even installing from a Samsung G3 Station 2TB external hard disk, but the same thing happens. The file transfer speed to the Kingston drive was about only 3 megabytes per second.

    Read the article

  • Hard drive causing BSOD

    - by JoshIrving
    I've come across a problem after building my new PC and installing a clean Windows 7. I originally planed on a RAID 1 or 0 but after further research I decided against it. So I was left with two 1TB Western Digital Black SATA 6Gb/s hard drives. My plan now was to use my second hard drive as a backup (using Windows Backup or 3rd party software). I set both hard drives to AHCI in the BIOS and installed Windows 7. I went through the lengthy process of downloading and installing each driver manually (latest versions), using the motherboard disk for a list of what I need. After a few restarts and before installing any software, I took an image backup onto DVD and the second hard drive. First witnessed the problem during the first scheduled Windows backup. The progress bar froze at about 70% (doc backup done, image backup in progress). It stayed still for 2 hours until it blue screened. Next time the backup froze, I tried shutting down. It logged me out and got stuck at the last step ("Shutting down" and blue spinner) for an hour, until I hard shutdown. I later realised this hasn't got anything to do with the backup. I ended up blue screening on almost every shut down (same place). Turns out, it's because of the second hard drive spinning down or turning off. The computer will now shutdown properly, as long as I remember to read or write to the second drive before executing shutdown. I've now set "Turn off hard disk after: Never" - No problems, so far. Do I have dodgy hard drive(s) or should I investigate the POWER_STATE_DRIVER_FAILURE BSOD - can it be a driver issue? AHCI?

    Read the article

  • NGINX + PHP-FPM - Strange issue when trying to display images via php-gd / readfile - Connection wont terminate

    - by anonymous-one
    Ok, to get the details out of the way: The php script can be anything as simple as: <? header('Content-Type: image/jpeg'); readfile('/local/image.jpg'); ?> When I try to execute this via nginx + php-fpm what happens is the image shows up in the browser, here is what happens: IE - The page stays blank for a long period of time, and eventually the image is shown. Chrome - The image shows, but the loading spinner spins and spins for a long period of time. Eventually the debugger will show the image in red as in error, but the image shows up fine. Everything else on the server works great. Its pushing out about 100mbit steady serving static content. So this is definatly a php-fpm related issue. I THINK this may have something to do with the chunked encoding being sent back wrong? Also, I threw in a pause before the image was read, and got the pid of the fpm process, and it looks as tho its terminatly correctly (from strace): shutdown(3, 1 /* send */) = 0 recvfrom(3, "\1\5\0\1\0\0\0\0", 8, 0, NULL, NULL) = 8 recvfrom(3, "", 8, 0, NULL, NULL) = 0 close(3) = 0 The above was dumped long before ie/chrome decided to give up (even tho the image was shown) loading the image. Displaying HTML / text content is fine. Big bodies etc all load nice and fast and terminate right away (as they should). Doing something like: THIS IS THE IMAGE ---BINARY DUMP OF IMAGE--- Works fine too. Any ideas?

    Read the article

  • How to sort & Group in Android?

    - by crickpatel0024
    I have ArrayList and I want to sort and group all data by header in Android. How it is possible in Android? please help me.below me from owner And set header Me And Joe Manager From owner And set Header in listview. How to do that in Android? My code in below:: public class Request extends Activity { private String assosiatetoken; private ArrayList<All_Request_data_dto> list = new ArrayList<All_Request_data_dto>(); ListView lv; Button back; private Spinner spndata; String[] reqspinner = { "Request Date", "Last Update", "Type", "Owner", "State" }; ArrayAdapter<String> adapter; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.request); assosiatetoken = MyApplication.getToken(); new doinbackground(this).execute(); back = (Button) findViewById(R.id.button1); spndata = (Spinner) findViewById(R.id.list_all_quize_req); adapter = new ArrayAdapter<String>(this, android.R.layout.simple_spinner_item, reqspinner); spndata.setAdapter(adapter); lv = (ListView) findViewById(R.id.listrequestdata); lv.setOnItemClickListener(new OnItemClickListener() { public void onItemClick(AdapterView<?> a, View v, int position, long id) { Intent edit = new Intent(Request.this, Request_webview.class); // edit.putExtra("Cat_url", url_link); startActivity(edit); } }); spndata.setOnItemSelectedListener(new OnItemSelectedListener() { public void onItemSelected(AdapterView<?> arg0, View arg1, int position, long arg3) { switch (position) { case 0: list = DBAdpter.requestUserData(assosiatetoken); Collections.sort(list, byDate1); // Collections.reverse(list); for (int i = 0; i < list.size(); i++) { if (list.get(i).submitDate != null) { lv.setAdapter(new MyListAdapter( getApplicationContext(), list)); } } break; case 1: list = DBAdpter.requestUserData(assosiatetoken); Collections.sort(list, byDate); for (int i = 0; i < list.size(); i++) { if (list.get(i).lastModifiedDate != null) { lv.setAdapter(new MyListAdapter( getApplicationContext(), list)); } } break; case 2: list = DBAdpter.requestUserData(assosiatetoken); Collections.sort(list, byDate3); // Collections.reverse(list); for (int i = 0; i < list.size(); i++) { if (list.get(i).state != null) { lv.setAdapter(new MyListAdapter( getApplicationContext(), list)); } } break; case 3: list = DBAdpter.requestUserData(assosiatetoken); for (int i = 0; i < list.size(); i++) { lv.setAdapter(new MyListAdapter( getApplicationContext(), list)); } break; default: break; } } public void onNothingSelected(AdapterView<?> arg0) { } }); back.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { finish(); } }); } static final Comparator<All_Request_data_dto> byDate = new Comparator<All_Request_data_dto>() { SimpleDateFormat sdf = new SimpleDateFormat("MM/dd/yyyy hh:mm:ss a"); public int compare(All_Request_data_dto ord1, All_Request_data_dto ord2) { java.util.Date d1 = null; java.util.Date d2 = null; try { d1 = sdf.parse(ord1.lastModifiedDate); d2 = sdf.parse(ord2.lastModifiedDate); } catch (java.text.ParseException e) { // TODO Auto-generated catch block e.printStackTrace(); } return (d1.getTime() > d2.getTime() ? -1 : 1); // descending // return (d1.getTime() > d2.getTime() ? 1 : -1); //ascending } }; static final Comparator<All_Request_data_dto> byDate1 = new Comparator<All_Request_data_dto>() { SimpleDateFormat sdf = new SimpleDateFormat("MM/dd/yyyy hh:mm:ss a"); public int compare(All_Request_data_dto ord1, All_Request_data_dto ord2) { java.util.Date d1 = null; java.util.Date d2 = null; try { d1 = sdf.parse(ord1.submitDate); d2 = sdf.parse(ord2.submitDate); } catch (java.text.ParseException e) { // TODO Auto-generated catch block e.printStackTrace(); } return (d1.getTime() > d2.getTime() ? -1 : 1); // descending // return (d1.getTime() > d2.getTime() ? 1 : -1); //ascending } }; static final Comparator<All_Request_data_dto> byDate3 = new Comparator<All_Request_data_dto>() { public int compare(All_Request_data_dto ord1, All_Request_data_dto ord2) { String d1 = null; String d2 = null; d1 = ord1.state; d2 = ord2.state; return d1.compareToIgnoreCase(d2); } }; class doinbackground extends AsyncTask<Void, Void, Void> { ProgressDialog pd; private Context ctx; public doinbackground(Context c) { ctx = c; } @Override protected void onPreExecute() { super.onPreExecute(); pd = new ProgressDialog(ctx); pd.setMessage("Loading..."); pd.show(); } @Override protected Void doInBackground(Void... Params) { return null; } @Override protected void onPostExecute(Void result) { super.onPostExecute(result); pd.cancel(); } } public class MyListAdapter extends BaseAdapter { private ArrayList<All_Request_data_dto> list; public MyListAdapter(Context mContext, ArrayList<All_Request_data_dto> list) { this.list = list; } public int getCount() { return list.size(); } public All_Request_data_dto getItem(int position) { return list.get(position); } public long getItemId(int position) { return position; } public View getView(int position, View convertView, ViewGroup parent) { // if (convertView == null) { LayoutInflater inflator = (LayoutInflater) getSystemService(LAYOUT_INFLATER_SERVICE); convertView = inflator.inflate(R.layout.custom_request_data, null); TextView req_id = (TextView) convertView.findViewById(R.id.req_txt); TextView date = (TextView) convertView.findViewById(R.id.date_txt); TextView owner = (TextView) convertView .findViewById(R.id.owner_txt); TextView state = (TextView) convertView .findViewById(R.id.state_txt); req_id.setText(list.get(position).requestId + " - " + list.get(position).title); date.setText(list.get(position).lastModifiedDate + " - " + list.get(position).submitDate); owner.setText(list.get(position).owner); state.setText(list.get(position).state); // } return convertView; } } }

    Read the article

  • Android ListView item highlight programmatically

    - by dhomes
    Hi all, I know it's been asked around but I haven't found quite the answer yet (new to Android so sorry about the ignorance) my app's launch Activity has an EditText (called searchbox) , a ListView (designations) and a Spinner (types) I use the EditText as a searchbox, I have to pass the string through a custom editing to make searching more flexible. After that I match that against the closest approximation I find in 'designations' and do designations.setSelection(j); As expected, this sets the desired item to the top of designations. But I can find a way to highlight it via code. NOW, i do know that if the device is in touch mode the highlighting of a selected item won't occur. So the last 4 lines of my searchbox's onTextChanged event are: designations.setFocusable(true); designations.setFocusableInTouchMode(true); if (match==true) designations.setSelection(j); if (st.length()==0) designations.setSelection(0); to no avail. now, i don't have any code on searchbox's afterTextChanged(Editable s); so could anyone give me a clue on this? regards ~dh

    Read the article

  • PDFObject load event

    - by Priyank
    Hi. We are trying to load a pdf file in web browser using pdfobject javascript api. Currently the size of the pdf's that we are trying to display is close to 10MBs. This creates a long delay in displaying a PDF on web page; while the complete PDF gets downloaded. We need to remove this lag by achieving either of the alternatives: Show a progress bar until the PDF is actually displayed. We couldn't find an event which is triggered and can be used to find out if pdf is visible now. This lacking doesn't let us decide when to stop showing progress bar/spinner OR lazy load the PDF such that it gets displayed as soon as first page gets loaded. With that ateast user will have a visual indication as to something is happening. We couldn'find anything in pdf object that lets us do a lazy load. User alternative pdf rendering api; this is a low priority as we already have complete code in place; but in an event of first 2 alternatives not being met; we'd have to consider this option. So please feel free to suggest. Any other ideas as to how user interaction can be made more intuitive or pleasant; would be welcome. Cheers

    Read the article

  • Resizing layouts for orientation change?

    - by Cole
    Normal: Landscape: See how the ListView overlaps other things on the screen when in landscape mode? How can I keep this from happening? XML: <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" android:id="@+id/main" > <RelativeLayout android:id="@+id/myWishLists" android:layout_width="fill_parent" android:layout_height="50dp"> <Spinner android:id="@+id/spinner1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentLeft="true" android:layout_alignParentTop="true" android:prompt="@string/optionsSpinner" android:entries="@array/options" /> </RelativeLayout> <TextView android:id="@+id/myListsText" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@+id/myWishLists" android:layout_centerHorizontal="true" android:text="My Wish Lists" android:textStyle="bold" android:textAppearance="?android:attr/textAppearanceLarge" /> <RelativeLayout android:id="@+id/listsList" android:layout_width="fill_parent" android:layout_height="445dp" android:layout_alignParentBottom="true" android:layout_alignParentLeft="true"> <ListView android:id="@+id/lists" android:layout_width="fill_parent" android:layout_height="fill_parent" android:entries="@array/entries" > </ListView> </RelativeLayout> </RelativeLayout>

    Read the article

  • Rendering PDF on WebPage

    - by Priyank
    Hi. We are trying to load a pdf file in web browser using pdfobject javascript api. Currently the size of the pdf's that we are trying to display is close to 10MBs. This creates a long delay in displaying a PDF on web page; while the complete PDF gets downloaded. We need to remove this lag by achieving either of the alternatives: Show a progress bar until the PDF is actually displayed. We couldn't find an event which is triggered and can be used to find out if pdf is visible now. This lacking doesn't let us decide when to stop showing progress bar/spinner OR lazy load the PDF such that it gets displayed as soon as first page gets loaded. With that ateast user will have a visual indication as to something is happening. We couldn'find anything in pdf object that lets us do a lazy load. User alternative pdf rendering api; this is a low priority as we already have complete code in place; but in an event of first 2 alternatives not being met; we'd have to consider this option. So please feel free to suggest. Any other ideas as to how user interaction can be made more intuitive or pleasant; would be welcome. Cheers

    Read the article

  • Getting message in android app: Binary XML file line #2: You must supply a layout_width attribute.

    - by opike
    I'm trying to use a ListView inside of a RelativeLayout but when I run my app I get a runtimeexception with the message: Binary XML file line #2: You must supply a layout_width attribute. I tried putting layout_width attributes in every conceivable place in the xml resource files but so far no luck. I attempt to populate the listview with this line of code: setListAdapter(new ArrayAdapter(this, R.layout.tablerow3, R.id.label, items)); Here's the tablerow3.xml contents: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"> android:layout_width="20dp" android:layout_height="5dp" android:id="@+id/tablerow01"> <Label android:id="@+id/label01" android:layout_width="5dp" android:layout_height="5dp" android:textColor="@color/solid_white" android:singleLine="true"/> <Label android:id="@+id/label02" android:layout_width="5dp" android:layout_height="5dp" android:textColor="@color/solid_white" android:singleLine="true"/> </LinearLayout> Here's the xml that contains the RelativeLayout(forex2.xml): <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent"> <Button android:text="Static Button" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentLeft="true" android:layout_alignParentTop="true" android:id="@+id/button_id"> </Button> <Spinner android:id="@+id/spinner1" android:layout_width="match_parent" android:layout_toRightOf="@id/button_id" android:layout_alignParentTop="true" android:layout_height="wrap_content" android:drawSelectorOnTop="true" /> <ListView android:id="@android:id/list" android:layout_width="5dp" android:layout_height="5dp" android:layout_alignParentBottom="true" /> <!-- android:layout_width="wrap_content" android:layout_height="wrap_content" --> </RelativeLayout>

    Read the article

  • GWT CssResource Customization

    - by Eric Landry
    I'm writing a GWT widget using UIBinder and MVP. The widget's default styles are defined in TheWidgetView.ui.xml: <ui:style type="com.widgetlib.spinner.display.TheWidgetView.MyStyle"> .textbox { border: 1px solid #red; } .important { font-weight: bold; } </ui:style> The widget's CssResource interface is defined in TheWidgetView.java: public class TheWidgetView extends HorizontalPanel implements TheWidgetPresenter.Display { // ... some code @UiField MyStyle style; public interface MyStyle extends CssResource { String textbox(); String important(); } // ... more code } I'd like the consumer of this widget to be able to customize part of the widget's styles and to have this in their MyExample.ui.xml: <ui:style type="com.consumer.MyExample.MyStyle"> .textbox { border: 2px solid #black; } </ui:style> And this be their MyExample.java: public class MyExample extends Composite { // ... some code @UiField MyStyle style; interface MyStyle extends TheWidgetView.MyStyle{ String textbox(); } // ... more code } Is there a way that my widget can have default styles, but that the consumer of the widget can override one of them? When an interface extends TheWidgetView.MyStyle, the of the widget consumer needs to define all the styles listed in that parent interface. I've seen some widget libraries have the widget's constructor take in a ClientBundle as parameter, which I suppose could apply to CssResource. Although, I'm not sure how I'd pass in this style object in a constructor invoked by UIBinder. Thanks much in advance!

    Read the article

  • CFHost DNS Resolution - When is it OK to use synchronous API?

    - by Jasarien
    I went to the iPhone Developer Tech Talk a few months ago and asked one of the gurus there about the lack of NSHost on the iPhone. Some code I was porting to the iPhone made significant use of NSHost throughout its networking code. I was told that NSHost is on the iPhone, but its private. I was also told that NSHost is a synchronous API and that I shouldn't use it anyway. (If anyone could elaborate on why it shouldn't be used, as a bonus, that'd be great.) I can see the caveats of using synchronous API's on the main thread in that they'll block until complete - and that's never a good thing with network code because there are so many factors that could cause the API to block the thread for a significant amount of time. My solution was to write a wrapper around CFHost's asynchronous resolution functions. The result works quite well, and I'm considering releasing it into the public domain. But my question is this: Say my app only resolves a hostname once per run, during the connecting phase, and then cache's it for the rest of the session. During the time it is resolving, a modal screen is shown telling the user "Connecting" with a nice spinner. Does it really matter whether or not the resolution is asynchronous?? The user has to wait to connect anyway, and the resolution is only done on the first connection. Subsequent connections use the cached result of the resolution. When is it OK to be synchronous and when should things be asynchronous?

    Read the article

  • Symfony + JQueryUI Tabs navigation menu question

    - by Andy Poquette
    I'm trying to use the tabs purely as a navigational menu, loading my pages in the tabs, but being able to bookmark said tabs, and have the address bar correspond with the action I'm executing. So here is my simple nav partial: <div id='tabs'> <ul> <li id='home'><a href="<?php echo url_for('post/index') ?>" title="Home">Home</a></li> <li id='test'><a href="<?php echo url_for('post/test') ?>" title="Test">Test</a></li> </ul> </div> And the simple tabs intializer: $(document).ready(function() { $('#tabs').tabs({spinner: '' }); }); My layout just displays $sf_content. I want to display the content for the action I'm executing (currently home or test) in the tab, via ajax, and have the tab be bookmarkable. I've googled this like 4000 times and I can't find an example of what I'm trying to do. If anyone has a resource they know of, I can look it up, or if you can help, I would greatly appreciate it. Thank you in advance.

    Read the article

  • My simple program runs on Android emulator, but not on my Nexus One

    - by noisesolo
    To clarify, I have no trouble getting the Nexus One connected in developer's mode. I can actually get Eclipse to "run" my program on my Nexus One. However, my Nexus One simply gets stuck in a reboot loop. I've also created an .apk file and put it onto my Nexus One, installing it with apkInstaller. However, it crashed while installing. I see my app on my phone, but I'm kind of afraid to run it. I am not doing anything fancy in my program; all it does is generate text by shuffling a couple arrays of strings together. It uses a bunch of text views, two buttons, and a spinner. I have only edited the main source file, the strings XML file, and the layout XML file, nothing else. It's a 2.1-update1 program and it runs fine on the emulator. Does anyone have any idea what's going on? I'm using Windows 7 (32 bit) and my Nexus One is running Cyanogen 5.0.7.1. I'm pretty sure it's my code that's causing the problem. Now I'm just wondering if there are any common mistakes that would lead my app to run on the emulator but not on my device. Thanks in advance.

    Read the article

  • Loading a gallery of external images with JQuery

    - by pingu
    Hi guys, I'm creating a gallery of images pulled in via a twitter image hosting service, and I want to show a loading graphic before they are displayed, but the logic seems to be failing me. I'm trying to do it the following way: <ul> <li> <div class="holder loading"> </div> </li> <li> <div class="holder loading"> </div> </li> <li>...</li> <li>...</li> </ul> Where there "loading" class has an animated spinner set as it's background image. JQuery: $('.holder').each(function(){ var imgsrc = http://example.com/imgsrc; var img = new Image(); $(img).load(function () { $(this).hide(); $(this).parent('.holder').removeClass('loading'); $(this).parent().append(this); $(this).fadeIn(); }) .error(function () { }).attr('src', imgsrc); }); Which isn't working - I'm not sure that the logic is correct and how to access the "holder" from inside the img.load nested function. What would be the best way to build this gallery so that the images display only after they've been loaded?

    Read the article

  • how to make the android app load faster?

    - by Tapan Desai
    I have designed an application for android, in which i am showing a splash screen before the main activity is started but the application takes 5-7 seconds to start on low-end devices. I want to reduce that time to as low as possible. I have been trying to reduce the things to be done in onCreate() but now i cannot remove any thing more from that. I am pasting the code that i have used to show the splash and the code from MainActivity. Please help me in reducing the startup time of the application. Splash.java @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); this.requestWindowFeature(Window.FEATURE_NO_TITLE); setContentView(R.layout.activity_splash); txtLoad = (TextView) findViewById(R.id.txtLoading); txtLoad.setText("v1.0"); new Thread() { public void run() { try { sleep(1000); } catch (InterruptedException e) { e.printStackTrace(); } finally { finish(); Intent intent = new Intent(SplashActivity.this,MainActivity.class); startActivity(intent); } } }.start(); } MainActivity.java @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); this.requestWindowFeature(Window.FEATURE_NO_TITLE); setContentView(R.layout.activity_main); editType1UserName = (EditText) findViewById(R.id.editTextType1UserName); editType1Password = (EditText) findViewById(R.id.editTextType1Password); editType2UserName = (EditText) findViewById(R.id.editTextType2UserName); editType2Password = (EditText) findViewById(R.id.editTextType2Password); editType3UserName = (EditText) findViewById(R.id.editTextType3UserName); editType3Password = (EditText) findViewById(R.id.editTextType3Password); editType4UserName = (EditText) findViewById(R.id.editTextType4UserName); editType4Password = (EditText) findViewById(R.id.editTextType4Password); mTxtPhoneNo = (AutoCompleteTextView) findViewById(R.id.mmWhoNo); mTxtPhoneNo.setThreshold(1); editText = (EditText) findViewById(R.id.editTextMessage); spinner1 = (Spinner) findViewById(R.id.spinnerGateway); btnsend = (Button) findViewById(R.id.btnSend); btnContact = (Button) findViewById(R.id.btnContact); btnsend.setOnClickListener((OnClickListener) this); btnContact.setOnClickListener((OnClickListener) this); mPeopleList = new ArrayList<Map<String, String>>(); PopulatePeopleList(); mAdapter = new SimpleAdapter(this, mPeopleList, R.layout.custcontview, new String[] { "Name", "Phone", "Type" }, new int[] { R.id.ccontName, R.id.ccontNo, R.id.ccontType }); mTxtPhoneNo.setAdapter(mAdapter); mTxtPhoneNo.setOnItemClickListener((OnItemClickListener) this); readPerson(); Panel panel; topPanel = panel = (Panel) findViewById(R.id.mytopPanel); panel.setOnPanelListener((OnPanelListener) this); panel.setInterpolator(new BounceInterpolator(Type.OUT)); getLoginDetails(); }

    Read the article

  • I'm cloning a table row that contains an input that's being set to jQuery TimeEntry that errors when

    - by Kendall Crouch
    I'm adding a TimeEntry to a page where the user can add a row (clone) to a table. The row that is cloned is hidden (display:none). The user clicks a button and javascript is run to clone the row which renames all of the fields and then appends the new row to the table. <tr id="blankRowShift"> <td> <input type="text" id="timeStart" name="timeStart" /> </td> <td> <input type="text" id="timeEnd" name="timeEnd" /> </td> <td> <select id="userLevel"> <option value="0">Please Select One</option> <option value="2">Admin</option> <option value="1">Employee</option> <option value="3">Scheduler</option> </select> </td> </tr> var r = $("#tbl #blankRowShift").clone().removeAttr("id"); $("#timeStart", r).attr("name", "timeStart" + nn).attr("id", "timeStart" + nn); $("#timeEnd", r).attr("name", "timeEnd" + nn).attr("id", "timeEnd" + nn); $("#userLevel option:nth(0)", r).attr("selected", "selected"); $("#userLevel", r).attr("name", "userLevel" + nn).attr("id", "userLevel" + nn).attr("value", 0); $("#tbl").append(r); $("#timeStart" + nn).timeEntry({ show24Hours: false, showSeconds: false, timeSteps: [1, 15, 0], spinnerImage: 'includes/js/spinnerOrange.png', beforeShow: customRangeStart }); $("#timeStart" + nn).timeEntry('setTime', new Date()); $("#timeEnd" + nn).timeEntry({ show24Hours: false, showSeconds: false, timeSteps: [1, 15, 0], spinnerImage: 'includes/js/spinnerOrange.png', beforeShow: customRangeEnd }); $("#timeEnd" + nn).timeEntry('setTime', new Date()); The spinner works just fine and the times can be changed. Then when submitting the form, I validate the time. The getTime errors in jQuery with the message "elem is undefined var id = elem[ expando ];". I've placed the statement 'console.dir(input)' in the _getTimeTimeEntry: function and it returns nothing for the cloned fields. el = $("#timeStart" + i); if (el.timeEntry("getTime") == null) {

    Read the article

< Previous Page | 5 6 7 8 9 10  | Next Page >