Tampilkan postingan dengan label image. Tampilkan semua postingan
Tampilkan postingan dengan label image. Tampilkan semua postingan

Android JellyBean new features

Posted by Unknown Kamis, 19 September 2013 0 komentar
# WI-Fi Direct
# 1080p video recording for stock Android devices
# Improved error correction on the keyboard
# You can directly access the apps from the lock screen
# Upgraded copy and paste functionality
# Support for the WebP image format
# Hardware acceleration of the universal Interface
# Soft buttons from Android 3.x are now available for use on phones
# Widgets in a new tab can be separated, listed in a similar manner to apps
# Folders can easily be created with a drag-and-drop style
# Launcher Customizer
# Enhanced visual voicemail with the ability to speed up or slow down voicemail messages
# Pinch-to-zoom functionality in the calendar
# Integrated screenshot capture (accomplished by holding down the Power and Volume-Down buttons)
# Improved voice integration and continuous, real-time speech to text dictation
# Face Unlock, a feature that allows users to unlock handsets using facial recognitionsoftware
# New tabbed web browser under Google’s Chrome brand, allowing up to 16 tabs
# Automatic syncing of browser with users’ Chrome bookmarks
# A new typeface family for the UI, Roboto
# A data Usage section in settings that lets users set warnings when they approach a certain usage limit, and disable data use when the limit is exceeded
# Shut down apps ability that are using data in the background
# An improved camera app with zero shutter lag, time lapse settings, panorama mode, and the ability to zoom while recording
# Built-in photo editor
# You can organize New gallery layout by location and person
# Refreshed “People” app with social network integration, status updates and hi-resimages
# A near-field communication feature (Android Beam) allowing the rapid short-range exchange of web bookmarks, contact info, directions, YouTube videos and other data
# Android VPN Framework (AVF), and TUN (but not TAP) kernel module.

Baca Selengkapnya ....

Regular bitmap and a Nine-patch image

Posted by Unknown Minggu, 23 Juni 2013 0 komentar
A Nine-patch image allows resizing that can be used as background or other image size requirements for the target device. The Nine-patch refers to the way you can resize the image: 4 corners that are unscaled, 4 edges that are scaled in 1 axis, and the middle one that can be scaled into both axes.

Baca Selengkapnya ....

Simple AutoComplete TextView in ANDROID

Posted by Unknown Jumat, 22 Maret 2013 0 komentar

public class Autocomplete extends Activity {
String name[]={
"John", "Angel", "Mark", "Angelina",
"Jhony", "Juli", "Augustine", "Robert",
"Reena", "Ancilina", "Mary", "Juliet"
};
AutoCompleteTextView autotextview;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_autocomplete);

autotextview=(AutoCompleteTextView) findViewById(R.id.myautocomplete);
autotextview.setAdapter(new ArrayAdapter<string>(this, android.R.layout.simple_dropdown_item_1line, name));

}

Baca Selengkapnya ....

ContextMenu in Android

Posted by Unknown Kamis, 17 Januari 2013 0 komentar
Long click on the button to open the menu.
in java class:

public class ContextmenuActivity extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);

Button b=(Button)findViewById(R.id.button1);
registerForContextMenu(b);
}
//create the menuuu======================
@Override
public void onCreateContextMenu(ContextMenu menu, View v,
ContextMenuInfo menuInfo) {
// TODO Auto-generated method stub
super.onCreateContextMenu(menu, v, menuInfo);
MenuInflater inflater=getMenuInflater();
inflater.inflate(R.layout.contextmenu, menu);

}
//click to each menu======================
@Override
public boolean onContextItemSelected(MenuItem item) {
// TODO Auto-generated method stub
if(item.getItemId()==R.id.item1)
{
System.out.println("item1 clicked");
}
if(item.getItemId()==R.id.item2)
{
System.out.println("item2 clicked");
}
if(item.getItemId()==R.id.item3)
{
System.out.println("item3 clicked");
}
if(item.getItemId()==R.id.item4)
{
System.out.println("item4 clicked");
}
return super.onContextItemSelected(item);
}}

Context Menu Xml:

< ?xml version="1.0" encoding="utf-8"?>
< menu xmlns:android="http://schemas.android.com/apk/res/android">
< group android:checkableBehavior="single">
< item android:id="@+id/item1" android:title="Item 1" />
< item android:id="@+id/item2" android:title="Item 2" />
< item android:id="@+id/item3" android:title="Item 3" />
< item android:id="@+id/item4" android:title="Item 4" />
< /group>
< /menu>
in main 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:gravity="center">
< Button
android:id="@+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Button" />
< /RelativeLayout>
         

Baca Selengkapnya ....

Frame by Frame Animation in Android

Posted by Unknown Selasa, 15 Januari 2013 0 komentar
Call a new xml file which includes the frames that are to be loaded:

< ?xml version="1.0" encoding="utf-8"?>
< animation-list android:oneshot="false" xmlns:android="http://schemas.android.com/apk/res/android">
< item android:drawable="@drawable/frame_above95_1" android:duration="30"/>
< item android:drawable="@drawable/frame_above95_2" android:duration="30"/>
< item android:drawable="@drawable/frame_above95_3" android:duration="30"/>
< item android:drawable="@drawable/frame_above95_4" android:duration="30"/>
< item android:drawable="@drawable/frame_above95_5" android:duration="30"/>
< item android:drawable="@drawable/frame_above95_6" android:duration="30"/>
< item android:drawable="@drawable/frame_above95_7" android:duration="30"/>
< item android:drawable="@drawable/frame_above95_8" android:duration="30"/>
< item android:drawable="@drawable/frame_above95_9" android:duration="30"/>
< item android:drawable="@drawable/frame_above95_10" android:duration="30"/>
< item android:drawable="@drawable/frame_above95_11" android:duration="30"/>
< item android:drawable="@drawable/frame_above95_12" android:duration="30"/>
< item android:drawable="@drawable/frame_above95_13" android:duration="30"/>
< item android:drawable="@drawable/frame_above95_14" android:duration="30"/>
< item android:drawable="@drawable/frame_above95_15" android:duration="30"/>
< item android:drawable="@drawable/frame_above95_16" android:duration="30"/>
< item android:drawable="@drawable/frame_above95_17" android:duration="30"/>
< item android:drawable="@drawable/frame_above95_18" android:duration="30"/>
< /animation-list>
in java file:

img1.setBackgroundResource(R.layout.animation_above95);
AnimationDrawable anim=(AnimationDrawable)img1.getBackground();
anim.start();

Baca Selengkapnya ....

Download an Image from Url and Display it in a ImageView

Posted by Unknown 0 komentar

Bitmap bmImg;
ImageView img1;
@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
setContentView(R.layout.sending_card);
img1=(ImageView) findViewById(R.id.imageView1);
String url="http://i.123g.us/c/efeb_valen_happy/card/107397.gif";
downloadFile(url);
}
void downloadFile(String fileUrl){
URL myFileUrl =null;
try {
myFileUrl= new URL(fileUrl);
} catch (MalformedURLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
try {
HttpURLConnection conn=
(HttpURLConnection)myFileUrl.openConnection();
conn.setDoInput(true);
conn.connect();
InputStream is = conn.getInputStream();
bmImg = BitmapFactory.decodeStream(is);
img1.setImageBitmap(bmImg);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}}

Baca Selengkapnya ....

Passing Images between Activities in Android

Posted by Unknown Senin, 07 Januari 2013 0 komentar
in First Activity:

Intent intent=new Intent(FirstClass.this, SecondClass.class);
Bundle bundle=new Bundle();
bundle.putInt("image",R.drawable.ic_launcher);
intent.putExtras(bundle);
startActivity(intent);
in Second Acticity:

Bundle bundle=this.getIntent().getExtras();
int pic=bundle.getInt("image");
v.setImageResource(pic);
another method:
in First Activity:

Drawable drawable=imgv.getDrawable();
Bitmap bitmap= ((BitmapDrawable)drawable).getBitmap();
ByteArrayOutputStream baos = new ByteArrayOutputStream();
bitmap.compress(Bitmap.CompressFormat.PNG, 100, baos);
byte[] b = baos.toByteArray();
Intent intent=new Intent(Passimage.this,myclass.class);
intent.putExtra("picture", b);
startActivity(intent);
in Second Acticity:

Bundle extras = getIntent().getExtras();
byte[] b = extras.getByteArray("picture");
Bitmap bmp = BitmapFactory.decodeByteArray(b, 0, b.length);
ImageView image = (ImageView) findViewById(R.id.imageView1);
image.setImageBitmap(bmp);

Baca Selengkapnya ....

GridView in Android

Posted by Unknown 0 komentar
in xml file:

< pre class="brush: java"<
< ?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"
>
< GridView
android:id="@+id/gridView1"
android:numColumns="auto_fit"
android:gravity="center"
android:columnWidth="50dp"
android:stretchMode="columnWidth"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >

< /GridView>
< /LinearLayout>
in java file:

public class Gridviewactivity extends Activity {
GridView gridView;
static final String[] numbers = new String[] {
"A", "B", "C", "D", "E",
"F", "G", "H", "I", "J",
"K", "L", "M", "N", "O",
"P", "Q", "R", "S", "T",
"U", "V", "W", "X", "Y", "Z"};
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);

gridView=(GridView) findViewById(R.id.gridView1);
ArrayAdapter adapter=new ArrayAdapter(this,android.R.layout.simple_list_item_1,numbers);
gridView.setAdapter(adapter);
gridView.setOnItemClickListener(new OnItemClickListener() {
public void onItemClick(AdapterView arg0, View v, int position,long arg3)
{
Toast.makeText(getApplicationContext(),
((TextView) v).getText()+ "at position"+position, Toast.LENGTH_SHORT).show();
}

});
}}

Baca Selengkapnya ....

Simple ListView in Android

Posted by Unknown Jumat, 04 Januari 2013 0 komentar
xml page:eazy_list
< RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent" >
< ListView
android:id="@android:id/list"
android:layout_width="fill_parent"
android:layout_height="wrap_content">

< /ListView>
< /RelativeLayout>
java page:
 public class MainActivity extends ListActivity 

{
String[] planets = new String[] { "Mercury", "Venus", "Earth", "Mars",
"Jupiter", "Saturn", "Uranus", "Neptune","Ceres","Pluto"};
ListView lstv;
private ArrayAdapter listAdapter ;

@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
lstv=getListView();
listAdapter = new ArrayAdapter(this,android.R.layout.simple_expandable_list_item_1, planets);
setListAdapter(listAdapter);
}}

Baca Selengkapnya ....

Working with images in Corona

Posted by Unknown Kamis, 03 Januari 2013 0 komentar
Loading an Image :
syntax:
display.newImage( filename [, baseDirectory] [, left, top] )
example:
newImage = display.newImage( "image.png", 10, 20 ) myImage2 = display.newImage( "image.png" )
Image Autoscaling:
The default behavior of display.newImage() is to auto-scale large images.To control manually we can use boolean value.
syntax:
display.newImage( [parentGroup,] filename [, baseDirectory] [, x, y] [,isFullResolution] )
example:
newImage = display.newImage( "image.png", 10, 20, true )
Images with Dynamic Resolution :
syntax:
display.newImageRect( [parentGroup,] filename [, baseDirectory] w,h )
example:
newImage = display.newImageRect( "Image.png", 100, 100 )

Baca Selengkapnya ....
Trik SEO Terbaru support Online Shop Baju Wanita - Original design by Bamz | Copyright of android populer.