Search

androidsubway

android tips & tricks

Month

December 2015

Android Versions

There are many type of android version’s Continue reading “Android Versions”

Shortcuts in Android Studio

Android Studio is the most widely used IDE for Android Development. An IDE can definitely boost up your development if you know how to use is properly. If you knows the basic shortcuts and tweaks, your development time would definitely be reduced. Continue reading “Shortcuts in Android Studio”

Creating Filter for Custom Adapter | Android ListView

Create two list in your adapter one the one which is coming from the previous activity
and another one which will contain filtered data

here fl is the filtered list and l is default list

Add the following method to your adapter
and call it when needed

    public void filter(String charText) {
        charText = charText.toLowerCase(Locale.getDefault());
        fl.clear();
        if (charText.length() == 0) {
            fl.addAll(l);
        }
        else
        {
            for (ModelObject wp : l)
            {
                if (wp.getCountry().toLowerCase(Locale.getDefault()).contains(charText))
                {
                    fl.add(wp);
                }
            }
        }
        notifyDataSetChanged();
    }

Activity Life Cycle

In this diagram shows the important state paths of an Activity. The square rectangles represent callback methods you can implement to perform operations when the Activity moves between states. The colored ovals are major states the Activity can be in. Continue reading “Activity Life Cycle”

TextView in Android | Multiline & Scrollable

Making your textview scrollable

xml portion:
add these: Continue reading “TextView in Android | Multiline & Scrollable”

Using Volley for Network Calls

Volley is a library which can be used as an alternate to AsynTask. It has a lot more features, also it provide image caching.

 

Custom | Hindi Font in Android

Learn ,How to use Custom Font in android. Continue reading “Custom | Hindi Font in Android”

Floating button in Android

We have use

- Frame Layout
drawable/circle.xml

<?xml version="1.0" encoding="utf-8"?>
<shape
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:shape="oval">

    <solid android:color="#FF5722" />
    <size
        android:width="200dp"
        android:height="200dp" />

</shape>




activity_main.xml

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical">
        
          <!-- Your content here -->

            <Button
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/hello_world"
                android:background="@drawable/circle"
                android:layout_gravity="right|bottom"/>
        </FrameLayout>

Android | A Brief Intro

Basic Android Terminologies

Application – Collection of activities or a single activity. Continue reading “Android | A Brief Intro”

Blog at WordPress.com.

Up ↑