
Android
Get flash to fully experience Pearltrees
Convert int to Extended ASCII
The follwing code show how to convert from int (0x80~0xFF) to extended ASCII of charset "windows-1252", using org.apache.http.util.EncodingUtils .AndroidDevBlog » Clean and user-friendly UIs with ActionBar
xml - Android: Tabstyle - Stack Overflow
The style shows only the colors When selected. When I use a white icon is the text (text setindicator) white. This also applies to the gray icon.DisplayMetrics | Android Developers
From class java.lang.Object Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the specified timeout expires. Standard quantized DPI for 720p TV screens. Applications should generally not worry about this density, instead targeting DENSITY_XHIGH for 1080p TV screens. For situations where output is needed for a 720p screen, the UI elements can be scaled automatically by the platform. The logical density of the display.Android Tabs with interacting map and list views « Josh Thought
Last tutorial , we wrote a simple app that displays two interacting list views in a TabActivity . In this tutorial, we will up the ante and add a MapView as the content of one of the tabs. Why again are we using multiple views in an activity instead of using a separate activity for each tab content? Remember, we want our tabs to be able to easily interact with one another, and keeping them as views allows us to handle the logic and interaction within one activity. So, our goal in this tutorial is to have a list of geo coordinates and when we click on an item in the list, our map view goes to that location. android:apiKey = "[your MAPS API KEY here]" />Using custom layouts for “Spinner” or “ListView” entries in Android « APP-SOLUT APPLICATION-SOLUTIONS
Android SDK: Using Custom View In XML Based Layout
This tutorial demonstrates how to use a custom view class (that is a class derived from View or its subclass) in an XML layout. This demonstration assumes basic familiarity with Android SDK and its XML layouting mechanism, the code is written in Android SDK 2.1. package com.permadi.example; import android.content.Context; import android.util.AttributeSet; import android.view.LayoutInflater; import android.view.View; import android.widget.LinearLayout; public class CustomView extends LinearLayout { public CustomView(Context context, AttributeSet attrs) { super(context, attrs); LayoutInflater layoutInflater = (LayoutInflater)context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); View view=layoutInflater.inflate(R.layout.example,this); } }Android custom Dialog
Posted by Tonio | Filed under Tutorial Android provides a AlertDialog class that ease the building of Dialog windows throught it’s Builder inner class. However, it’s not possible to customize these AlertDialog windows. To give AlertDialog windows a custom Look and Feel, a solution is to create application specific AlertDialog and AlertDialog.Builder class.How to Create Custom Window Title in Android | All About Web & Mobile Application Development
To create a tabbed UI, you need to use a TabHost and a TabWidget . The TabHost must be the root node for the layout, which contains both the TabWidget for displaying the tabs and a FrameLayout for displaying the tab content. You can implement your tab content in one of two ways: use the tabs to swap View s within the same Activity , or use the tabs to change between entirely separate activities. Which method you want for your application will depend on your demands, but if each tab provides a distinct user activity, then it probably makes sense to use a separate Activity for each tab, so that you can better manage the application in discrete groups, rather than one massive application and layout.
Tab Layout | Android Developers
Button | Android Developers
However, instead of applying an OnClickListener to the button in your activity, you can assign a method to your button in the XML layout, using the android:onClick attribute. For example: Now, when a user clicks the button, the Android system calls the activity's selfDestruct(View) method. In order for this to work, the method must be public and accept a View as its only parameter. For example: Every Button is styled using the system's default button background, which is often different from one device to another and from one version of the platform to another.Learn Android : Android Layout Tutorial
An Android layout is a class that handles arranging the way its children appear on the screen. Anything that is a View (or inherits from View) can be a child of a layout. All of the layouts inherit from ViewGroup (which inherits from View) so you can nest layouts. You could also create your own custom layout by making a class that inherits from ViewGroup. I have also created a demo project that uses the code samples from this tutorial and from the Lots of Lists: Part 1, Simple List Activity tutorial .Each of the documents in this section describe the usage, format and syntax for a certain type of application resource that you can provide in your resources directory ( res/ ).
Resource Types | Android Developers
The articles showed you how to use the tag in XML layouts, to reuse and share your layout code. This article explains the tag and how it complements the tag. The tag was created for the purpose of optimizing Android layouts by reducing the number of levels in view trees. It's easier to understand the problem this tag solves by looking at an example. The following XML layout declares a layout that shows an image with its title on top of it. The structure is fairly simple; a FrameLayout is used to stack a TextView on top of an ImageView :

