-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #95 from WatchFriends/devHome-Hein-v3.0
Home pagina werkt eidelijk
- Loading branch information
Showing
9 changed files
with
173 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 13 additions & 1 deletion
14
...iends/app/src/main/java/nmct/jaspernielsmichielhein/watchfriends/binder/SeriesBinder.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,33 @@ | ||
package nmct.jaspernielsmichielhein.watchfriends.binder; | ||
|
||
import android.databinding.BindingAdapter; | ||
import android.databinding.ObservableArrayList; | ||
import android.databinding.ObservableList; | ||
import android.support.v7.widget.RecyclerView; | ||
import android.widget.ListView; | ||
|
||
import nmct.jaspernielsmichielhein.watchfriends.adapter.SeriesAdapter; | ||
import nmct.jaspernielsmichielhein.watchfriends.helper.Utils; | ||
import nmct.jaspernielsmichielhein.watchfriends.model.Series; | ||
|
||
public class SeriesBinder { | ||
@BindingAdapter("items") | ||
/*@BindingAdapter("items") | ||
public static void setSeries(ListView listView, ObservableList<Series> series) { | ||
if(series != null) { | ||
SeriesAdapter seriesAdapter = new SeriesAdapter(listView.getContext(), listView); | ||
seriesAdapter.addAll(series); | ||
listView.setAdapter(seriesAdapter); | ||
//Utils.setListViewHeightBasedOnChildren(listView); | ||
} | ||
}*/ | ||
|
||
@BindingAdapter("items") | ||
public static void setSeries(RecyclerView recyclerView, ObservableArrayList<Series> series) { | ||
if(series != null) { | ||
SeriesAdapter seriesAdapter = new SeriesAdapter(series, recyclerView.getContext()); | ||
recyclerView.setAdapter(seriesAdapter); | ||
seriesAdapter.notifyDataSetChanged(); | ||
//Utils.setListViewHeightBasedOnChildren(listView); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters