leanback

Disable row scaling / expand in BrowseFragment

白昼怎懂夜的黑 提交于 2019-12-01 06:06:46
问题 I have not found any documentation how to disable the row scaling when switching the focus from the Headers to the Fragments in a BrowseFragment. Leanback version 24.2.0 The BrowseFragment has a function enableMainFragmentScaling which solves the problem partially. The images now have the full size, but the titles are still not expanded like they are in the PlayStore App, Youtube app. The expand (without animation) when focusing a row. What i did so far: enableMainFragmentScaling(false); in

Android TV App - unable to select list item with remote

≡放荡痞女 提交于 2019-12-01 06:01:40
Currently I am working on Android TV app. I have used Android Lean back support library. I have added one ListView , but I can not able to select any of the item from listView with real device's remote. However, I can able to select item of listView on my Android Virtual Device with the help of mouse. Here is my sample code of listView: customViewOrders = new CustomViewOrders(getActivity().getBaseContext(), arrayViewOrders); lstViewOrder.setAdapter(customViewOrders); Here, arrayViewOrders is my ArrayList which contains data received from JSON webservice. Here is my JSON Response: { "order":[ {

Android TV App - unable to select list item with remote

我与影子孤独终老i 提交于 2019-12-01 03:34:24
问题 Currently I am working on Android TV app. I have used Android Lean back support library. I have added one ListView , but I can not able to select any of the item from listView with real device's remote. However, I can able to select item of listView on my Android Virtual Device with the help of mouse. Here is my sample code of listView: customViewOrders = new CustomViewOrders(getActivity().getBaseContext(), arrayViewOrders); lstViewOrder.setAdapter(customViewOrders); Here, arrayViewOrders is

Android Gradle Manifest merger failed

好久不见. 提交于 2019-11-29 14:47:51
I use the leanback library to develop for Android TV. My app declare the min API to 16 however the leanback as a minimum API of 16. So as the documentation says I declared this in my manifest : <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" package="com.mypackage.package"> <uses-sdk tools:overrideLibrary="android.support.v17.leanback" /> However I still have the error : Error:(6, 5) Execution failed for task ':app:processAdhocProdManifest'. Manifest merger failed : uses-sdk:minSdkVersion

android tv -Reloading adapter data

僤鯓⒐⒋嵵緔 提交于 2019-11-29 10:39:58
I want to re-load some of the rows data in a browse fragment. Basically I want to reset the adapter data without causing a flash like effect in the browse fragment. Any idea how it can be done? Something like notifyDataSetChanged() in list view. Thanx This will refresh data without losing current position: for (int i = 0; i < mAdapter.size(); i++) { ListRow listRow = ((ListRow) mAdapter.get(i)); ArrayObjectAdapter listRowAdapter = ((ArrayObjectAdapter) listRow.getAdapter()); if (listRowAdapter.size() > 0) { listRowAdapter.notifyArrayItemRangeChanged(0, listRowAdapter.size()); } } You can

android tv -Reloading adapter data

白昼怎懂夜的黑 提交于 2019-11-28 03:50:19
问题 I want to re-load some of the rows data in a browse fragment. Basically I want to reset the adapter data without causing a flash like effect in the browse fragment. Any idea how it can be done? Something like notifyDataSetChanged() in list view. Thanx 回答1: This will refresh data without losing current position: for (int i = 0; i < mAdapter.size(); i++) { ListRow listRow = ((ListRow) mAdapter.get(i)); ArrayObjectAdapter listRowAdapter = ((ArrayObjectAdapter) listRow.getAdapter()); if

android-tv Changing text color and font of browse fragment rows header

萝らか妹 提交于 2019-11-27 06:07:35
问题 How to change text color and font of rows header in browse fragment?. The text not in menu but the text that appears above the rows. 回答1: I am assuming you are using the provided android.support.v17.leanback.widget.RowHeaderPresenter as the presenter for the HeaderFragment in your BrowseFragment . The RowHeaderPresenter inflates the layout from R.layout.lb_row_header which looks like this: <android.support.v17.leanback.widget.RowHeaderView xmlns:android="http://schemas.android.com/apk/res