Search Results

Search found 11 results on 1 pages for 'user291701'.

Page 1/1 | 1 

  • ViewPager + recycling views?

    - by user291701
    I'd like to create a gallery of photos that swipe left and right. At first I took a look at Gallery, but it's marked as deprecated. http://developer.android.com/reference/android/widget/Gallery.html We're told to try ViewPager instead. But the PagerAdapter class doesn't handle recycling of views for us (like a standard ListView), does it? http://developer.android.com/reference/android/support/v4/view/PagerAdapter.html Is it up to us to build the recycling mechanism? Thanks

    Read the article

  • Restarting an activity in a single tab in a TabActivity?

    - by user291701
    Hi, I have a TabActivity. Each tab points to a sub activity. Works great. Is there any clever way to refresh one of the activity tabs? I just want to 'restart' the activity in tab #3 for example. Not sure of a good way to do this other than building in refresh support to the activity itself, or clearing ALL the tabs and recreating all of them. Thanks

    Read the article

  • Url mapping with my servlet?

    - by user291701
    Hi, I'm using GWT with GAE. When the user enters any of the following urls, I want to just serve my app as usual to them: http://www.mysite.com/ http://www.mysite.com/dog http://www.mysite.com/cat the first case works by default. I'm not sure how to get the /dog and /cat cases to work. I think I have to modify something with the url mappings to get that to work in web.xml. Essentially I'm trying to just get my app served with any url entered: http://www.mysite.com/* Thanks

    Read the article

  • How to access child element out of children()?

    - by user291701
    Hi, I'd like to get the # of immediate children an element has, and then get the class of a child at a particular index. Something like: var index = 25; var children = $("#myListElement").children(); if (index < children.length) { if (children[index].hasClass("testClass")) { alert("hi!"); } } I think the syntax for .children() is ok, but how do I get the indexed element out of them in jquery style? Thanks

    Read the article

  • Fixing merge conflicts?

    - by user291701
    I have two remote branches, "grape" and "master". I'm currently on "grape". Now I switch to "master": git checkout master Now I want to pull all changes from "grape" into "master" - is this the way to do it?: git merge origin grape It's my understanding that git will then pull all the current state of the remote branch "grape" into my local copy of "master". It will try to auto-merge for me. If there are conflicts, the files in conflict will have some conflict text actually injected into the file. I then have to go into those files, and delete the chunk I don't want (essentially telling git how to merge these files). For each file in conflict, do I add and commit the changes again?: git add problemfile1.txt git commit -m "Fixed merge conflict." git add problemfile2.txt git commit -m "Fixed another merge conflict." ... after I've fixed all the merge conflicts like above, do I just push to "master" again to finish up the process?: git push origin master or is there something else we need to do when we get into this conflict state? Thank you

    Read the article

  • Synchronizing access to an inner object's methods?

    - by user291701
    Suppose I have the following: public class Foo { private ReadingList mReadingList = new ReadingList(); public ReadingList getReadingList() { synchronized (mReadingList) { return mReadingList; } } } If I try modifying the ReadingList object in two threads, the synchronization above won't help me, right?: // Thread 1 foo1.getReadingList().setName("aaa"); // Thread 2 foo2.getReadingList().setName("bbb"); do I have to wrap each method I want synchronized like so: public class Foo { private ReadingList mReadingList = new ReadingList(); public synchronized void setReadingListName(String name) { mReadingList.setName(name); } public synchronized void setReadingListAuthor(String author) { mReadingList.setAuthor(author); } ... and so on for each method of ReadingList I want exposed and synched? I'd end up just writing wrapper methods for each method of ReadingList. Thanks

    Read the article

  • Custom titlebar - system titlebar being shown for a brief moment?

    - by user291701
    Hi, I've got a custom layout I want to use as the titlebar of my android app. The technique found (linked at the bottom) works, but the system titlebar is displayed before onCreate() is called. Obviously that looks pretty jarring, as for a moment the system titlebar is shown, then my custom titlebar is shown: // styles.xml <resources> <style name="MyTheme"> <item name="android:windowTitleSize">40dip</item> </style> </resources> // One of my activities, MyTheme is applied to it in the manifest. protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_CUSTOM_TITLE); setContentView(R.layout.my_activity); getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE, R.layout.my_custom_header); } I could always hide the system titlebar and display my own in-line perhaps with each and every layout, but, that's not very friendly. Thanks http://www.londatiga.net/it/how-to-create-custom-window-title-in-android/

    Read the article

  • How to make BoxLayout vertical but children flow top-aligned?

    - by user291701
    I'm trying to get get a vertical, top-aligned layout to work. This is what I have: JPanel pane = new JPanel(); pane.setLayout(new BoxLayout(pane, BoxLayout.Y_AXIS)); MyImagePanel panelImage = new MyImagePanel(); panelImage.setSize(400, 400); pane.add(new JComboBox()); pane.add(panelImage); pane.add(new JButton("1")); pane.add(new JButton("2")); pane.add(new JButton("3")); JFrame frame = new JFrame("Title"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setSize(800, 600); frame.add(pane); frame.pack(); frame.setVisible(true); All the controls appear, but it looks like padding is being applied at run time between their tops and bottoms so they're somewhat vertically centered. This is what I'm going for: ----------------------------------------------------- | ComboBox | | ------------ | | | | | Image | | | | | ------------ | | Button 1 | Any additional space fills the right | ------------ | | Button 2 | | ------------ | | Button 3 | | ------------ | | | | Any additional space fills the bottom | | | ----------------------------------------------------- How do I get BoxLayout to do that? Thanks ------------------------- Update ------------------------- Was able to use this: Box vertical = Box.createVerticalBox(); frame.add(vertical, BorderLayout.NORTH); vertical.add(new JComboBox()); vertical.add(new JButton("1")); ... to get what I wanted.

    Read the article

  • find() or children() to search top-level children only for a style?

    - by user291701
    Hi, I'd like to find if a child element exists which has either of two class styles applied. My code looks like this: var listOfMatchedResults = $("#parentList").find(".myStyle1, .myStyle2"); My styles are defined like this: .parent li, .myStyle0 { } .parent li.myStyle1 { } .parent li.myStyle2 { } I don't need to traverse more than one level deeper than the children level, like: <ul id='parentList'> <li><p>foo</p><p>grok</p></li> <li class='myStyle2'><p>Here</p><p>I am!</p></li> <li><p>foo</p><p>grok</p></li> </ul> I'm not clear as to what find() is doing, is it going into each of the paragraph elements too? I just need it to traverse the top-level children - is there a way to specify that? Thank you

    Read the article

  • Setting a background drawable for a dialog?

    - by user291701
    Hi, Tried posting this at android dev, wanted to go here too in case anyone knows. I'm trying to supply a custom background drawable for a dialog. I've created the following in my styles.xml file: <style name="CustomDlg" parent="@android:style/Theme.Dialog"> <item name="android:windowBackground">@drawable/my_background</item> </style> This works fine on 1.6+. On my g1 running 1.5 (and the 1.5 emulator) the drawable is used, but the area around the dialog is opaque black instead of being translucent. Is there something I'm missing here, or is this a bug with 1.5? Any work arounds? Is 1.5 just the ie6 of Android? Thanks

    Read the article

  • A Map of View instances?

    - by user291701
    Is it possible to keep references to views keyed off of their hashCode? Something like: Map<Integer, View> views; views.put(view1.hashCode(), view1); views.put(view2.hashCode(), view2); views.put(viewN.hashCode(), viewN); I have a few in my view hierarchy and am downloading images for each. I want to be able to iterate over them quickly, or see if I've already previously added one (hence the map).

    Read the article

1