日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

android tv 源代码,android_tv_metro

發布時間:2025/3/19 编程问答 47 豆豆
生活随笔 收集整理的這篇文章主要介紹了 android tv 源代码,android_tv_metro 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

TV Metro android lib and API

hailongqiu 修改[源碼分析----源碼分析.ynt]

#API & Data structure

the Metro style is constructed by two kinds of elements:

Album and Display Item

Album can contain multi albums and display items.

Display item can be defined as video, game, app, music and so on.

You can deprive your own game/app/video detail item from display item.

Album

|

__________________|___________________

| ... | | ... |

Album Album Display Item Display Item

The main page is also defined as Album.

ns : namespace, resource type

type: item or item list

id : resource id in back-end server system

Note:

Album and Category are most same concept.

##Tab "app/game"

##Tab "video"

##Tab "video category"

##Home JSON definition

##Home display data

{

"data": [

{

"items": [display items],

"images": {},

"name": "TAB 1",

"id": "recommend",

"type": "album",

"ns": "video"

},

{

"items": [display item],

"images": {},

"name": "TAB 2",

"id": "recommend",

"type": "album",

"ns": "video"

}

]

}

##Display Item:

{

"target": {

"type": "item"

},

"images": {

"back": {

"url": "",

"ani": {},

"pos": {}

}

},

"name": "Display Name)",

"times": {

"updated": 1409202939,

"created": 1409202939

},

"_ui": {

"layout": {

"y": 2,

"x": 3,

"w": 1,

"h": 1

},

"type": "metro_cell_banner"

},

"id": "987722",

"type": "item",

"ns": "video"

}

##Album

{

"data": [

{

"items": [display items],

"images": { },

"name":"game tab name",

"times": {

"updated": 0,

"created": 0

},

"_ui": {

"type": "metro"

},

"id": "recommend",

"type": "album",

"ns": "game"

},

{

"items": [display items],

"images": { },

"name": "game tab Name",

"times": {

"updated": 0,

"created": 0

},

"_ui": {

"type": "metro"

},

"id": "categories",

"type": "album",

"ns": "game"

},

{

"items": [dispay items],

"images": { },

"name": "video tab name",

"times": {

"updated": 0,

"created": 0

},

"_ui": {

"type": "metro"

},

"id": "recommend",

"type": "album",

"ns": "video"

},

{

"items": [display items],

"images": { },

"name": "video tab name",

"times": {

"updated": 0,

"created": 0

},

"_ui": {

"type": "metro"

},

"id": "categories",

"type": "album",

"ns": "video"

}

],

"preload": {

"images": []

},

"update_time": 0

}

##Display Item

{

"target": {

"type": "item"

},

"images": {

"text": {

"url": "",

"ani": {},

"pos": {}

},

"icon": {

"url": "",

"ani": {},

"pos": {}

},

"back": {

"url": "http://xxx/fffff.png",

"ani": {},

"pos": {}

},

"spirit": {

"url": "",

"ani": {},

"pos": {}

}

},

"name": "name",

"times": {

"updated": 1404466152,

"created": 1404454443

},

"_ui": {

"type": "metro_cell_banner",

"layout": {

"y": 1,

"x": 1,

"w": 1,

"h": 2

}

},

"id": "180",

"type": "item",

"ns": "game"

}

##TV Metro liberary and API

###android lib:

supply one framework to build sw540dp metro layout.

###API:

server API and data structure.

This framework help you easy to build one TV metro UI style applicaiton. As for detail business data definition, you need handle by your selft.

##android Lib

RecommendCardView Card view

GenericSubjectLoader Loader for album(tabs is one instance of album)

##How to integrate the android lib?

you just need inherit MainActity and implement your Tabs Loader.

Refer to TVMetroSample application

How to implement your owver server?

step one:

1, define your home data

2, implement your details/list API

##Download test APK

Download test apk, you can run it at android pad or TV

Click Download

##Welcome to Contact US

總結

以上是生活随笔為你收集整理的android tv 源代码,android_tv_metro的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。