Set Adapter to Auto Complete Text View

Ankith Reddy
Updated on 30-Jul-2019 22:30:24

1K+ Views

 Before getting into an example, we should know what is autocomplete textview in android. Autocomplete textview is just like an edit text and it is a subclass of editext, but it is going to show suggestion from a list as a dropdown list. We have to set up Threshold value to auto-complete text view. for example, we have set it up Threshold as 1 so if user enters one letter is going to give suggestion according to Threshold letter.This example demonstrates about how to set up an adapter to auto-complete Textview.Step 1 − Create a new project in Android Studio, ... Read More

Prevent Going Back to Previous Activity in Android

George John
Updated on 30-Jul-2019 22:30:24

2K+ Views

There are so many situations, where we should not call back action when user click on back button.This example demonstrates how to integrate Android Login and register form.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/actvity_main.xml.         Step 3 − Add the following code to src/MainActivity.javapackage com.example.andy.myapplication; import android.os.Build; import android.os.Bundle; import android.support.annotation.RequiresApi; import android.support.v7.app.AppCompatActivity; import android.widget.Toast; public class MainActivity extends AppCompatActivity {    int view = R.layout.activity_main;    @RequiresApi(api = ... Read More

Programmer's View of Z-80

Arjun Thakur
Updated on 30-Jul-2019 22:30:24

433 Views

In this section we will see the basic architecture of the Z-80 Microprocessor, and different registers to write programs into it.To write programs we have to care about the registers and some instructions to access them during program execution.From this diagram it is clear that there are some special purpose registers like W, Z, some other registers like Stack Pointer (SP), Program Counter (PC) etc. three general purpose register pairs (BC, DE, HL) and Accumulator A. There is also an 8-bit flag register to hold the flag bits. Up to this, it is like the 8085 architecture, but in Z-80, ... Read More

Remove Highest Element in Java TreeSet

Samual Sam
Updated on 30-Jul-2019 22:30:24

528 Views

To remove the highest element, use the pollLast() method.Create a TreeSet and add elements to it −TreeSet tSet = new TreeSet(); tSet.add("78"); tSet.add("56"); tSet.add("88"); tSet.add("12");Now, remove the highest element −tSet.pollLast()The following is an example to remove highest element in Java TreeSet −Example Live Demoimport java.util.*; public class Demo { public static void main(String args[]){ TreeSet tSet = new TreeSet(); tSet.add("78"); tSet.add("56"); tSet.add("88"); tSet.add("12"); ... Read More

MySQL Query to Change Lower Case to Upper Case

Rishi Rathor
Updated on 30-Jul-2019 22:30:24

8K+ Views

You can use in-built function UPPER() from MySQL to change a lower case to upper case. The syntax is as follows with select statement.SELECT UPPER(‘yourStringValue’);The following is an example showing string in lower case −mysql> select upper('john');Here is the output displaying string in upper case −+---------------+ | upper('john') | +---------------+ | JOHN          | +---------------+ 1 row in set (0.00 sec)If you already have a table with a lower case value, then you can use the UPPER() function with update command. The syntax is as follows −UPDATE yourTableName set yourColumnName = UPPER(yourColumnName);To understand the above concept, let ... Read More

Reload Activity in Android

Chandu yadav
Updated on 30-Jul-2019 22:30:24

7K+ Views

In some situations, we need to recall activity again from onCreate(). This example demonstrates how to reload activity in Android.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/activity_main.xml.     In the above code, We have taken text view, when a user clicks on text view, it will call Main Activity again.Step 3 − Add the following code to src/MainActivity.javapackage com.example.andy.myapplication; import android.content.Intent; import android.os.Build; import android.os.Bundle; import android.support.annotation.RequiresApi; import android.support.v7.app.AppCompatActivity; import android.view.View; import ... Read More

How Fast is the Time from Thought to Google Results?

Jaya P
Updated on 30-Jul-2019 22:30:24

247 Views

When I googled the question "time taken for Google to show the results", I got 19,40,00,000 results in 0.47 seconds.This again varies with the speed of your system's processor and the speed of your internet connection.This wonderful, super fast search engine is 50,000 times faster than the time our brain takes to interpret an image and about 6 million times faster than the time it takes for an average human brain to react to an external stimulus.

PhD vs Qualifying NET Exam for Master's in Literature

Ridhi Arora
Updated on 30-Jul-2019 22:30:24

686 Views

First of all, it must be borne in mind that whatever step one takes in life-related to a course or degree, should be taken keeping in mind what does one need to achieve next or pursue next having this degree in hand. The same goes for all streams of education in India currently. Having said that, if I were to answer which out of Ph. D or NET exam in better to go with for Students pursuing masters in English Literature, again it varies from person to person.When to Choose Ph.D. over NETIf you are a sort of person who ... Read More

Remove OnClickListener for a View in Android

Arjun Thakur
Updated on 30-Jul-2019 22:30:24

2K+ Views

In some situations, We should not allow onClickListener for a view. This example demonstrates how to remove onClickListener for a view in android.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/acitivity_main.xml.     In the above code, we have taken a text view, In this example, we should remove onClickListner for this text view.Step 3 − Add the following code to src/MainActivity.javapackage com.example.andy.myapplication; import android.content.res.Configuration; import android.os.Build; import android.os.Bundle; import android.support.annotation.RequiresApi; import android.support.v7.app.AppCompatActivity; import ... Read More

What is Vernier Calipers and How It is Used for Measurement

Vandana Rao
Updated on 30-Jul-2019 22:30:24

3K+ Views

Measuring things and distances is one of the important concepts to learn when we are studying maths. For maximum uses, measuring scales do the work quite well and everyone is aware of it how to use one. But the measuring scale only provides a specific level of correctness and once you need exact measurements which lie between two spots on the scale it becomes difficult to get a correct reading without a bit of counterpart.Also measuring scales are very vulnerable to parallax mistakes which can cause a huge portion of the difference in readings from person to person which is ... Read More

Advertisements