In the AVD manager if you choose a Built-in skin then the Abstracted LCD density is ignored and it will set the density as described here: Emulator Skins (from http://developer.android.com/tools/revisions/platforms.html) The downloadable platform includes the following emulator skins: QVGA (240x320, low density, small screen) WQVGA400 (240x400, low density, normal screen) WQVGA432 (240x432, low density, normal screen) HVGA (320x480, medium density, normal screen) WVGA800 (480x800, high density, normal screen) WVGA854 (480x854 high density, normal screen) WXGA720 (1280x720, extra-high density, normal screen) WSVGA (1024x600, medium density, large screen) WXGA800-7in (1280x800, high density, large screen) new WXGA800 (1280x800, medium density, xlarge screen) If you wish to set your own Abstracted LCD density you'll need to define your own resolution manually by clicking the Resolution radio button. Here's some code you can use to test this: DisplayMetrics metrics = new DisplayMetrics(); getWindowManager().getDefaultDisplay().getMetrics(metrics); int density = metrics.densityDpi; if (density == DisplayMetrics.DENSITY_HIGH) { Toast.makeText(this, "DENSITY_HIGH... Density is " + String.valueOf(density), Toast.LENGTH_LONG).show(); } else if (density == DisplayMetrics.DENSITY_MEDIUM) { Toast.makeText(this, "DENSITY_MEDIUM... Density is " + String.valueOf(density), Toast.LENGTH_LONG).show(); } else if (density == DisplayMetrics.DENSITY_LOW) { Toast.makeText(this, "DENSITY_LOW... Density is " + String.valueOf(density), Toast.LENGTH_LONG).show(); } else { Toast.makeText(this, "Density is neither HIGH, MEDIUM OR LOW. Density is " + String.valueOf(density), Toast.LENGTH_LONG).show(); }
Nov 14, 2012
How to Create AVDS with Different Resolutions in Android
Sep 5, 2012
How to Install FileZilla
Linux, *BSD,
IPv6 support
Available in many languages
Supports resume and transfer of large files >4GB
Tabbed user interface
Powerful Site Manager and transfer queue
Bookmarks
Drag & drop support
Configurable transfer speed limits
Filename filters
Directory comparison
Network configuration wizard
Remote file editing
Keep-alive
HTTP/1.1, SOCKS5 and FTP-Proxy support
Logging to file
Synchronized directory browsing
Remote file search
What is new in version 3.5.1
New features:
Add menu item to hide toolbar
Bugfixes and minor changes:
Don't save server list in kiosk mode 2
Fix for predefined sites not appearing in all circumstances
OS X: Pasting formatted text into input boxes no longer changes their format
Fix typo in build script in detection of SQLite3
MSW: Small installer improvements
*nix: Fix character set conversion in desktop notification code
Merged upstream PuTTY changes for compatibility with PuTTY 0.61
Updated built-in TinyXML
Add support for another rate variant of MVS style directory listings
Install filezilla 3.5.1 using PPA
Open th terminal and run the following commands
Step 1- > sudo add-apt-repository ppa:n-muench/programs-ppaStep 2- > sudo apt-get update
Step 3- > sudo apt-get install filezilla
Aug 19, 2012
Micro soft dot net power point presentations and programs
Hi guys here we can find out some basics of c# and asp.net programs
and power point presentations .
ASP . Net presentations presentations
Programing in C# presentations
Dot Net Demo Programs presentations
dot net demo project presentations
Xml power point presentations presentations
WML power point presentaions
and power point presentations .
ASP . Net presentations presentations
Programing in C# presentations
Dot Net Demo Programs presentations
dot net demo project presentations
Xml power point presentations presentations
WML power point presentaions
Aug 14, 2012
HorizontalScrollView And ScrollView
java.lang.Object | ||||
↳ | android.view.View | |||
↳ | android.view.ViewGroup | |||
↳ | android.widget.FrameLayout | |||
↳ | android.widget.HorizontalScrollView |
Class Overview
Layout container for a view hierarchy that can be scrolled by the user, allowing it to be larger than the physical display. A HorizontalScrollView is a
FrameLayout
, meaning you should place one child in it containing the entire contents to scroll; this child may itself be a layout manager with a complex hierarchy of objects. A child that is often used is a LinearLayout
in a horizontal orientation, presenting a horizontal array of top-level items that the user can scroll through.
The
TextView
class also takes care of its own scrolling, so does not require a HorizontalScrollView, but using the two together is possible to achieve the effect of a text view within a larger container.
HorizontalScrollView only supports horizontal scrolling. For vertical scrolling, use either
ScrollView
orListView
.
ScrollView and HorizontalScrollView are layout container for a view hierarchy that can be scrolled vertically or horizontally by the user, allowing it to be larger than the physical display. A ScrollView/HorizontalScrollView is a FrameLayout, meaning you should place one child in it containing the entire contents to scroll; this child may itself be a layout manager with a complex hierarchy of objects.
XML code :
------------
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="HorizontalScrollView And ScrollView "
/>
<HorizontalScrollView
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<LinearLayout
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="First HorizontalScrollView" />
<LinearLayout
android:orientation="horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<Button
android:text="Horizontal A1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<Button
android:text="Horizontal A2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<Button
android:text="Horizontal A3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<Button
android:text="Horizontal A4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<Button
android:text="Horizontal A5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</LinearLayout>
</LinearLayout>
</HorizontalScrollView>
<HorizontalScrollView
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<LinearLayout
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Second HorizontalScrollView" />
<LinearLayout
android:orientation="horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<Button
android:text="Horizontal B1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<Button
android:text="Horizontal B2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<Button
android:text="Horizontal B3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<Button
android:text="Horizontal B4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<Button
android:text="Horizontal B5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<Button
android:text="Horizontal B6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</LinearLayout>
</LinearLayout>
</HorizontalScrollView>
<ScrollView
android:layout_height="fill_parent"
android:layout_width="fill_parent">
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Vertical ScrollView" />
<Button
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Button C"/>
<Button
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Vertical ScrollView D"/>
<Button
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Vertical ScrollView E"/>
<Button
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Vertical ScrollView F"/>
<Button
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Vertical ScrollView G"/>
<Button
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Vertical ScrollView H"/>
<Button
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Vertical ScrollView I"/>
</LinearLayout>
</ScrollView>
</LinearLayout>
For Full Source Clik Here : ScrollView
Aug 13, 2012
Android companies List In Vishakapatnam
Link Name
--------------------------------------------------------------
http://www.bluefrogindia.com blue frog
http://www.e-centricsolutions.com/ ecentric solutions
http://faqden.com/ faqden Labs
http://www.gaiansolutions.com/ gain softsoluations
http://www.jitworld.com jit world
http://www.stellentsoft.com/ stellen and soft
http://www.xinthe.com Xinthe technologies
http://www.vizser.com vizser limited
Real time Android training in Vishakapatnam
http://techtrainin.blogspot.in/p/android-programing.html
Aug 9, 2012
Showing a progress Bar When uploading File using FTP in Android
/**
* Asynchronous task to upload file to server
*/
class UploadImageTask extends AsyncTask<File, Integer, Boolean> {
/** Upload file to this url */
private static final String UPLOAD_URL = "http://thibault-laptop:8080/report";
/** Send the file with this form name */
private static final String FIELD_FILE = "file";
private static final String FIELD_LATITUDE = "latitude";
private static final String FIELD_LONGITUDE = "longitude";
/**
* Prepare activity before upload
*/
@Override
protected void onPreExecute() {
super.onPreExecute();
setProgressBarIndeterminateVisibility(true);
mConfirm.setEnabled(false);
mCancel.setEnabled(false);
showDialog(UPLOAD_PROGRESS_DIALOG);
}
/**
* Clean app state after upload is completed
*/
@Override
protected void onPostExecute(Boolean result) {
super.onPostExecute(result);
setProgressBarIndeterminateVisibility(false);
mConfirm.setEnabled(true);
mDialog.dismiss();
if (result) {
showDialog(UPLOAD_SUCCESS_DIALOG);
} else {
showDialog(UPLOAD_ERROR_DIALOG);
}
}
@Override
protected Boolean doInBackground(File... image) {
return doFileUpload(image[0], UPLOAD_URL);
}
@Override
protected void onProgressUpdate(Integer... values) {
super.onProgressUpdate(values);
if (values[0] == 0) {
mDialog.setTitle(getString(R.string.progress_dialog_title_uploading));
}
mDialog.setProgress(values[0]);
}
/**
* Upload given file to given url, using raw socket
* @see http://stackoverflow.com/questions/4966910/androidhow-to-upload-mp3-file-to-http-server
*
* @param file The file to upload
* @param uploadUrl The uri the file is to be uploaded
*
* @return boolean true is the upload succeeded
*/
private boolean doFileUpload(File file, String uploadUrl) {
HttpURLConnection conn = null;
DataOutputStream dos = null;
String lineEnd = "\r\n";
String twoHyphens = "--";
String boundary = "*****";
String separator = twoHyphens + boundary + lineEnd;
int bytesRead, bytesAvailable, bufferSize;
byte[] buffer;
int maxBufferSize = 1 * 1024 * 1024;
int sentBytes = 0;
long fileSize = file.length();
// The definitive url is of the kind:
// http://host/report/latitude,longitude
uploadUrl += "/" + mLocation.getLatitude() + "," + mLocation.getLongitude();
// Send request
try {
// Configure connection
URL url = new URL(uploadUrl);
conn = (HttpURLConnection) url.openConnection();
conn.setDoInput(true);
conn.setDoOutput(true);
conn.setUseCaches(false);
conn.setRequestMethod("PUT");
conn.setRequestProperty("Connection", "Keep-Alive");
conn.setRequestProperty("Content-Type", "multipart/form-data;boundary=" + boundary);
publishProgress(0);
dos = new DataOutputStream(conn.getOutputStream());
// Send location params
writeFormField(dos, separator, FIELD_LATITUDE, "" + mLocation.getLatitude());
writeFormField(dos, separator, FIELD_LONGITUDE, "" + mLocation.getLongitude());
// Send multipart headers
dos.writeBytes(twoHyphens + boundary + lineEnd);
dos.writeBytes("Content-Disposition: form-data; name=\"" + FIELD_FILE + "\";filename=\""
+ file.getName() + "\"" + lineEnd);
dos.writeBytes(lineEnd);
// Read file and create buffer
FileInputStream fileInputStream = new FileInputStream(file);
bytesAvailable = fileInputStream.available();
bufferSize = Math.min(bytesAvailable, maxBufferSize);
buffer = new byte[bufferSize];
// Send file data
bytesRead = fileInputStream.read(buffer, 0, bufferSize);
while (bytesRead > 0) {
// Write buffer to socket
dos.write(buffer, 0, bufferSize);
// Update progress dialog
sentBytes += bufferSize;
publishProgress((int)(sentBytes * 100 / fileSize));
bytesAvailable = fileInputStream.available();
bufferSize = Math.min(bytesAvailable, maxBufferSize);
bytesRead = fileInputStream.read(buffer, 0, bufferSize);
}
// send multipart form data necesssary after file data
dos.writeBytes(lineEnd);
dos.writeBytes(twoHyphens + boundary + twoHyphens + lineEnd);
dos.flush();
dos.close();
fileInputStream.close();
} catch (IOException ioe) {
Log.e(TAG, "Cannot upload file: " + ioe.getMessage(), ioe);
return false;
}
// Read response
try {
int responseCode = conn.getResponseCode();
return responseCode == 200;
} catch (IOException ioex) {
Log.e(TAG, "Upload file failed: " + ioex.getMessage(), ioex);
return false;
} catch (Exception e) {
Log.e(TAG, "Upload file failed: " + e.getMessage(), e);
return false;
}
}
private void writeFormField(DataOutputStream dos, String separator, String fieldName, String fieldValue) throws IOException
{
dos.writeBytes(separator);
dos.writeBytes("Content-Disposition: form-data; name=\"" + fieldName + "\"\r\n");
dos.writeBytes("\r\n");
dos.writeBytes(fieldValue);
dos.writeBytes("\r\n");
}
}
Jun 21, 2012
Secret Codes For Android Mobile Phones
1. Complete Information About your Phone
*#*#4636#*#*
This code can be used to get some interesting information about your phone and battery.
Usage statistics
2. Factory data reset
*#*#7780#*#*
This code can be used for a factory data reset. It'll remove following things:
Google account settings stored in your phone
System and application data and settings
Downloaded applications
It'll NOT remove:
Current system software and bundled application
SD card files e.g. photos, music files, etc.
Note: Once you give this code, you get a prompt screen asking you to click on "Reset phone" button. So you get a chance to cancel your operation.
3. Format Android Phone
*2767*3855#
Think before you give this code. This code is used for factory format. It'll remove all files and settings including the internal memory storage. It'll also reinstall the phone firmware.
Note: Once you give this code, there is no way to cancel the operation unless you remove the battery from the phone. So think twice before giving this code.
4. Phone Camera Update
*#*#34971539#*#*
This code is used to get information about phone camera. It shows following 4 menus:
Update camera firmware in image (Don't try this option)
Update camera firmware in SD card
Get camera firmware version
Get firmware update count
WARNING: Never use the first option otherwise your phone camera will stop working and you'll need to take your phone to service center to reinstall camera firmware.
5. End Call/Power
*#*#7594#*#*
This one is my favorite one. This code can be used to change the "End Call / Power" button action in your phone. Be default, if you long press the button, it shows a screen asking you to select any option from Silent mode, AirPlane mode and Power off.
You can change this action using this code. You can enable direct power off on this button so you don't need to waste your time in selecting the option.
6. File Copy for Creating Backup
*#*#273283*255*663282*#*#*
This code opens a File copy screen where you can backup your media files e.g. Images, Sound, Video and Voice memo.
7. Service Mode
*#*#197328640#*#*
This code can be used to enter into Service mode. You can run various tests and change settings in the service mode.
8. WLAN, GPS and Bluetooth Test Codes:
*#*#232339#*#* OR *#*#526#*#* OR *#*#528#*#* - WLAN test (Use "Menu" button to start various tests)
*#*#232338#*#* - Shows WiFi MAC address
*#*#1472365#*#* - GPS test
*#*#1575#*#* - Another GPS test
*#*#232331#*#* - Bluetooth test
*#*#232337#*# - Shows Bluetooth device address
9. Codes to get Firmware version information:
*#*#4986*2650468#*#* - PDA, Phone, H/W, RFCallDate
*#*#1234#*#* - PDA and Phone
*#*#1111#*#* - FTA SW Version
*#*#2222#*#* - FTA HW Version
*#*#44336#*#* - PDA, Phone, CSC, Build Time, Changelist number
10. Codes to launch various Factory Tests:
*#*#0283#*#* - Packet Loopback
*#*#0*#*#* - LCD test
*#*#0673#*#* OR *#*#0289#*#* - Melody test
*#*#0842#*#* - Device test (Vibration test and BackLight test)
*#*#2663#*#* - Touch screen version
*#*#2664#*#* - Touch screen test
*#*#0588#*#* - Proximity sensor test
*#*#3264#*#* - RAM version
*#*#4636#*#*
This code can be used to get some interesting information about your phone and battery.
Usage statistics
2. Factory data reset
*#*#7780#*#*
This code can be used for a factory data reset. It'll remove following things:
Google account settings stored in your phone
System and application data and settings
Downloaded applications
It'll NOT remove:
Current system software and bundled application
SD card files e.g. photos, music files, etc.
Note: Once you give this code, you get a prompt screen asking you to click on "Reset phone" button. So you get a chance to cancel your operation.
3. Format Android Phone
*2767*3855#
Think before you give this code. This code is used for factory format. It'll remove all files and settings including the internal memory storage. It'll also reinstall the phone firmware.
Note: Once you give this code, there is no way to cancel the operation unless you remove the battery from the phone. So think twice before giving this code.
4. Phone Camera Update
*#*#34971539#*#*
This code is used to get information about phone camera. It shows following 4 menus:
Update camera firmware in image (Don't try this option)
Update camera firmware in SD card
Get camera firmware version
Get firmware update count
WARNING: Never use the first option otherwise your phone camera will stop working and you'll need to take your phone to service center to reinstall camera firmware.
5. End Call/Power
*#*#7594#*#*
This one is my favorite one. This code can be used to change the "End Call / Power" button action in your phone. Be default, if you long press the button, it shows a screen asking you to select any option from Silent mode, AirPlane mode and Power off.
You can change this action using this code. You can enable direct power off on this button so you don't need to waste your time in selecting the option.
6. File Copy for Creating Backup
*#*#273283*255*663282*#*#*
This code opens a File copy screen where you can backup your media files e.g. Images, Sound, Video and Voice memo.
7. Service Mode
*#*#197328640#*#*
This code can be used to enter into Service mode. You can run various tests and change settings in the service mode.
8. WLAN, GPS and Bluetooth Test Codes:
*#*#232339#*#* OR *#*#526#*#* OR *#*#528#*#* - WLAN test (Use "Menu" button to start various tests)
*#*#232338#*#* - Shows WiFi MAC address
*#*#1472365#*#* - GPS test
*#*#1575#*#* - Another GPS test
*#*#232331#*#* - Bluetooth test
*#*#232337#*# - Shows Bluetooth device address
9. Codes to get Firmware version information:
*#*#4986*2650468#*#* - PDA, Phone, H/W, RFCallDate
*#*#1234#*#* - PDA and Phone
*#*#1111#*#* - FTA SW Version
*#*#2222#*#* - FTA HW Version
*#*#44336#*#* - PDA, Phone, CSC, Build Time, Changelist number
10. Codes to launch various Factory Tests:
*#*#0283#*#* - Packet Loopback
*#*#0*#*#* - LCD test
*#*#0673#*#* OR *#*#0289#*#* - Melody test
*#*#0842#*#* - Device test (Vibration test and BackLight test)
*#*#2663#*#* - Touch screen version
*#*#2664#*#* - Touch screen test
*#*#0588#*#* - Proximity sensor test
*#*#3264#*#* - RAM version
Jun 8, 2012
Basic Swings Programs
Differences between Swings And AWT
Differences:
1) AWT stands for Abstract windows toolkit whereas le Swing is also called as JFC?s (Java Foundation classes).
2) AWT components use native methods Swing components use the methods that are written in Java. Therefore AWT is heavy weight component and swing is light weight component.
3) Light weight components have transparent pixels where as heavy weight is always opaque.
4) Light weight components are non-rectangular whereas Heavy weight components are rectangular
5) Swings components are made in pure java and they are platform independent whereas AWT components are platform dependent.
6) Swing provides look and feel feature whereas this feature is not supported by AWT.
Jun 5, 2012
How TO Get Image using Name from Raw or drawable folder
In some situtaion we have to get image from drawable or raw folder using image name instead if generated id
// Image View Object
mIv = (ImageView) findViewById(R.id.xidIma);
// create context Object for to Fetch image from resourse
Context mContext=getApplicationContext();
// getResources().getIdentifier("image_name","res_folder_name", package_name);
// find out below example
int i = mContext.getResources().getIdentifier("ic_launcher","raw", mContext.getPackageName());
// now we will get contsant id for that image
mIv.setBackgroundResource(i);
// Image View Object
mIv = (ImageView) findViewById(R.id.xidIma);
// create context Object for to Fetch image from resourse
Context mContext=getApplicationContext();
// getResources().getIdentifier("image_name","res_folder_name", package_name);
// find out below example
int i = mContext.getResources().getIdentifier("ic_launcher","raw", mContext.getPackageName());
// now we will get contsant id for that image
mIv.setBackgroundResource(i);
May 28, 2012
Top tips for converting iOS UI to Android
Making your app look like it belongs into an Android phone
Many companies are converting their iOS apps to Android nowadays. However, simple one-to-one conversion of the UI might cause problems to the potential users.
I don't believe that inter-platform consistency between an app's different versions is as important than consistency between apps on a single platform. Not many users use multiple different phones at the same time. This post describes five simple rules how an iOS app can be made to fit into the growing Android app crowd.
1. Use top tabs
Google recommends that tabs in Android apps placed on top part of the UI instead of the very bottom.
There's a very good reason for that recommendation. Take a look at the following pictures.Both of them features app called runtastic. Their Android port keeps the UI virtually unchanged and causes problems to big portion of Android users. Many Android phones have the 4 (or some 3) required Android buttons right on the screens bottom edge. Having your app's navigation immediately adjacent to the buttons will inevitably cause users to tap the navigation buttons from time to time.
Foursquare port does a good work moving the navigation tabs to higher and avoiding the same problems as runtastic has.
a slide from Roman Nurik's GDD 2010 presentation |
There's a very good reason for that recommendation. Take a look at the following pictures.Both of them features app called runtastic. Their Android port keeps the UI virtually unchanged and causes problems to big portion of Android users. Many Android phones have the 4 (or some 3) required Android buttons right on the screens bottom edge. Having your app's navigation immediately adjacent to the buttons will inevitably cause users to tap the navigation buttons from time to time.
Foursquare port does a good work moving the navigation tabs to higher and avoiding the same problems as runtastic has.
On the left: iOS version. On the right: Android version.
2. No back button in UI
All Android devices are required to have a back button and user's have used in using it. There's no need to add a back button to the UI.
Don't do this:
A bit embarrassingly this example is from Android Central (an awesome source for Android news) app. |
3. Use Android platform icons
Android platform provides icons for most common actions. One of them is share. Allrecepies uses an iOS icon (top right corner). There's a well established "share" icon for Android seen for example in the default gallery app. It is freely available to use in every app.
4. Use Android's intent APIs
One of the most powerful features of Android platform is the intent API. It allows apps to extend other apps' functionality by offering access to their features. Probably the most common way of doing this is the share function on various apps. An app can choose to share text, URL, image etc. Other apps can then register to listen to intents that they can handle.
Apps should not implement their own interface for sharing through Facebook, twitter etc. If the app just let's the Android handle the share intent user can use their twitter etc app of choice. This way is much more convenient to users.
On the left: Wrong. On the right: Correct.
5. Consider using Action Bar
Action bar has become a single most easily identifiable feature in Android apps. Using it will instantly brand the app as an Android app. Users are used to the concept and it can improve app's usability. However, as always UI components should only be used if it makes sense.
Evernote uses Action Bar pattern successfully |
Conclusion
Simple one-to-one conversion from iOS design is usually not enough to create good user experience. However, the changed required might not require too huge amount of effort and will be rewarded byt much better user satisfaction.
Subscribe to:
Posts (Atom)