1. Download our Official Android App: Forums for Android!

Apps what is meaning of v7 ?

Discussion in 'Android Development' started by Bee Torika, May 13, 2016.

  1. Bee Torika

    Bee Torika Member
    Thread Starter
    Rank:
    None
    Points:
    26
    Posts:
    35
    Joined:
    Nov 12, 2015

    Nov 12, 2015
    35
    2
    26
    Hi ,

    what is meaning of v7 when we type as below in some layout xml file... ?

    Code (Text):
    1. <android.support.v7.widget.RecyclerView
    2.         android:id="@+id/hogehoge"
    3.         android:layout_width="match_parent"
    4.         android:layout_height="match_parent">
    5.     </android.support.v7.widget.RecyclerView>
    It dose mean the feature added at android version 7 (android N ?) ?

    Thanks :)
     

    Advertisement

  2. LV426

    LV426 I say we take off and nuke this place from orbit
    Moderator
    Rank:
     #11
    Points:
    1,988
    Posts:
    7,307
    Joined:
    Oct 16, 2015

    Oct 16, 2015
    7,307
    10,416
    1,988
    Male
    Software developer
    South West of England
    v7 is just part of the package name, and refers to the version of the support library your project is using. There was an earlier version (v4), which was used with API version 4 or less (Android 1.6). Version 7 support library was a later version of the support library, which worked with newer versions of Android, and introduced new features.
    Some information about it here

    http://developer.android.com/tools/support-library/features.html
     
    Bee Torika likes this.
  3. Bee Torika

    Bee Torika Member
    Thread Starter
    Rank:
    None
    Points:
    26
    Posts:
    35
    Joined:
    Nov 12, 2015

    Nov 12, 2015
    35
    2
    26
    thank you for your answer : )

    May I ask one more question ?

    If a user uses android 1.6 phone, and the app uses 'android.support.v7.widget.RecyclerView' .... then, the app runs well ? ..

    I mean, using 'android.support.v7' makes app compatibility smaller ??? :eek:

    Thanks
     
  4. LV426

    LV426 I say we take off and nuke this place from orbit
    Moderator
    Rank:
     #11
    Points:
    1,988
    Posts:
    7,307
    Joined:
    Oct 16, 2015

    Oct 16, 2015
    7,307
    10,416
    1,988
    Male
    Software developer
    South West of England
    Changed my answer - earlier versions of Android, like 1.6 would work with the newer v7 support library, because surely the v7 library is backwards compatible with v4. I mean v7 may support all the features of v4 (but maybe not..)

    You have to be aware of features that have become deprecated. So a phone on a newer version of Android may not work with some of the features you've used in your code. So this makes your code a bit messier, because you need conditional statements which does different things, depending on the version of Android it's running on.

    So the bottom line is, it's difficult to support a wide range of devices in your code, because things are constantly changing in the Android world. This makes it hard for us developers, because we have to allow for these changes, and test on a wide variety of Android versions.

    The only way to find out if your app works on a specific version, with RecyclerView is to run on an emulator, or real device which uses that version of Android.
     
    #4 LV426, May 13, 2016
    Last edited: May 13, 2016
    Bee Torika likes this.
  5. Bee Torika

    Bee Torika Member
    Thread Starter
    Rank:
    None
    Points:
    26
    Posts:
    35
    Joined:
    Nov 12, 2015

    Nov 12, 2015
    35
    2
    26
    So useful advice... Thank you ;)
     

Share This Page

Loading...