Pages

Showing posts with label daftar. Show all posts
Showing posts with label daftar. Show all posts

Thursday, April 14, 2016

Android ScrollView

suppose that we use Linear or relative layouts to display lots of data. the data may span the size of the screen so that some of it may not appear.
to overcome this we use ScrollView which gives us a scrollable layout for large data.
Suppose that our activity displays a large number of controls or content like this layout:
<?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_id="@+id/txt"
/>

<Button
android_layout_width="fill_parent"
android_layout_height="wrap_content"
android_text="Button 1"
/>
<Button
android_layout_width="fill_parent"
android_layout_height="wrap_content"
android_text="Button 2"
/>
<Button
android_layout_width="fill_parent"
android_layout_height="wrap_content"
android_text="Button 3"
/>
<Button
android_layout_width="fill_parent"
android_layout_height="wrap_content"
android_text="Button 4"
/>
<Button
android_layout_width="fill_parent"
android_layout_height="wrap_content"
android_text="Button 5"
/>
<Button
android_layout_width="fill_parent"
android_layout_height="wrap_content"
android_text="Button 6"
/>
</LinearLayout>


This is a linear layout that displays a TextView with large text and some Buttons. As we can see, not all the buttons are displayed and that the layout does not fit in the device screen.

The solution to this problem is to use ScrollView as a container for the controls and a scroll bar to make the layout fit in the screen.

We will now change the layout with this code:
<?xml version="1.0" encoding="utf-8"?>
<ScrollView

android_layout_width="fill_parent"
android_layout_height="wrap_content"
>
<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_id="@+id/txt"
/>

<Button
android_layout_width="fill_parent"
android_layout_height="wrap_content"
android_text="Button 1"
/>
<Button
android_layout_width="fill_parent"
android_layout_height="wrap_content"
android_text="Button 2"
/>
<Button
android_layout_width="fill_parent"
android_layout_height="wrap_content"
android_text="Button 3"
/>
<Button
android_layout_width="fill_parent"
android_layout_height="wrap_content"
android_text="Button 4"
/>
<Button
android_layout_width="fill_parent"
android_layout_height="wrap_content"
android_text="Button 5"
/>
<Button
android_layout_width="fill_parent"
android_layout_height="wrap_content"
android_text="Button 6"
/>
</LinearLayout>
</ScrollView>
As you can see the result is a scroll bar that we can use to see all the controls within the layout like this:


Remember, the ScrollView can have only one child control, so we can make a container (Linear, relative, Table Layouts) the child of the ScrollView and put all the controls inside this child.

So what do we do if we want to display this layout Horizontally ? In this case were going to use another container which is HorizontalScrollView. This container acts the same as the ScrollView except that it scrolls child controls horizontally.

Now our layout will be like this:
<?xml version="1.0" encoding="utf-8"?>
<HorizontalScrollView

android_layout_width="fill_parent"
android_layout_height="wrap_content"
>
<LinearLayout
android_orientation="horizontal"
android_layout_width="fill_parent"
android_layout_height="fill_parent"
>
<TextView
android_layout_width="fill_parent"
android_layout_height="wrap_content"
android_id="@+id/txt"
/>

<Button
android_layout_width="fill_parent"
android_layout_height="wrap_content"
android_text="Button 1"
/>
<Button
android_layout_width="fill_parent"
android_layout_height="wrap_content"
android_text="Button 2"
/>
<Button
android_layout_width="fill_parent"
android_layout_height="wrap_content"
android_text="Button 3"
/>
<Button
android_layout_width="fill_parent"
android_layout_height="wrap_content"
android_text="Button 4"
/>
<Button
android_layout_width="fill_parent"
android_layout_height="wrap_content"
android_text="Button 5"
/>
<Button
android_layout_width="fill_parent"
android_layout_height="wrap_content"
android_text="Button 6"
/>
</LinearLayout>
</HorizontalScrollView>


In order to achive the Horizontal scrolling, we had to change the Orientation of the child LinearLayout to Horizontal.

You may have noticed that the scroll bar disappears (fades out) after scrolling, you can set the time interval in which the scroll bar fades out by setting this time interval (in milli-seconds) through the android:scrollbarFadeDuration property. To make the scroll bar always visible we set the time interval to zero: android:scrollbarFadeDuration="0".
Read More..

Sunday, April 10, 2016

Daftar AntiVirus Terbaru Terbaik For Android 2016

Download 3 Antivirus Untuk Android Terbaik dan Ringan 2016 - Apakah di dalam perangkat smartphone milik anda sudah terpasang atau di install antivirus ?? Jika belum, disini saya akan memberikan bocoran 3 antivirus yang sangat bagus dan recomend untuk digunakan di smartphone Android milik anda.


Seperti kita ketahui, Antivirus ini berperan sebagai aplikasi yang berguna untuk melindungi perangkat elektronik dari berbagai macam serangan virus dunia maya. Akan tetapi sekarang ini banyak sekali aplikasi antivirus yang justru mencuri data pengguna perangkat tersebut, terutama Android. Nah, 3 Antivirus Terbaik dan Terbaru ini semoga akan menjadi perisai di smartphone anda dari serangan malware, berikut kita simak ulasannya.

Daftar AntiVirus Terbaru, Terbaik For Android 2016



AntiVirus Terbaru, Terbaik For Android 2016

Avast kembali merilis aplikasi antivirus untuk Hp Android. Aplikasi tersebut diberi nama dengan Avast Mobile Security. Ada banyak keunggulan ketika kita menggunakan aplikasi ini, mulai dari tampilannya yang cukup dinamis hingga fitur penyaringan virus lebih ketat.

Anda bisa download Avast Mobile Security secara gratis melalui Play Store. Versi gratis sebenarnya sudah memiliki fitur cukup lengkap, tetapi jika ingin lebih lengkap dan canggih lagi Anda bisa menggunakan versi berbayarnya.
AVAST Mobile Security
2. AVG Antivirus Security
 
Setelah sukses menjadi aplikasi antivirus komputer, kini AVG Antivirus Security telah dirilis untuk versi mobile secara gratis. Hampir mirip dengan versi PC, aplikasi ini memiliki tiga fitur utama yakni antivirus, anti melware, dan anti physing.
Selain memiliki fitur yang lumayan canggih, AVG Antivirus juga sangat mudah sekali digunakan. Kapan saja Anda memerlukan scanning virus, maka cukup dengan menekan tombol aktif/non-aktif.
AVG Antivirus Security
3. Kaspersky Internet Security
 
Aplikasi Antivirus Android terbaik yang terakhir adalah Kapersky Internet Security. Aplikasi ini sudah dibekali dengan fitur anti pencurian, padahal fitur tersebut pada aplikasi lain hanya bisa digunakan untuk versi berbayar. Selain anti pencurian, fitur antivirusnya juga mampu menjaring berbagai macam aktivitas mencurigakan di dalam ponsel.
Kaspersky Internet Security
Demikian informasi singkat seputar AntiVirus Terbaru, Terbaik For Android 2016 yang bisa kami sajikan. Semoga dapat menjadi sumber referensi bermanfaat bagi Anda. Selamat mencoba dan semoga bermanfaat.
Read More..