Search Results

Search found 100 results on 4 pages for 'casebash'.

Page 4/4 | < Previous Page | 1 2 3 4 

  • Download and replace Android resource files

    - by Casebash
    My application will have some customisation for each company that uses it. Up until now, I have been loading images and strings from resource files. The idea is that the default resources will be distributed with the application and company specific resources will be loaded from our server after they click on a link from an email to launch the initialisation intent. Does anyone know how to replace resource files? I would really like to keep using resource files to avoid rewriting a lot of code/XML. I would distribute the application from our own server, rather than through the app store, so that we could have one version per company, but unfortunately this will give quite nasty security warnings that would concern our customers.

    Read the article

  • Identifying the view selected in a ContextMenu (Android)

    - by Casebash
    In Android, onContextItemSelected has a single MenuItem argument and so it isn't clear how to identify the view selected. MenuItem.getMenuInfo provides access to Contextmenu.ContextMenuInfo, but while both known subclasses provide access to the target view, there does not appear to be an accessor on the interface. One alternative is to save the View provided in onCreateContextMenu in a private class variable which relies on onCreateContextMenu not being called again in the activity before onContextItemSelected. Another is to use the id of the View for the itemId argument of ContextMenu.add. If we do this, we would then need to identify the option selected from the context menu by using its (possibly internationalised) title. What is the best method for identifying the View selected in onContextSelected?

    Read the article

  • Override onDraw to change how the drawing occurs (Android)

    - by Casebash
    I want to change how my UI elements display, so I am overriding onDraw. The following code allows me to change a View to be drawn using PorterDuff.Mode.DARKEN. Unfortunately, this method involves creating a bitmap the size of the entire screen, then drawing to it then drawing this large bitmap the main screen again, for each UI element. This isn't at all efficient. Is it possible to achieve this in a more effecient way? @Override protected void onDraw(Canvas canvas) { //TODO: Reduce the burden from multiple drawing Bitmap bitmap=Bitmap.createBitmap(canvas.getWidth(), canvas.getHeight(), Config.ARGB_8888); Log.e("tmp",canvas.getClipBounds().toString()); Canvas offscreen=new Canvas(bitmap); super.onDraw(offscreen); //Then draw onscreen Paint p=new Paint(); p.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.DARKEN)); canvas.drawBitmap(bitmap, 0, 0, p); }

    Read the article

  • Python Frequently Asked Questions

    - by Casebash
    After seeing this suggestion for creating tag homepages/FAQs, I thought it'd be best to go on ahead and start collecting links to frequently asked questions to demonstrate how this would work. Object Oriented Metaclasses Missing features Enums Tools Available IDEs?

    Read the article

  • Bundling images with Blackberry

    - by Casebash
    How do I get bundled images with the BlackBerry Eclipse Plugin 1.1 Beta? I copied an image into "res/background.jpg" and tried to load it using Bitmap.getBitmapResource on background.jpg. Unfortunately, the image wasn't found (Illegal argument exception). I tried moving my image file into the src folder as per the advice here, but that didn't work either. I have opened up the .jar file and the background image is present at the root of the .jar file. The option to convert image files to .png isn't selected either. Links Could not find sample Library Reference

    Read the article

  • Real time App with Facebook

    - by Casebash
    Does Facebook provide access to any real time APIs so that you can respond to events as soon as they happen? If not, what alternatives are there and what are their limitations? For example, if I use polling instead, will they limit my api calls? And if I try using RSS feeds, about how much delay can I expect? Or maybe it would be possible to receive and process email notifications (if I could convince a user to forward mail to another email address), as they seem to be dispatched pretty promptly?

    Read the article

  • Objective-measures of the expressiveness of programming languages [closed]

    - by Casebash
    I am very interested in the expressiveness of different languages. Everyone who has programmed in multiple languages knows that sometimes a language allows you to express concepts which you can't express in other languages. You can have all kinds of subjective discussion about this, but naturally it would be better to have an objective measure. There do actually exist objective measures. One is Turing-Completeness, which means that a language is capable of generating any output that could be generated by following a sequential set of steps. There are also other lesser levels of expressiveness such as Finite State Automata. Now, except for domain specific languages, pretty much all modern languages are Turing complete. It is therefore natural to ask the following question: Can we can define any other formal measures of expressiveness which are greater than Turing completeness? Now of course we can't define this by considering the output that a program can generate, as Turing machines can already produce the same output that any other program can. But there are definitely different levels in what concepts can be expressed - surely no-one would argue that assembly language is as powerful as a modern object oriented language like Python. You could use your assembly to write a Python interpreter, so clearly any accurate objective measure would have to exclude this possibility. This also causes a problem with trying to define the expressiveness using the minimum number of symbols. How exactly to do so is not clear and indeed appears extremely difficult, but we can't assume that just because we don't know how to solve a problem, that nobody know how to. It is also doesn't really make sense to demand a definition of expressiveness before answering the question - after all the whole point of this question is to obtain such a definition. I think that my explanation will be clear enough for anyone with a strong theoretical background in computer science to understand what I am looking for. If you do have such a background and you disagree, please comment why, but if you don't thats probably why you don't understand the question.

    Read the article

  • Java ME libraries

    - by Casebash
    Java ME is quite sparse on features. Are there any libraries you use to add missing features? I don't want to focus on UI libraries - these are better discussed here.

    Read the article

< Previous Page | 1 2 3 4