Pages

Showing posts with label wallpaper. Show all posts
Showing posts with label wallpaper. Show all posts

Saturday, May 14, 2016

Android Text Controls

Text controls include:

1. TextView.

2. EditText

3. AutoCompleteEditText

4. MultiCompleteTextView

TextView
The TextView represent an un-editable text. It resembles the Label control in C# or ASP.NET but it has an interesting feature which is the ability to highlight the text if its is an URL, an e-mail or a phone number so that when the user clicks on the textview the default intent whether it is the web browser or the dialer launches
<?xml version="1.0" encoding="utf-8"?>
<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="Visit Http://www.android-pro.blogspot.com"
android_autoLink="web"
android_id="@+id/txtURL"
/>

<TextView
android_layout_width="fill_parent"
android_layout_height="wrap_content"
android_text="Dial 1 650-253-0000"
android_autoLink="all"
/>
</LinearLayout>


you can see that the TextViews containing URLs or Phone numbers are highlighted, and when the user presses on them the default intent (the browser or the dialer launches)


this is done by using the property android:autoLink which can have the values:
web, email ,phone, map
or
All
this can be achieved from code by using the following code:
TextView txtURL=(TextView)findViewById(R.id.txtURL);
Linkify.addLinks(txtURL, Linkify.ALL);

EditText
The EditText is a subclass of the TextView it is like the TextBox in C#. it enables users to edit text.


We can use the autoText property to make the EditText to correct the common spelling mistakes.

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
android_orientation="vertical"
android_layout_width="fill_parent"
android_layout_height="fill_parent"
>
<EditText
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:autoText="true"

/>
</LinearLayout>



We can use the capitalize property to make the text capitalized like this:
<LinearLayout 
android_orientation="vertical"
android_layout_width="fill_parent"
android_layout_height="fill_parent"
>

<EditText
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:capitalize="characters"

/>
<EditText
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:capitalize="none"
/>
<EditText
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:capitalize="words"
/>
</LinearLayout>



we can use the password property to make the control accepts phone numbers input:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
android_orientation="vertical"
android_layout_width="fill_parent"
android_layout_height="fill_parent"
>

<EditText
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:password="true"

/>

</LinearLayout>



We can enforce the Control to wrap all the text in a single line by setting android:singleLine property to true.

AutoCompleteTextView
The autoCompleteTextView is an EditText with auto complete functionality. The auto complete functionality can be achieved by attaching an Adapter with the auto complete values to the control like this:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
android_orientation="vertical"
android_layout_width="fill_parent"
android_layout_height="fill_parent"
>

<AutoCompleteTextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="@+id/act"

/>

</LinearLayout>



Then attach the adapter from the code like this:
AutoCompleteTextView act=(AutoCompleteTextView)findViewById(R.id.act);
ArrayAdapter arr=new ArrayAdapter(this,android.R.layout.simple_dropdown_item_1line,new String []{"Hello","Hi","Alloha"});
act.setAdapter(arr);

in a search program for example you can obtain the auto complete words from a web service and populate the adapter with these words.

MultiAutoCompleteTextView

The AutoCompleteTextView can suggest auto complete for the entire text in the control, meaning that if you type more than one word it would try to match the whole sentence not the single words.
The MultiAutoCompleteTextView works the same way as the AutoCompleteTextView except you can add a Tokenizer that parses the text and allows you to suggest where to start suggesting words like this:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
android_orientation="vertical"
android_layout_width="fill_parent"
android_layout_height="fill_parent"
>

<MultiAutoCompleteTextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="@+id/act"

/>

</LinearLayout>


then from code:
MultiAutoCompleteTextView mact=(MultiAutoCompleteTextView)findViewById(R.id.act);
ArrayAdapter arr=new ArrayAdapter(this,android.R.layout.simple_dropdown_item_1line,new String []{"Hello","Hi","Alloha"});
mact.setAdapter(arr);
mact.setTokenizer(new MultiAutoCompleteTextView.CommaTokenizer());

The tokenizer tells the control to start suggesting for words separated by a comma.
Read More..

Monday, April 11, 2016

Koi Live Wallpaper PREMIUM PRO for ANDROID

Koi Live Wallpaper Premium Logo


Watch Koi happily explore their pond! Colorful fish and beautiful backgrounds make Koi Live Wallpaper better than the real thing! Select from 20 different Koi types!
Read More..

Monday, March 21, 2016

Kamna Jethmalani Beautiful Hd Wallpaper Free 3D Wallpaper

Kamna Jethmalani Beautiful Hd Wallpaper Free
gebycute.blogspot.com - Kamna Jethmalani Beautiful HD Wallpaper Free
Kamna Jethmalani Beautiful Hd Wallpaper Free
Kamna Jethmalani Beautiful HD Wallpaper Free
Kamna Jethmalani Beautiful Hd Wallpaper Free
Kamna Jethmalani Beautiful HD Wallpaper Free
Kamna Jethmalani Beautiful Hd Wallpaper Free
Kamna Jethmalani Beautiful HD Wallpaper Free
Kamna Jethmalani Beautiful Hd Wallpaper Free
Kamna Jethmalani Beautiful HD Wallpaper Free
Kamna Jethmalani Beautiful Hd Wallpaper Free
Kamna Jethmalani Beautiful HD Wallpaper Free
Kamna Jethmalani Beautiful Hd Wallpaper Free
Kamna Jethmalani Beautiful HD Wallpaper Free
Kamna Jethmalani Beautiful Hd Wallpaper Free
Kamna Jethmalani Beautiful HD Wallpaper Free
Kamna Jethmalani Beautiful Hd Wallpaper Free
Kamna Jethmalani Beautiful HD Wallpaper Free
Kamna Jethmalani Beautiful Hd Wallpaper Free
Kamna Jethmalani Beautiful HD Wallpaper Free
Seo Tags: Kamna Jethmalani Beautiful hd wallpapers , Kamna Jethmalani Beautiful pics , Kamna Jethmalani Beautiful pictures , Kamna Jethmalani Beautiful fotos, Kamna Jethmalani Beautiful photo , Kamna Jethmalani Beautiful wallpapers , Kamna Jethmalani Beautiful download wallpapers , Kamna Jethmalani Beautiful pc wallpapers , Kamna Jethmalani Beautiful images , Kamna Jethmalani Beautiful computer wallpapers , Kamna Jethmalani Beautiful wide wallpapers , Kamna Jethmalani Beautiful hq wallpapers , Kamna Jethmalani Beautiful best wallpapers, Kamna Jethmalani Beautiful good wallpapers , Kamna Jethmalani Beautiful beutiful wallpapers , Kamna Jethmalani Beautiful latest wallpapers....

Read More..

Saturday, March 19, 2016

Android Intents Part 2 Passing data and returning results between activities

In a previous post we said that intents describe that an action to be performed. we saw how to launch phone activities like phone dialer with intents, and how we passed data (The phone number to dial) to the phone activity.
in this activity were going to see how to use intents to launch several activities within the same application and how to pass data between them.

we will make an application with three activities: each activity has a button that when pressed navigates to the next activity in a round-robin fashion.
this is how each activity looks like:

each button will navigate to the next activity like this:
btn1.setOnClickListener(new OnClickListener() {

public void onClick(View v) {
// TODO Auto-generated method stub
Intent intent=new Intent(IntentsDemo2.this,Activity2.class);
startActivity(intent);
}
});

and the same for each button in the other activities.

we create the intent with a constructor that takes two parameters:
  1. Context: a reference to the current activity.
  2. Class: the type of the activity to be launched by the intent. 
Passing Results between Intents:

By default when you launch an activity using an intent you dont have a feedback on the whether the launched activity finished its work or not.

we can launch an activity as a sub activity of a parent activity. this means that when the sub activity closes it triggers an event handler in the parent

consider the previous example, we want each activity to display the name of the  activity that was displayed before it.

so we launch the intent normally but we use the Intent.putExtra(String Name,String Value) method to pass any extra data needed.

in the first activity we launch the secondactivity like this:
Intent intent=new Intent(IntentsDemo2.this,Activity2.class);
intent.putExtra("ComingFrom", "Acticity 1");
final int result=1;
startActivityForResult(intent, result);

we did not use the startActivity method as we did before, instead we used startActivityForResult(Intent intent, int requestCode)
thich takes two parameters:
  1. The intent to start.
  2. Request code: which is an integer identifier that is used as a corelation id to identify which sub activity has finished its work (will explain later) .
so the above code launches a sub activity and passes it an extra peice of information via Intent.putExtra method.

Receiving Extra data in sub activity
now the sub activity has been started with an intent from the parent with some extra data. to retreive this data in the sub activity we use the getIntent() method.

the getIntent() method returns a reference t the intent tha started the sub activity.
so in the sub activity we can call the method like this:
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main2);
Intent sender=getIntent();
String extraData=sender.getExtras().getString("ComingFrom");
}

this retreives the extra data added to the intent in the parent activity.

Handling sub activity results
now suppose that the parent activity wants to know what was the result returned from the sub activity or wants to get some data from the sub activity, this is handled by overriding the onActivityResult method in the parent activity.

now suppose that the sub activity wants to pass a string containg the word "Hello" to the parent activity.
in the sub activity there is a button that when pressed returns to the parent activity.
the buttons click event handler can be like this
btn.setOnClickListener(new OnClickListener() {

public void onClick(View v) {
// TODO Auto-generated method stub
Intent intent=new Intent();
intent.putExtra("ComingFrom", "Hello");
setResult(RESULT_OK, intent);
finish();
}

here we used the intent.putExtra method to pass the extra data.

we also used the setResult(int result,Intent intent) method to set a result code to be sent to the caller parent activity.
the result code often has two predefined values Result_OK or Result_CANCELED. you can define any result value you want.

also we called finish() method that closes the activity and returrns to the caller activity.

when the finish() method is invoked in the sub activity, the onActivityResult callback method is invoked in the caller activity.

so when overriding the onActivityResult method in the caller activity we can get the data passed from the sub activity.

@Override
public void onActivityResult(int requestCode,int resultCode,Intent data)
{
super.onActivityResult(requestCode, resultCode, data);

String extraData=data.getStringExtra("ComingFrom"));
}

so this was how intents can be used to pass data and return results between several activities within the same applications.
H9GYCEXU8DZF
Read More..

Friday, March 11, 2016

Hotspot Shield Free Elite VPN



Link Download : [Here]  

HSS is an application which can be downloaded for FREE and their role as an application for the protection of our connection to the outside network to do online shopping or web session, because HSS will protect from tapping existing data on our network (HSS using HTTPS), in addition to the HSS able to hide the IP addresses so that we can access all the content in the block on our internet gateway network

Looking at the above functions HSS and HSS we use whats in it??
most people will take advantage of HSS because their role is able to hide the IP address of our network in other words we will be free to access content (websites, survey or offer games) from all over the world and with the use of HSS, we would not be detected from Indonesia then we can also follow the offer or survey to get a gaming token ninja saga

If you have already downloaded, connect HSS as shown below



Read More..

Thursday, February 25, 2016

Bobol Deep Freeze dengan AntiDeepFreeze

Cara membobol Deep Freeze versi 6.6 kebawah



Anda memiliki Deep Freeze versi 6.6 kebawah?
Lupa password-nya barang kali?
Tenang, tak usah bingung, saya akan memberikan trik untuk membobol Deep Freeze.
Software ini dapat membobol password Deep Freeze.

Read More..

Friday, February 19, 2016

GO Launcher Theme Wallpaper 2 011 for Android Terbaru 2016

Read More..

Wednesday, February 10, 2016

Noor Bukhari Beautiful Hd Wallpaper Free 3D Wallpaper

Noor Bukhari Beautiful Hd Wallpaper FreeRead more »
Read More..