auto complete text view in anroid

How To Create Autocomplete Text View in Android

Autocomplete Text View in Android

If you want to make an android app which has autocomplete text view. And you are also facing a problem in autocomplete text view then you should read this article. Here you can get all information about Autocomplete Text View in Android.




You should read this code:

activity_main.xml:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:orientation="vertical"
    android:layout_height="match_parent"
    tools:context="sumit.net.autocompeletetext.MainActivity">

    <AutoCompleteTextView
        android:id="@+id/actv1"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
         />
</LinearLayout>

MainActivity.java

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.widget.ArrayAdapter;
import android.widget.AutoCompleteTextView;

public class MainActivity extends AppCompatActivity {
AutoCompleteTextView actv;
    String name[]={"amar","ashok","amit","abhishek","sumit","vivek","aniket","manish"};
    ArrayAdapter<String>advp;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        actv=(AutoCompleteTextView)findViewById(R.id.actv1);
        advp=new ArrayAdapter<String>(this,android.R.layout.simple_list_item_1,name);
        actv.setAdapter(advp);
        actv.setThreshold(1);
    }
}




The output of Autocomplete Text View in Android

auto complete text view in anroid

introduction-of-css

How to Set Space Between two Lines, Characters & Words By CSS

How to Set Space Between two Lines, Characters & Words

Space Between Two Lines:

If you want to give space between two lines then you should read this article. Here you can get information about it with example.

  • It Specifies some space between two lines of a paragraph of text.
  • Line-height: 1.4;

Syntax:

ElementSelector{

line-height:1.4;

}




Space Between Two Letters:

If you want to provide space between two letters then here some points are given below which may helpful for you.

  • It specifies the space between two letters of a text.
  • Letter-spacing: 4px;

Syntax:

ElementSelector{

letter-spacing: 4px;

}

 

Space Between Two Words:

If you want to provide space between two words then you should read these lines which are given below:

It specifies the space between two words of a text.

Word-spacing: 10px;

Syntax:

ElementSelctor{

word-spacing: 10px;

}





Example:

<!DOCTYPE html>

<html>

<head>

<style type="text/css">

p{

line-height: 2.4;

letter-spacing: 2px;

word-spacing: 20px;

}

</style>

</head>

<body>

<p>

This is a paragraph.This is a paragraph.This is a paragraph.This is a paragraph.This is a paragraph.This is a paragraph.This is a paragraph.This is a paragraph.This is a paragraph.This is a paragraph.This is a paragraph.This is a paragraph.This is a paragraph.This is a paragraph.This is a paragraph.This is a paragraph.This is a paragraph.This is a paragraph.This is a paragraph.This is a paragraph.This is a paragraph.This is a paragraph.

</p>

</body>

</html>





Output:

space

Flipkart’s Mobile 2018 Happy New Year Sale | Discounts on some the top smartphones of 2017

Flipkart’s Mobile 2018 Happy New Year Sale | Discounts on some the top smartphones of 2017

Flipkart has released details about its upcoming “Mobile 2018 New Year-Sale”. The sale includes significant discounts on some of 2017’s best smartphones.

Before we list out the deals, however, it bears mention that as usual, the Flipkart’s discounts aren’t as spectacular as the ads make out. Also as usual, Amazon ends up offering lower prices on many of the products.

Flipkart sale offers on mobiles

During the Flipkart 2018 Mobiles Bonanza sale, the Xiaomi Mi A1 will be available with a discounted price of Rs. 12,999 (MRP 13,999). The Android One smartphone was launched at Rs. 14,999 but recently received a permanent price cut of Rs. 1,000. Flipkart is also set to sell the Google Pixel 2 and Pixel 2 XL with a price as low as Rs. 39,999 (MRP starts at Rs. 61,000). This includes the Rs. 8,000 discount on HDFC Credit EMI transactions. The Pixel 2 sale will begin at midnight on January 3.

In case if you don’t want to go for the premium Pixel 2 handsets, the Flipkart sale will offer you the Moto G5 Plus (4GB variant) at Rs. 9,999 (MRP Rs. 16,000). The Redmi Note 4, which is Xiaomi’s top-selling smartphone in the country, will be available under the new sale with a price tag of Rs. 10,999 (MRP Rs. 12,999). This discounted price will be applied for the 4GB Redmi Note 4 variant that has 64GB onboard storage. Further, the Flipkart sale page has listed the Lenovo K5 Note 4GB at Rs. 11,481 (MRP Rs. 13,499).

Thankfully, the company is at least offering a 50 percent buyback guarantee on the products, which is something that rivals don’t yet offer. The value of that offer, however, depends on the type of phone you’re buying.

Other offers include a flat Rs 2,018 off several models, likely in celebration of the new year.

Most of the sales go live at midnight and noon of 3 January and run till 5 January so be sure to check in at that time if you want to save a bit of cash. Be sure to first check out the discounts offered on competing sites, however.

Mobile phones under 10000