Android Open Source - built.io-todo-android Result Data Source






From Project

Back to project page built.io-todo-android.

License

The source code is released under:

Terms of Use & Licensing<br />Hand Drawn Web Icon Set is free and it will always be free. You can use it for both commercial and non-commercial projects. You can modify the icons anyway you like. Howe...

If you think the Android project built.io-todo-android listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.raweng.built.userInterface;
//from   ww w . j a  v a 2 s.c o  m
import java.util.List;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;

import com.raweng.built.BuiltObject;

/**
 * 
 * @author raw engineering, Inc
 *
 */
class ResultDataSource extends ArrayAdapter<BuiltObject> {

  private BuiltListViewResultCallBack  resultlistener;
  List<BuiltObject> resultObjects;

  protected ResultDataSource(Context vContext, List<BuiltObject> objects) {
    super(vContext, objects.size(), objects);

    this.resultObjects = objects;
  }

  public int getSize(){

    return resultObjects.size();
  }

  @Override  
  public View getView(int position, View convertView, ViewGroup parent) {  

    return getCallBack().getView(position, convertView, parent, resultObjects.get(position));
  }

  @Override
  public int getViewTypeCount() {

    if(getCallBack().getViewTypeCount() <= 0){
      return super.getViewTypeCount();
    }else{
      return getCallBack().getViewTypeCount();
    }

  }

  @Override
  public int getItemViewType(int position) {
    return getCallBack().getItemViewType(position);

  }

  public void clear(){

    resultObjects.clear();
    notifyDataSetChanged();
  }

  public void clearAll(){

    if(resultObjects.size() != 0){
      resultObjects.clear();
      notifyDataSetChanged();
    }
  }

  public BuiltListViewResultCallBack getCallBack() {
    return resultlistener;
  }

  public void setCallBack(BuiltListViewResultCallBack resultlistener) {
    this.resultlistener = resultlistener;
  }
}




Java Source Code List

android.UnusedStub.java
com.example.todoapp.LoginActivity.java
com.example.todoapp.TaskModel.java
com.example.todoapp.TaskViewHolder.java
com.example.todoapp.TodoActivity.java
com.example.todoapp.TodoAppApplication.java
com.raweng.built.userInterface.BuiltAuthResultCallBack.java
com.raweng.built.userInterface.BuiltDetails.java
com.raweng.built.userInterface.BuiltListViewResultCallBack.java
com.raweng.built.userInterface.BuiltTwitterLoginActivity.java
com.raweng.built.userInterface.BuiltUIListViewController.java
com.raweng.built.userInterface.BuiltUILoginController.java
com.raweng.built.userInterface.BuiltUIPickerController.java
com.raweng.built.userInterface.BuiltUISignUpController.java
com.raweng.built.userInterface.BuiltioUserInterfaceActivity.java
com.raweng.built.userInterface.CustomEditTextErrorField.java
com.raweng.built.userInterface.GetGoogleAccessToken.java
com.raweng.built.userInterface.IGoogleLoginDelegate.java
com.raweng.built.userInterface.ResultDataSource.java
com.raweng.built.userInterface.UIAndroidExplorerScreen.java
com.raweng.built.userInterface.pulltorefresh.ILoadingLayout.java
com.raweng.built.userInterface.pulltorefresh.IPullToRefresh.java
com.raweng.built.userInterface.pulltorefresh.LoadingLayoutProxy.java
com.raweng.built.userInterface.pulltorefresh.OverscrollHelper.java
com.raweng.built.userInterface.pulltorefresh.PullToRefreshAdapterViewBase.java
com.raweng.built.userInterface.pulltorefresh.PullToRefreshBase.java
com.raweng.built.userInterface.pulltorefresh.PullToRefreshListView.java
com.raweng.built.userInterface.pulltorefresh.internal.EmptyViewMethodAccessor.java
com.raweng.built.userInterface.pulltorefresh.internal.FlipLoadingLayout.java
com.raweng.built.userInterface.pulltorefresh.internal.IndicatorLayout.java
com.raweng.built.userInterface.pulltorefresh.internal.LoadingLayout.java
com.raweng.built.userInterface.pulltorefresh.internal.RotateLoadingLayout.java
com.raweng.built.userInterface.pulltorefresh.internal.Utils.java
com.raweng.built.userInterface.pulltorefresh.internal.ViewCompat.java