GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - scurtis-tech/data-binding: An example application for the Android Data Binding

BranchesTags
Open more actions menu

Latest commit

 

History

45 Commits
45 Commits

Folders and files

NameName
Last commit message
Last commit date
gradle/wrapper
gradle/wrapper
 
 
mobile
mobile
 
 
.gitignore
.gitignore
 
 
DataBinding.iml
DataBinding.iml
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
build.gradle
build.gradle
 
 
gradle.properties
gradle.properties
 
 
gradlew
gradlew
 
 
gradlew.bat
gradlew.bat
 
 
settings.gradle
settings.gradle
 
 

Repository files navigation

Android Data Binding Library with RecyclerView

An example application for the Android Data Binding library, implementing retrofit to fetch a list of repositories and update a RecyclerView using the binding methods to display each repository as a view component.

Enter a GitHub username in the ActionBar SearchView component to trigger the observable request, the application uses Retrofit to query the open GitHub api for repositories, results are returned in the RecyclerView with data bindigs.

device-2015-06-02-145653

Usage

Requires Android Studio 1.3.0-beta1 or higher.

Classpath dependencies

  classpath 'com.android.tools.build:gradle:1.2.3'
  classpath 'com.android.databinding:dataBinder:1.0-rc0'

Plugins

apply plugin: ‘com.android.application'
apply plugin: 'com.android.databinding'

Layout

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

    <data>
        <variable name="user" type="com.example.User"/>
    </data>
    
    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical">
        
        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@{user.firstName}" />
            
        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@{user.lastName}" />
   </LinearLayout>
</layout>

Activity

    ActivityMainBinding binding = DataBindingUtil.setContentView(this, R.layout.main_activity);
    User user = new User("Test", "User");
    binding.setUser(user);

Links

  • Play Store Listing (https://play.google.com/store/apps/details?id=com.chaos.databinding)
  • Data Bindings (https://developer.android.com/tools/data-binding/guide.html)
  • RecyclerView (https://developer.android.com/training/material/lists-cards.html#RecyclerView)
  • App Compat (http://android-developers.blogspot.de/2014/10/appcompat-v21-material-design-for-pre.html)
  • AppCompatActivity (https://plus.google.com/+AndroidDevelopers/posts/LNyDnnBYJ8r)

About

An example application for the Android Data Binding

play.google.com/store/apps/details?id=com.chaos.databinding

Resources

Readme
Apache-2.0 license
Activity

Stars

0 stars

Watchers

0 watching

Forks

30 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.