Commit ca612317 authored by wanglei's avatar wanglei

...

parent ba9b5a2b
{ {
"code": 0, "code": 0,
"data": { "data": {
"category_list": [{ "category_list": [
"id": 127, {
"name": "社交", "id": 127,
"icon_url": "https://ab-static.thekingtool.com/common/nd/2024/f9b3890601c242d892b40467f299a137.png" "name": "Socialize",
}, { "icon_url": "https://ab-static.thekingtool.com/common/nd/2024/f9b3890601c242d892b40467f299a137.png"
"id": 135, },
"name": "视频", {
"icon_url": "https://ab-static.thekingtool.com/common/nd/2024/6f1ca27223ba4d9a953b3b8a39476789.png" "id": 135,
}, { "name": "Video",
"id": 123, "icon_url": "https://ab-static.thekingtool.com/common/nd/2024/6f1ca27223ba4d9a953b3b8a39476789.png"
"name": "新闻", },
"icon_url": "https://ab-static.thekingtool.com/common/nd/2024/29d0521cd9a945169c31ae0efc2a77ba.png" {
}, { "id": 123,
"id": 131, "name": "News",
"name": "工具", "icon_url": "https://ab-static.thekingtool.com/common/nd/2024/29d0521cd9a945169c31ae0efc2a77ba.png"
"icon_url": "https://ab-static.thekingtool.com/common/nd/2024/bc0b5f69d49a4e5fa1ca630f50e3c14b.png" },
}, { {
"id": 117, "id": 131,
"name": "娱乐", "name": "Tools",
"icon_url": "https://ab-static.thekingtool.com/common/nd/2024/5de6dfe3747c464785d3aab1b68aa593.png" "icon_url": "https://ab-static.thekingtool.com/common/nd/2024/bc0b5f69d49a4e5fa1ca630f50e3c14b.png"
}, { },
{
"id": 117,
"name": "Entertainment",
"icon_url": "https://ab-static.thekingtool.com/common/nd/2024/5de6dfe3747c464785d3aab1b68aa593.png"
},
{
"id": 121,
"name": "Music",
"icon_url": "https://ab-static.thekingtool.com/common/nd/2024/e09242110ee84dc5a0bb32fb3563dcea.png"
},
{
"id": 125,
"name": "Shopping",
"icon_url": "https://ab-static.thekingtool.com/common/nd/2024/5e9391696f41486cbc1f2c88663e4627.png"
},
{
"id": 129,
"name": "Sports",
"icon_url": "https://ab-static.thekingtool.com/common/nd/2024/9a731fe8b9b2406eb99307ce74d17836.png"
},
{
"id": 133,
"name": "Travel",
"icon_url": "https://ab-static.thekingtool.com/common/nd/2024/d6f915461cc24b00a5ecbd6118bc790a.png"
},
{
"id": 119,
"name": "Health",
"icon_url": "https://ab-static.thekingtool.com/common/nd/2024/5183c5f8e6d247e09157695d104efefe.png"
}
],
"groups": [
{
"category_id": 127,
"category_name": "Socialize",
"items": [
{
"id": 103,
"icon_url": "https://ab-static.thekingtool.com/common/nd/2023/52009381185e4a26b259c1790591ebe7.jpg",
"url": "https://www.instagram.com/",
"name": "Instagram",
"desc": "Communicate in the language of images."
},
{
"id": 111,
"icon_url": "https://ab-static.thekingtool.com/common/nd/2023/cfaa01cabb084c41834fb19d643ba3f0.jpg",
"url": "https://facebook.com/",
"name": "Facebook",
"desc": "Connect with friends, family and other people you know."
},
{
"id": 115,
"icon_url": "https://ab-static.thekingtool.com/common/nd/2023/3a27532d34174320bfd6d6b42774dd92.jpg",
"url": "https://reddit.com/",
"name": "Reddit",
"desc": "The front page of the internet"
},
{
"id": 121, "id": 121,
"name": "音乐", "icon_url": "https://ab-static.thekingtool.com/common/nd/2023/fdef9d87026b4362a8e9681020c28739.jpg",
"icon_url": "https://ab-static.thekingtool.com/common/nd/2024/e09242110ee84dc5a0bb32fb3563dcea.png" "url": "https://pinterest.com/",
}, { "name": "Pinterest",
"id": 125, "desc": "Discover recipes, home ideas, style inspiration and other ideas to try."
"name": "购物", },
"icon_url": "https://ab-static.thekingtool.com/common/nd/2024/5e9391696f41486cbc1f2c88663e4627.png" {
}, { "id": 155,
"id": 129, "icon_url": "https://ab-static.thekingtool.com/common/nd/2024/3da84907b52e44bca2b58bf303d517c6.jpg",
"name": "体育", "url": "https://web.whatsapp.com/",
"icon_url": "https://ab-static.thekingtool.com/common/nd/2024/9a731fe8b9b2406eb99307ce74d17836.png" "name": "Whatsapp",
}, { "desc": ""
"id": 133, },
"name": "旅游", {
"icon_url": "https://ab-static.thekingtool.com/common/nd/2024/d6f915461cc24b00a5ecbd6118bc790a.png" "id": 157,
}, { "icon_url": "https://ab-static.thekingtool.com/common/nd/2024/f36d25f2c05e4c5bb64bbbd6e0b16f44.jpg",
"id": 119, "url": "https://twitter.com/",
"name": "健康", "name": "Twitter",
"icon_url": "https://ab-static.thekingtool.com/common/nd/2024/5183c5f8e6d247e09157695d104efefe.png" "desc": ""
}], },
"groups": [{ {
"category_id": 127, "id": 209,
"category_name": "社交", "icon_url": "https://ab-static.thekingtool.com/common/nd/2024/618659fa4caf45d79079c90d24a4687b.jpg",
"items": [{ "url": "https://www.snapchat.com/",
"id": 103, "name": "Snapchat",
"icon_url": "https://ab-static.thekingtool.com/common/nd/2023/52009381185e4a26b259c1790591ebe7.jpg", "desc": ""
"url": "https://www.instagram.com/", }
"name": "Instagram", ]
"desc": "Communicate in the language of images." },
}, { {
"id": 111, "category_id": 135,
"icon_url": "https://ab-static.thekingtool.com/common/nd/2023/cfaa01cabb084c41834fb19d643ba3f0.jpg", "category_name": "Video",
"url": "https://facebook.com/", "items": [
"name": "Facebook", {
"desc": "Connect with friends, family and other people you know." "id": 105,
}, { "icon_url": "https://ab-static.thekingtool.com/common/nd/2023/6707e837dafa49c4a341bb6c385b7d4c.jpg",
"id": 115, "url": "https://netflix.com/",
"icon_url": "https://ab-static.thekingtool.com/common/nd/2023/3a27532d34174320bfd6d6b42774dd92.jpg", "name": "Netflix",
"url": "https://reddit.com/", "desc": "Watch Netflix movies \u0026amp; TV shows online."
"name": "Reddit", },
"desc": "The front page of the internet" {
}, { "id": 109,
"id": 121, "icon_url": "https://ab-static.thekingtool.com/common/nd/2023/7fbda7d6788a459ab6371a7f89834e94.jpg",
"icon_url": "https://ab-static.thekingtool.com/common/nd/2023/fdef9d87026b4362a8e9681020c28739.jpg", "url": "https://youtube.com/",
"url": "https://pinterest.com/", "name": "Youtube",
"name": "Pinterest", "desc": "Enjoy the videos and music you love."
"desc": "Discover recipes, home ideas, style inspiration and other ideas to try." },
}, { {
"id": 155, "id": 145,
"icon_url": "https://ab-static.thekingtool.com/common/nd/2024/3da84907b52e44bca2b58bf303d517c6.jpg", "icon_url": "https://ab-static.thekingtool.com/common/nd/2023/cc060b8df1c74247a4dd14fe26e401ef.jpg",
"url": "https://web.whatsapp.com/", "url": "https://vimeo.com/watch",
"name": "Whatsapp", "name": "Vimeo",
"desc": "" "desc": "High-quality, ad-free platform for creatives."
}, { },
"id": 157, {
"icon_url": "https://ab-static.thekingtool.com/common/nd/2024/f36d25f2c05e4c5bb64bbbd6e0b16f44.jpg", "id": 147,
"url": "https://twitter.com/", "icon_url": "https://ab-static.thekingtool.com/common/nd/2023/3757a3426d9b4317a0b046b1b77ff2c4.jpg",
"name": "Twitter", "url": "https://Dailymotion.com/",
"desc": "" "name": "Dailymotion",
}, { "desc": "User-friendly video sharing platform with diverse content."
"id": 209, }
"icon_url": "https://ab-static.thekingtool.com/common/nd/2024/618659fa4caf45d79079c90d24a4687b.jpg", ]
"url": "https://www.snapchat.com/", },
"name": "Snapchat", {
"desc": "" "category_id": 123,
}] "category_name": "News",
}, { "items": [
"category_id": 135, {
"category_name": "视频", "id": 123,
"items": [{ "icon_url": "https://ab-static.thekingtool.com/common/nd/2023/f94d0b0c5a434cb0afe15bd8c3b4b5c6.jpg",
"id": 105, "url": "https://cnn.com/",
"icon_url": "https://ab-static.thekingtool.com/common/nd/2023/6707e837dafa49c4a341bb6c385b7d4c.jpg", "name": "CNN",
"url": "https://netflix.com/", "desc": "Breaking News, US News, World News and Video"
"name": "Netflix", },
"desc": "Watch Netflix movies \u0026amp; TV shows online." {
}, { "id": 127,
"id": 109, "icon_url": "https://ab-static.thekingtool.com/common/nd/2023/364ff681ac7f4a82a8b06dd5ea91fdf2.jpg",
"icon_url": "https://ab-static.thekingtool.com/common/nd/2023/7fbda7d6788a459ab6371a7f89834e94.jpg", "url": "https://foxnews.com/",
"url": "https://youtube.com/", "name": "Fox News",
"name": "Youtube", "desc": "Breaking News Updates | Latest News Headlines | Photos \u0026amp; News Videos"
"desc": "Enjoy the videos and music you love." },
}, { {
"id": 145, "id": 137,
"icon_url": "https://ab-static.thekingtool.com/common/nd/2023/cc060b8df1c74247a4dd14fe26e401ef.jpg", "icon_url": "https://ab-static.thekingtool.com/common/nd/2023/d81f56abd87940c2a6a4bf37d09a39ec.jpg",
"url": "https://vimeo.com/watch", "url": "https://nytimes.com/",
"name": "Vimeo", "name": "Nytimes",
"desc": "High-quality, ad-free platform for creatives." "desc": "Live news, investigations, opinion, photos and video."
}, { },
"id": 147, {
"icon_url": "https://ab-static.thekingtool.com/common/nd/2023/3757a3426d9b4317a0b046b1b77ff2c4.jpg", "id": 161,
"url": "https://Dailymotion.com/", "icon_url": "https://ab-static.thekingtool.com/common/nd/2024/61833d8b2ddf4b5bbdc76da78355fca4.jpg",
"name": "Dailymotion", "url": "https://www.nbcnews.com/",
"desc": "User-friendly video sharing platform with diverse content." "name": "NBC News",
}] "desc": ""
}, { },
"category_id": 123, {
"category_name": "新闻", "id": 171,
"items": [{ "icon_url": "https://ab-static.thekingtool.com/common/nd/2024/8261850e735645dc8fe468771518ae01.jpg",
"id": 123, "url": "https://www.cbc.ca/sports",
"icon_url": "https://ab-static.thekingtool.com/common/nd/2023/f94d0b0c5a434cb0afe15bd8c3b4b5c6.jpg", "name": "CBC Sports",
"url": "https://cnn.com/", "desc": ""
"name": "CNN", },
"desc": "Breaking News, US News, World News and Video" {
}, { "id": 173,
"id": 127, "icon_url": "https://ab-static.thekingtool.com/common/nd/2024/c4d1f5fcd9cb4890a4d858c3395c2e08.jpg",
"icon_url": "https://ab-static.thekingtool.com/common/nd/2023/364ff681ac7f4a82a8b06dd5ea91fdf2.jpg", "url": "https://www.espn.com/",
"url": "https://foxnews.com/", "name": "ESPN",
"name": "Fox News", "desc": ""
"desc": "Breaking News Updates | Latest News Headlines | Photos \u0026amp; News Videos" },
}, { {
"id": 137, "id": 203,
"icon_url": "https://ab-static.thekingtool.com/common/nd/2023/d81f56abd87940c2a6a4bf37d09a39ec.jpg", "icon_url": "https://ab-static.thekingtool.com/common/nd/2024/b182267fe79044d099bdc704edc48b95.jpg",
"url": "https://nytimes.com/", "url": "https://www.marca.com/",
"name": "Nytimes", "name": "Marca",
"desc": "Live news, investigations, opinion, photos and video." "desc": ""
}, { }
"id": 161, ]
"icon_url": "https://ab-static.thekingtool.com/common/nd/2024/61833d8b2ddf4b5bbdc76da78355fca4.jpg", },
"url": "https://www.nbcnews.com/", {
"name": "NBC News", "category_id": 131,
"desc": "" "category_name": "Tools",
}, { "items": [
"id": 171, {
"icon_url": "https://ab-static.thekingtool.com/common/nd/2024/8261850e735645dc8fe468771518ae01.jpg", "id": 163,
"url": "https://www.cbc.ca/sports", "icon_url": "https://ab-static.thekingtool.com/common/nd/2024/33eb11b14e434ed19df758dd44daef3f.jpg",
"name": "CBC Sports", "url": "https://chat.openai.com/",
"desc": "" "name": "ChatGPT",
}, { "desc": ""
"id": 173, },
"icon_url": "https://ab-static.thekingtool.com/common/nd/2024/c4d1f5fcd9cb4890a4d858c3395c2e08.jpg", {
"url": "https://www.espn.com/", "id": 165,
"name": "ESPN", "icon_url": "https://ab-static.thekingtool.com/common/nd/2024/417db5391a254b668ca13bace67846f5.jpg",
"desc": "" "url": "https://www.bing.com/",
}, { "name": "Bing",
"id": 203, "desc": ""
"icon_url": "https://ab-static.thekingtool.com/common/nd/2024/b182267fe79044d099bdc704edc48b95.jpg", },
"url": "https://www.marca.com/", {
"name": "Marca", "id": 167,
"desc": "" "icon_url": "https://ab-static.thekingtool.com/common/nd/2024/27d87730b29345cd9a5e1c6bdadda9a1.jpg",
}] "url": "https://www.wikipedia.org/",
}, { "name": "Wikipedia",
"category_id": 131, "desc": ""
"category_name": "工具", },
"items": [{ {
"id": 163, "id": 169,
"icon_url": "https://ab-static.thekingtool.com/common/nd/2024/33eb11b14e434ed19df758dd44daef3f.jpg", "icon_url": "https://ab-static.thekingtool.com/common/nd/2024/b6f07b746bc6403e93b17def0290e11f.jpg",
"url": "https://chat.openai.com/", "url": "https://yahoo.com/",
"name": "ChatGPT", "name": "Yahoo",
"desc": "" "desc": ""
}, { },
"id": 165, {
"icon_url": "https://ab-static.thekingtool.com/common/nd/2024/417db5391a254b668ca13bace67846f5.jpg", "id": 179,
"url": "https://www.bing.com/", "icon_url": "https://ab-static.thekingtool.com/common/nd/2024/3ab6d5e12b074eac983c6955a0110e67.jpg",
"name": "Bing", "url": "https://www.linkedin.com/",
"desc": "" "name": "Linkedin",
}, { "desc": ""
"id": 167, }
"icon_url": "https://ab-static.thekingtool.com/common/nd/2024/27d87730b29345cd9a5e1c6bdadda9a1.jpg", ]
"url": "https://www.wikipedia.org/", },
"name": "Wikipedia", {
"desc": "" "category_id": 117,
}, { "category_name": "Entertainment",
"id": 169, "items": [
"icon_url": "https://ab-static.thekingtool.com/common/nd/2024/b6f07b746bc6403e93b17def0290e11f.jpg", {
"url": "https://yahoo.com/", "id": 107,
"name": "Yahoo", "icon_url": "https://ab-static.thekingtool.com/common/nd/2023/8f390c0389a0409cbb6c6bc852fe5a56.jpg",
"desc": "" "url": "https://hulu.com/",
}, { "name": "Hulu",
"id": 179, "desc": "Stream TV and Movies Live and Online"
"icon_url": "https://ab-static.thekingtool.com/common/nd/2024/3ab6d5e12b074eac983c6955a0110e67.jpg", },
"url": "https://www.linkedin.com/", {
"name": "Linkedin", "id": 143,
"desc": "" "icon_url": "https://ab-static.thekingtool.com/common/nd/2023/f99111f9f27c4e49a2bf686a6fa23afa.jpg",
}] "url": "https://Twitch.tv/",
}, { "name": "Twitch",
"category_id": 117, "desc": "Live streaming platform specializing in video game content"
"category_name": "娱乐", },
"items": [{ {
"id": 107, "id": 159,
"icon_url": "https://ab-static.thekingtool.com/common/nd/2023/8f390c0389a0409cbb6c6bc852fe5a56.jpg", "icon_url": "https://ab-static.thekingtool.com/common/nd/2024/7af3991345a140e2b6973563641027b3.jpg",
"url": "https://hulu.com/", "url": "https://www.tumblr.com/",
"name": "Hulu", "name": "Tumblr",
"desc": "Stream TV and Movies Live and Online" "desc": ""
}, { },
"id": 143, {
"icon_url": "https://ab-static.thekingtool.com/common/nd/2023/f99111f9f27c4e49a2bf686a6fa23afa.jpg", "id": 211,
"url": "https://Twitch.tv/", "icon_url": "https://ab-static.thekingtool.com/common/nd/2024/7fb96c6747684d288166be716c401e22.jpg",
"name": "Twitch", "url": "https://www.tiktok.com/",
"desc": "Live streaming platform specializing in video game content" "name": "Tiktok",
}, { "desc": ""
"id": 159, }
"icon_url": "https://ab-static.thekingtool.com/common/nd/2024/7af3991345a140e2b6973563641027b3.jpg", ]
"url": "https://www.tumblr.com/", },
"name": "Tumblr", {
"desc": "" "category_id": 121,
}, { "category_name": "Music",
"id": 211, "items": [
"icon_url": "https://ab-static.thekingtool.com/common/nd/2024/7fb96c6747684d288166be716c401e22.jpg", {
"url": "https://www.tiktok.com/", "id": 175,
"name": "Tiktok", "icon_url": "https://ab-static.thekingtool.com/common/nd/2024/31808fbaf50c407891de62c435b5a252.jpg",
"desc": "" "url": "https://www.hq.vevo.com/",
}] "name": "Vevo",
}, { "desc": ""
"category_id": 121, },
"category_name": "音乐", {
"items": [{ "id": 177,
"id": 175, "icon_url": "https://ab-static.thekingtool.com/common/nd/2024/52e1f93757734bf3ba173898a001942f.png",
"icon_url": "https://ab-static.thekingtool.com/common/nd/2024/31808fbaf50c407891de62c435b5a252.jpg", "url": "https://open.spotify.com/",
"url": "https://www.hq.vevo.com/", "name": "Spotify",
"name": "Vevo", "desc": ""
"desc": "" }
}, { ]
"id": 177, },
"icon_url": "https://ab-static.thekingtool.com/common/nd/2024/52e1f93757734bf3ba173898a001942f.png", {
"url": "https://open.spotify.com/", "category_id": 125,
"name": "Spotify", "category_name": "Shopping",
"desc": "" "items": [
}] {
}, { "id": 113,
"category_id": 125, "icon_url": "https://ab-static.thekingtool.com/common/nd/2023/16fa1b9374764cebbcf74ccc8c078ce8.jpg",
"category_name": "购物", "url": "https://www.amazon.com/",
"items": [{ "name": "Amazon",
"id": 113, "desc": "Online Shopping for Electronics, Apparel, Computers, Books, DVDs \u0026amp; more."
"icon_url": "https://ab-static.thekingtool.com/common/nd/2023/16fa1b9374764cebbcf74ccc8c078ce8.jpg", },
"url": "https://www.amazon.com/", {
"name": "Amazon", "id": 141,
"desc": "Online Shopping for Electronics, Apparel, Computers, Books, DVDs \u0026amp; more." "icon_url": "https://ab-static.thekingtool.com/common/nd/2023/ea366e56868f404291e04833fe1e6142.jpg",
}, { "url": "https://www.ebay.com/",
"id": 141, "name": "Ebay",
"icon_url": "https://ab-static.thekingtool.com/common/nd/2023/ea366e56868f404291e04833fe1e6142.jpg", "desc": "online marketplace for buying and selling a wide range of goods."
"url": "https://www.ebay.com/", },
"name": "Ebay", {
"desc": "online marketplace for buying and selling a wide range of goods." "id": 149,
}, { "icon_url": "https://ab-static.thekingtool.com/common/nd/2023/1b4d975039d84d41aa4e98612c236f52.jpg",
"id": 149, "url": "https://shopee.com/",
"icon_url": "https://ab-static.thekingtool.com/common/nd/2023/1b4d975039d84d41aa4e98612c236f52.jpg", "name": "Shopee",
"url": "https://shopee.com/", "desc": "Popular Southeast Asian e-commerce platform for buyers and sellers."
"name": "Shopee", },
"desc": "Popular Southeast Asian e-commerce platform for buyers and sellers." {
}, { "id": 151,
"id": 151, "icon_url": "https://ab-static.thekingtool.com/common/nd/2023/71c2737ba86e4caab75ecf7000f52345.jpg",
"icon_url": "https://ab-static.thekingtool.com/common/nd/2023/71c2737ba86e4caab75ecf7000f52345.jpg", "url": "https://www.lazada.com/",
"url": "https://www.lazada.com/", "name": "Lazada",
"name": "Lazada", "desc": "Leading online shopping destination in Southeast Asia, offering a wide range of products."
"desc": "Leading online shopping destination in Southeast Asia, offering a wide range of products." }
}] ]
}, { },
"category_id": 129, {
"category_name": "体育", "category_id": 129,
"items": [{ "category_name": "Sports",
"id": 185, "items": [
"icon_url": "https://ab-static.thekingtool.com/common/nd/2024/82d30cfa908240579987711f5afe45a3.jpg", {
"url": "https://www.cricbuzz.com/", "id": 185,
"name": "Cricbuzz", "icon_url": "https://ab-static.thekingtool.com/common/nd/2024/82d30cfa908240579987711f5afe45a3.jpg",
"desc": "" "url": "https://www.cricbuzz.com/",
}, { "name": "Cricbuzz",
"id": 189, "desc": ""
"icon_url": "https://ab-static.thekingtool.com/common/nd/2024/60d44dd484b544bf9538ca839c97f73e.jpg", },
"url": "https://fantasy.premierleague.com/", {
"name": "Fantasy PremierLeague", "id": 189,
"desc": "" "icon_url": "https://ab-static.thekingtool.com/common/nd/2024/60d44dd484b544bf9538ca839c97f73e.jpg",
}, { "url": "https://fantasy.premierleague.com/",
"id": 191, "name": "Fantasy PremierLeague",
"icon_url": "https://ab-static.thekingtool.com/common/nd/2024/26fc5db1b73d47a298a7560cc63b3937.jpg", "desc": ""
"url": "https://www.flashscore.com/", },
"name": "Flashscore", {
"desc": "" "id": 191,
}, { "icon_url": "https://ab-static.thekingtool.com/common/nd/2024/26fc5db1b73d47a298a7560cc63b3937.jpg",
"id": 193, "url": "https://www.flashscore.com/",
"icon_url": "https://ab-static.thekingtool.com/common/nd/2024/30b24b4f39b04f6bae1e35ee5ed44681.jpg", "name": "Flashscore",
"url": "https://www.goal.com/en", "desc": ""
"name": "GOAL", },
"desc": "" {
}, { "id": 193,
"id": 201, "icon_url": "https://ab-static.thekingtool.com/common/nd/2024/30b24b4f39b04f6bae1e35ee5ed44681.jpg",
"icon_url": "https://ab-static.thekingtool.com/common/nd/2024/8fd971c6ba33443a9f69d27bd501276a.jpg", "url": "https://www.goal.com/en",
"url": "https://www.livescore.com/en/", "name": "GOAL",
"name": "LiveScore", "desc": ""
"desc": "" },
}, { {
"id": 205, "id": 201,
"icon_url": "https://ab-static.thekingtool.com/common/nd/2024/8f7890988ff848209c72822daa1b0d9d.jpg", "icon_url": "https://ab-static.thekingtool.com/common/nd/2024/8fd971c6ba33443a9f69d27bd501276a.jpg",
"url": "https://sports.yahoo.com/", "url": "https://www.livescore.com/en/",
"name": "Yahoo Sports", "name": "LiveScore",
"desc": "" "desc": ""
}, { },
"id": 207, {
"icon_url": "https://ab-static.thekingtool.com/common/nd/2024/8deddc5b07144368abd9c05edfb5a427.jpg", "id": 205,
"url": "https://www.wwe.com/", "icon_url": "https://ab-static.thekingtool.com/common/nd/2024/8f7890988ff848209c72822daa1b0d9d.jpg",
"name": "WWE", "url": "https://sports.yahoo.com/",
"desc": "" "name": "Yahoo Sports",
}] "desc": ""
}, { },
"category_id": 133, {
"category_name": "旅游", "id": 207,
"items": [{ "icon_url": "https://ab-static.thekingtool.com/common/nd/2024/8deddc5b07144368abd9c05edfb5a427.jpg",
"id": 181, "url": "https://www.wwe.com/",
"icon_url": "https://ab-static.thekingtool.com/common/nd/2024/01f65c68354248b2bddd04a58fbaa150.jpg", "name": "WWE",
"url": "https://www.airbnb.com/", "desc": ""
"name": "Airbnb", }
"desc": "" ]
}, { },
"id": 197, {
"icon_url": "https://ab-static.thekingtool.com/common/nd/2024/2b6a5dfe5e3c494e941ff9d8401dbe42.jpg", "category_id": 133,
"url": "https://www.hotels.com/", "category_name": "Travel",
"name": "Hotles", "items": [
"desc": "" {
}, { "id": 181,
"id": 215, "icon_url": "https://ab-static.thekingtool.com/common/nd/2024/01f65c68354248b2bddd04a58fbaa150.jpg",
"icon_url": "https://ab-static.thekingtool.com/common/nd/2024/09fc665b1ae94d938d9bc8a8ab12d2fc.jpg", "url": "https://www.airbnb.com/",
"url": "https://www.tripadvisor.com/", "name": "Airbnb",
"name": "Tripadvisor", "desc": ""
"desc": "" },
}] {
}, { "id": 197,
"category_id": 119, "icon_url": "https://ab-static.thekingtool.com/common/nd/2024/2b6a5dfe5e3c494e941ff9d8401dbe42.jpg",
"category_name": "健康", "url": "https://www.hotels.com/",
"items": [{ "name": "Hotles",
"id": 183, "desc": ""
"icon_url": "https://ab-static.thekingtool.com/common/nd/2024/d057783d727e4d40b95481a8e4178988.jpg", },
"url": "https://www.bodybuilding.com/", {
"name": "Body Buiding", "id": 215,
"desc": "" "icon_url": "https://ab-static.thekingtool.com/common/nd/2024/09fc665b1ae94d938d9bc8a8ab12d2fc.jpg",
}, { "url": "https://www.tripadvisor.com/",
"id": 187, "name": "Tripadvisor",
"icon_url": "https://ab-static.thekingtool.com/common/nd/2024/05d87f545dbf49caafc72ae72d805a58.jpg", "desc": ""
"url": "https://www.drugs.com/", }
"name": "Drugs", ]
"desc": "" },
}, { {
"id": 195, "category_id": 119,
"icon_url": "https://ab-static.thekingtool.com/common/nd/2024/89a3622d61c442ffad84d8d71d3ab8a1.jpg", "category_name": "Health",
"url": "https://www.healthline.com/", "items": [
"name": "Healthline", {
"desc": "" "id": 183,
}, { "icon_url": "https://ab-static.thekingtool.com/common/nd/2024/d057783d727e4d40b95481a8e4178988.jpg",
"id": 199, "url": "https://www.bodybuilding.com/",
"icon_url": "https://ab-static.thekingtool.com/common/nd/2024/616c84868811426f85e1ce2065948a55.jpg", "name": "Body Buiding",
"url": "https://kidshealth.org/", "desc": ""
"name": "Kids Health", },
"desc": "" {
}, { "id": 187,
"id": 213, "icon_url": "https://ab-static.thekingtool.com/common/nd/2024/05d87f545dbf49caafc72ae72d805a58.jpg",
"icon_url": "https://ab-static.thekingtool.com/common/nd/2024/22cf424b7da84e13966088be27d61ae0.jpg", "url": "https://www.drugs.com/",
"url": "https://www.who.int/", "name": "Drugs",
"name": "WHO", "desc": ""
"desc": "" },
}, { {
"id": 217, "id": 195,
"icon_url": "https://ab-static.thekingtool.com/common/nd/2024/d473ff71fb094f2cad2d2f3492dcfe16.jpg", "icon_url": "https://ab-static.thekingtool.com/common/nd/2024/89a3622d61c442ffad84d8d71d3ab8a1.jpg",
"url": "https://forums.t-nation.com/", "url": "https://www.healthline.com/",
"name": "T Nation", "name": "Healthline",
"desc": "" "desc": ""
}] },
}] {
}, "id": 199,
"request_id": "4cbfb416-dbd3-4c55-81f1-63cbbe4314e4" "icon_url": "https://ab-static.thekingtool.com/common/nd/2024/616c84868811426f85e1ce2065948a55.jpg",
"url": "https://kidshealth.org/",
"name": "Kids Health",
"desc": ""
},
{
"id": 213,
"icon_url": "https://ab-static.thekingtool.com/common/nd/2024/22cf424b7da84e13966088be27d61ae0.jpg",
"url": "https://www.who.int/",
"name": "WHO",
"desc": ""
},
{
"id": 217,
"icon_url": "https://ab-static.thekingtool.com/common/nd/2024/d473ff71fb094f2cad2d2f3492dcfe16.jpg",
"url": "https://forums.t-nation.com/",
"name": "T Nation",
"desc": ""
}
]
}
]
},
"request_id": "4cbfb416-dbd3-4c55-81f1-63cbbe4314e4"
} }
\ No newline at end of file
package com.base.browserwhite.ui.activity.webbrowser package com.base.browserwhite.ui.activity.webbrowser
import android.graphics.Color import android.graphics.Color
import androidx.activity.addCallback
import androidx.core.view.updatePadding import androidx.core.view.updatePadding
import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentTransaction
import com.base.browserwhite.R
import com.base.browserwhite.databinding.ActivityWebBrowserBinding import com.base.browserwhite.databinding.ActivityWebBrowserBinding
import com.base.browserwhite.ui.activity.BaseActivity import com.base.browserwhite.ui.activity.BaseActivity
import com.base.browserwhite.ui.fragment.WebViewFragment
import com.base.browserwhite.utils.BarUtils import com.base.browserwhite.utils.BarUtils
...@@ -12,11 +18,68 @@ class WebBrowserActivity : BaseActivity<ActivityWebBrowserBinding>() { ...@@ -12,11 +18,68 @@ class WebBrowserActivity : BaseActivity<ActivityWebBrowserBinding>() {
override val binding: ActivityWebBrowserBinding by lazy { override val binding: ActivityWebBrowserBinding by lazy {
ActivityWebBrowserBinding.inflate(layoutInflater) ActivityWebBrowserBinding.inflate(layoutInflater)
} }
private val fragmentList = arrayListOf<Fragment>()
private var currentFragment: WebViewFragment? = null
override fun initView() { override fun initView() {
BarUtils.setStatusBarLightMode(this, true) BarUtils.setStatusBarLightMode(this, true)
BarUtils.setStatusBarColor(this, Color.TRANSPARENT) BarUtils.setStatusBarColor(this, Color.TRANSPARENT)
binding.root.updatePadding(top = BarUtils.getStatusBarHeight()) binding.root.updatePadding(top = BarUtils.getStatusBarHeight())
val uri = intent.extras?.getString("uri") ?: ""
binding.editWeb.setText(uri)
addNewWebSite(uri)
}
private fun checkLeftRight() {
if (currentFragment?.canGoBack() == true) {
binding.ivLeft.setImageResource(R.mipmap.left_s)
} else {
binding.ivLeft.setImageResource(R.mipmap.left_n)
}
if (currentFragment?.canGoForward() == true) {
binding.ivRight.setImageResource(R.mipmap.right_s)
} else {
binding.ivRight.setImageResource(R.mipmap.right_n)
}
}
override fun initListener() {
super.initListener()
onBackPressedDispatcher.addCallback {
if (currentFragment?.canGoBack() == true) {
currentFragment?.goBack()
} else {
finishToMain()
}
}
binding.ivLeft.setOnClickListener {
if (currentFragment?.canGoBack() == true) {
currentFragment?.goBack()
}
}
binding.ivRight.setOnClickListener {
if (currentFragment?.canGoForward() == true) {
currentFragment?.goForward()
}
}
}
private fun addNewWebSite(uri: String) {
val myFragment = WebViewFragment(uri)
val transaction: FragmentTransaction = supportFragmentManager.beginTransaction()
transaction.replace(R.id.container, myFragment)
transaction.commit()
fragmentList.add(myFragment)
currentFragment = myFragment
currentFragment?.onPageFinished = {
checkLeftRight()
}
} }
} }
\ No newline at end of file
package com.base.browserwhite.ui.activity.webstore package com.base.browserwhite.ui.activity.webstore
import android.annotation.SuppressLint import android.annotation.SuppressLint
import android.content.Intent
import android.graphics.Color import android.graphics.Color
import android.graphics.drawable.Drawable
import androidx.core.view.updatePadding import androidx.core.view.updatePadding
import androidx.lifecycle.lifecycleScope import androidx.lifecycle.lifecycleScope
import com.base.browserwhite.R
import com.base.browserwhite.bean.WebCategoryBean import com.base.browserwhite.bean.WebCategoryBean
import com.base.browserwhite.bean.WebSiteGroupBean import com.base.browserwhite.bean.WebSiteGroupBean
import com.base.browserwhite.bean.webCategoryBeanList import com.base.browserwhite.bean.webCategoryBeanList
...@@ -11,18 +14,28 @@ import com.base.browserwhite.bean.webSiteGroupBeanList ...@@ -11,18 +14,28 @@ import com.base.browserwhite.bean.webSiteGroupBeanList
import com.base.browserwhite.databinding.ActivityWevStoreBinding import com.base.browserwhite.databinding.ActivityWevStoreBinding
import com.base.browserwhite.databinding.ItemTabWebstoreBinding import com.base.browserwhite.databinding.ItemTabWebstoreBinding
import com.base.browserwhite.ui.activity.BaseActivity import com.base.browserwhite.ui.activity.BaseActivity
import com.base.browserwhite.ui.activity.webbrowser.WebBrowserActivity
import com.base.browserwhite.ui.adapter.WebSiteGroupAdapter
import com.base.browserwhite.utils.AssetUtils.readJsonFromAsset import com.base.browserwhite.utils.AssetUtils.readJsonFromAsset
import com.base.browserwhite.utils.BarUtils import com.base.browserwhite.utils.BarUtils
import com.base.browserwhite.utils.LogEx
import com.bumptech.glide.Glide
import com.bumptech.glide.request.target.CustomTarget
import com.bumptech.glide.request.transition.Transition
import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch import kotlinx.coroutines.launch
class WevStoreActivity : BaseActivity<ActivityWevStoreBinding>() { class WevStoreActivity : BaseActivity<ActivityWevStoreBinding>() {
private val TAG = "WevStoreActivity"
override val binding: ActivityWevStoreBinding by lazy { override val binding: ActivityWevStoreBinding by lazy {
ActivityWevStoreBinding.inflate(layoutInflater) ActivityWevStoreBinding.inflate(layoutInflater)
} }
private val webCategoryBean: ArrayList<WebCategoryBean> = arrayListOf() private val webCategoryBean: ArrayList<WebCategoryBean> = arrayListOf()
private val webSiteGroupBean: ArrayList<WebSiteGroupBean> = arrayListOf() private val webSiteGroupBean: ArrayList<WebSiteGroupBean> = arrayListOf()
private lateinit var adapter: WebSiteGroupAdapter
@SuppressLint("SetTextI18n") @SuppressLint("SetTextI18n")
override fun initView() { override fun initView() {
...@@ -30,6 +43,19 @@ class WevStoreActivity : BaseActivity<ActivityWevStoreBinding>() { ...@@ -30,6 +43,19 @@ class WevStoreActivity : BaseActivity<ActivityWevStoreBinding>() {
BarUtils.setStatusBarColor(this, Color.TRANSPARENT) BarUtils.setStatusBarColor(this, Color.TRANSPARENT)
binding.root.updatePadding(top = BarUtils.getStatusBarHeight()) binding.root.updatePadding(top = BarUtils.getStatusBarHeight())
adapter = WebSiteGroupAdapter(clickAction = { bean ->
startActivity(Intent(this, WebBrowserActivity::class.java).apply {
putExtra("uri", bean.url)
})
finish()
})
binding.rv.adapter = adapter
binding.tabLayout.observeIndexChange { fromIndex, toIndex, reselect, fromUser ->
if (!reselect) {
binding.rv.smoothScrollToPosition(toIndex)
}
}
initData() initData()
} }
...@@ -40,12 +66,39 @@ class WevStoreActivity : BaseActivity<ActivityWevStoreBinding>() { ...@@ -40,12 +66,39 @@ class WevStoreActivity : BaseActivity<ActivityWevStoreBinding>() {
val list = webSiteGroupBeanList(json) val list = webSiteGroupBeanList(json)
webSiteGroupBean.addAll(list) webSiteGroupBean.addAll(list)
val imageSize = this@WevStoreActivity.resources.getDimensionPixelSize(R.dimen.dp_30)
launch(Dispatchers.Main) { launch(Dispatchers.Main) {
webCategoryBean.forEach { bean -> webCategoryBean.forEach { bean ->
// LogEx.logDebug(TAG, bean.iconUrl)
val tabBinding = ItemTabWebstoreBinding.inflate(layoutInflater) val tabBinding = ItemTabWebstoreBinding.inflate(layoutInflater)
tabBinding.tv.text = bean.name tabBinding.tv.text = bean.name
Glide.with(this@WevStoreActivity).asDrawable().load(bean.iconUrl).into(
object : CustomTarget<Drawable>() {
override fun onResourceReady(resource: Drawable, transition: Transition<in Drawable>?) {
LogEx.logDebug(TAG, "resource=${resource.intrinsicWidth} ${resource.intrinsicHeight}")
/// 这一步必须要做,否则不会显示.
resource.setBounds(0, 0, imageSize, imageSize)
// 设置TextView的左侧图标
tabBinding.tv.setCompoundDrawables(resource, null, null, null)
// 设置图片与文本之间的间距
val padding = 10 // 例如10dp的间距
tabBinding.tv.setCompoundDrawablePadding(padding)
// tabBinding.tv.invalidate()
}
override fun onLoadCleared(placeholder: Drawable?) {
}
}
)
binding.tabLayout.addView(tabBinding.root) binding.tabLayout.addView(tabBinding.root)
} }
adapter.setData(list)
} }
} }
......
package com.base.browserwhite.ui.adapter package com.base.browserwhite.ui.adapter
import android.annotation.SuppressLint
import android.view.View import android.view.View
import android.view.ViewGroup import android.view.ViewGroup
import androidx.recyclerview.widget.RecyclerView import androidx.recyclerview.widget.RecyclerView
import androidx.recyclerview.widget.RecyclerView.ViewHolder import androidx.recyclerview.widget.RecyclerView.ViewHolder
import com.base.browserwhite.R
import com.base.browserwhite.bean.WebSiteBean
import com.base.browserwhite.bean.WebSiteGroupBean import com.base.browserwhite.bean.WebSiteGroupBean
import com.base.browserwhite.databinding.ItemWebsiteGroupBinding
import com.base.browserwhite.utils.XmlEx.inflate
class WebSiteGroupAdapter : RecyclerView.Adapter<WebSiteGroupAdapter.GroupViewHolder>() { class WebSiteGroupAdapter(val clickAction: (bean: WebSiteBean) -> Unit) : RecyclerView.Adapter<WebSiteGroupAdapter.GroupViewHolder>() {
val beanList = arrayListOf<WebSiteGroupBean>() private val beanList = arrayListOf<WebSiteGroupBean>()
inner class GroupViewHolder(view: View) : ViewHolder(view) inner class GroupViewHolder(view: View) : ViewHolder(view)
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): GroupViewHolder { override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): GroupViewHolder {
TODO("Not yet implemented") return GroupViewHolder(R.layout.item_website_group.inflate(parent))
} }
override fun getItemCount(): Int { override fun getItemCount(): Int {
...@@ -21,6 +26,19 @@ class WebSiteGroupAdapter : RecyclerView.Adapter<WebSiteGroupAdapter.GroupViewHo ...@@ -21,6 +26,19 @@ class WebSiteGroupAdapter : RecyclerView.Adapter<WebSiteGroupAdapter.GroupViewHo
} }
override fun onBindViewHolder(holder: GroupViewHolder, position: Int) { override fun onBindViewHolder(holder: GroupViewHolder, position: Int) {
TODO("Not yet implemented") val binding = ItemWebsiteGroupBinding.bind(holder.itemView)
val bean = beanList[position]
val adapter = WebsiteAdapter(1, click = clickAction)
binding.tvName.text = bean.category_name
binding.rvGroup.adapter = adapter
adapter.setData(bean.items)
} }
@SuppressLint("NotifyDataSetChanged")
fun setData(list: List<WebSiteGroupBean>) {
beanList.clear()
beanList.addAll(list)
notifyDataSetChanged()
}
} }
\ No newline at end of file
...@@ -7,11 +7,14 @@ import androidx.recyclerview.widget.RecyclerView ...@@ -7,11 +7,14 @@ import androidx.recyclerview.widget.RecyclerView
import androidx.recyclerview.widget.RecyclerView.ViewHolder import androidx.recyclerview.widget.RecyclerView.ViewHolder
import com.base.browserwhite.R import com.base.browserwhite.R
import com.base.browserwhite.bean.WebSiteBean import com.base.browserwhite.bean.WebSiteBean
import com.base.browserwhite.databinding.ItemWebsiteGrid2Binding
import com.base.browserwhite.databinding.ItemWebsiteGridBinding import com.base.browserwhite.databinding.ItemWebsiteGridBinding
import com.base.browserwhite.utils.LogEx import com.base.browserwhite.utils.LogEx
import com.base.browserwhite.utils.XmlEx.inflate import com.base.browserwhite.utils.XmlEx.inflate
import com.bumptech.glide.Glide
class WebsiteAdapter(val click: (bean: WebSiteBean) -> Unit) : RecyclerView.Adapter<WebsiteAdapter.WebSiteViewHolder>() { class WebsiteAdapter(val uiType: Int = 0, val click: (bean: WebSiteBean) -> Unit) :
RecyclerView.Adapter<WebsiteAdapter.WebSiteViewHolder>() {
private val TAG = "WebsiteAdapter" private val TAG = "WebsiteAdapter"
...@@ -22,7 +25,12 @@ class WebsiteAdapter(val click: (bean: WebSiteBean) -> Unit) : RecyclerView.Adap ...@@ -22,7 +25,12 @@ class WebsiteAdapter(val click: (bean: WebSiteBean) -> Unit) : RecyclerView.Adap
} }
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): WebSiteViewHolder { override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): WebSiteViewHolder {
return WebSiteViewHolder(R.layout.item_website_grid.inflate(parent)) val layout = if (uiType == 0) {
R.layout.item_website_grid
} else {
R.layout.item_website_grid_2
}
return WebSiteViewHolder(layout.inflate(parent))
} }
override fun getItemCount(): Int { override fun getItemCount(): Int {
...@@ -30,14 +38,29 @@ class WebsiteAdapter(val click: (bean: WebSiteBean) -> Unit) : RecyclerView.Adap ...@@ -30,14 +38,29 @@ class WebsiteAdapter(val click: (bean: WebSiteBean) -> Unit) : RecyclerView.Adap
} }
override fun onBindViewHolder(holder: WebSiteViewHolder, position: Int) { override fun onBindViewHolder(holder: WebSiteViewHolder, position: Int) {
val binding = ItemWebsiteGridBinding.bind(holder.itemView)
val bean = beanList[position] val bean = beanList[position]
binding.ivIcon.setImageResource(bean.localIcon) val context = holder.itemView.context
binding.tvName.text = bean.name when (uiType) {
holder.canDrag = !bean.increase 0 -> {
binding.root.setOnClickListener { val binding = ItemWebsiteGridBinding.bind(holder.itemView)
click.invoke(bean) binding.ivIcon.setImageResource(bean.localIcon)
binding.tvName.text = bean.name
holder.canDrag = !bean.increase
binding.root.setOnClickListener {
click.invoke(bean)
}
}
else -> {
val binding = ItemWebsiteGrid2Binding.bind(holder.itemView)
Glide.with(context).load(bean.icon_url).into(binding.iv)
binding.tvName.text = bean.name
binding.root.setOnClickListener {
click.invoke(bean)
}
}
} }
} }
@SuppressLint("NotifyDataSetChanged") @SuppressLint("NotifyDataSetChanged")
......
...@@ -34,7 +34,7 @@ class HomeFragment : BaseFragment<FragmentHomeBinding>() { ...@@ -34,7 +34,7 @@ class HomeFragment : BaseFragment<FragmentHomeBinding>() {
override fun setView() { override fun setView() {
binding.rvWeb.layoutManager = GridLayoutManager(requireContext(), 4, LinearLayoutManager.VERTICAL, false) binding.rvWeb.layoutManager = GridLayoutManager(requireContext(), 4, LinearLayoutManager.VERTICAL, false)
websiteAdapter = WebsiteAdapter { websiteAdapter = WebsiteAdapter(0) {
if (it.name == "Increase") { if (it.name == "Increase") {
requireContext().startActivity(Intent(requireContext(), WevStoreActivity::class.java)) requireContext().startActivity(Intent(requireContext(), WevStoreActivity::class.java))
} else { } else {
......
...@@ -13,17 +13,25 @@ import android.webkit.WebView ...@@ -13,17 +13,25 @@ import android.webkit.WebView
import android.webkit.WebViewClient import android.webkit.WebViewClient
import com.base.browserwhite.databinding.FragmentWebViewBinding import com.base.browserwhite.databinding.FragmentWebViewBinding
class WebViewFragment : BaseFragment<FragmentWebViewBinding>() { class WebViewFragment(val uri: String) : BaseFragment<FragmentWebViewBinding>() {
override val binding: FragmentWebViewBinding by lazy { override val binding: FragmentWebViewBinding by lazy {
FragmentWebViewBinding.inflate(layoutInflater) FragmentWebViewBinding.inflate(layoutInflater)
} }
var onPageFinished: (() -> Unit)? = null
override fun setView() { override fun setView() {
initWebSettings() initWebSettings()
binding.webView.loadUrl("https://www.bilibili.com/") binding.webView.loadUrl(uri)
}
override fun setListener() {
super.setListener()
} }
@SuppressLint("SetJavaScriptEnabled") @SuppressLint("SetJavaScriptEnabled")
...@@ -73,7 +81,6 @@ class WebViewFragment : BaseFragment<FragmentWebViewBinding>() { ...@@ -73,7 +81,6 @@ class WebViewFragment : BaseFragment<FragmentWebViewBinding>() {
message: String?, message: String?,
result: JsResult? result: JsResult?
): Boolean = true ): Boolean = true
} }
binding.webView.webViewClient = object : WebViewClient() { binding.webView.webViewClient = object : WebViewClient() {
override fun shouldOverrideUrlLoading(view: WebView?, request: WebResourceRequest?): Boolean { override fun shouldOverrideUrlLoading(view: WebView?, request: WebResourceRequest?): Boolean {
...@@ -81,6 +88,11 @@ class WebViewFragment : BaseFragment<FragmentWebViewBinding>() { ...@@ -81,6 +88,11 @@ class WebViewFragment : BaseFragment<FragmentWebViewBinding>() {
view?.loadUrl(url) view?.loadUrl(url)
return true return true
} }
override fun onPageFinished(view: WebView?, url: String?) {
super.onPageFinished(view, url)
onPageFinished?.invoke()
}
} }
//设置Cookie //设置Cookie
...@@ -89,4 +101,26 @@ class WebViewFragment : BaseFragment<FragmentWebViewBinding>() { ...@@ -89,4 +101,26 @@ class WebViewFragment : BaseFragment<FragmentWebViewBinding>() {
} }
fun canGoBack(): Boolean {
return binding.webView.canGoBack()
}
fun canGoForward(): Boolean {
return binding.webView.canGoForward()
}
fun goBack() {
return binding.webView.goBack()
}
fun goForward() {
return binding.webView.goForward()
}
fun javascriptBack() {
binding.webView.evaluateJavascript("window.history.back();", null)
}
} }
\ No newline at end of file
...@@ -7,9 +7,161 @@ ...@@ -7,9 +7,161 @@
android:layout_height="match_parent" android:layout_height="match_parent"
tools:context=".ui.activity.webbrowser.WebBrowserActivity"> tools:context=".ui.activity.webbrowser.WebBrowserActivity">
<fragment
android:name="com.base.browserwhite.ui.fragment.WebViewFragment" <androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl_top"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" /> android:layout_height="50dp"
android:layout_marginHorizontal="15dp"
android:layout_marginVertical="15dp"
android:background="@drawable/bg_stroke_070709"
android:gravity="center"
android:orientation="horizontal"
app:layout_constraintTop_toTopOf="parent">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/fl_search_engine"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:background="?android:attr/selectableItemBackground"
android:padding="5dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:ignore="ContentDescription">
<ImageView
android:id="@+id/iv_search_engine"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/h_s_google"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="-2dp"
android:layout_marginBottom="-2dp"
android:src="@mipmap/xuanze"
app:layout_constraintBottom_toBottomOf="@id/fl_search_engine"
app:layout_constraintEnd_toEndOf="@id/fl_search_engine"
tools:ignore="ContentDescription" />
</androidx.constraintlayout.widget.ConstraintLayout>
<EditText
android:id="@+id/edit_web"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_marginHorizontal="5dp"
android:background="@null"
android:gravity="center_vertical"
android:hint="Search or enter website address"
android:paddingHorizontal="15dp"
android:singleLine="true"
android:textColorHint="#858587"
android:textSize="14sp"
app:layout_constraintEnd_toStartOf="@id/fl_scan"
app:layout_constraintStart_toEndOf="@id/fl_search_engine"
tools:ignore="Autofill,HardcodedText,TextFields" />
<FrameLayout
android:id="@+id/fl_scan"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:background="?android:attr/selectableItemBackground"
android:padding="5dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:ignore="ContentDescription">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/saoyisao" />
</FrameLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
<FrameLayout
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginVertical="15dp"
app:layout_constraintBottom_toTopOf="@id/cl_bottom"
app:layout_constraintTop_toBottomOf="@id/cl_top"
tools:ignore="UselessLeaf" />
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl_bottom"
android:layout_width="match_parent"
android:layout_height="60dp"
app:layout_constraintBottom_toBottomOf="parent">
<ImageView
android:id="@+id/iv_left"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/left_n"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@id/iv_right"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:ignore="ContentDescription" />
<ImageView
android:id="@+id/iv_right"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/right_n"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@id/iv_home"
app:layout_constraintStart_toEndOf="@id/iv_left"
app:layout_constraintTop_toTopOf="parent"
tools:ignore="ContentDescription" />
<ImageView
android:id="@+id/iv_home"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/home"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@id/tv_label"
app:layout_constraintStart_toEndOf="@id/iv_right"
app:layout_constraintTop_toTopOf="parent"
tools:ignore="ContentDescription" />
<TextView
android:id="@+id/tv_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@mipmap/biaoqian"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@id/iv_more"
app:layout_constraintStart_toEndOf="@id/iv_home"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:id="@+id/iv_more"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/gengduo"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/tv_label"
app:layout_constraintTop_toTopOf="parent"
tools:ignore="ContentDescription" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
...@@ -14,10 +14,11 @@ ...@@ -14,10 +14,11 @@
tools:ignore="UselessParent"> tools:ignore="UselessParent">
<TextView <TextView
android:id="@+id/tv_title"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_vertical|start" android:layout_gravity="center_vertical|start"
android:layout_marginVertical="20dp" android:layout_marginVertical="15dp"
android:layout_marginStart="15dp" android:layout_marginStart="15dp"
android:text="Web Store" android:text="Web Store"
android:textColor="@color/black" android:textColor="@color/black"
...@@ -37,16 +38,25 @@ ...@@ -37,16 +38,25 @@
</FrameLayout> </FrameLayout>
<com.angcyo.tablayout.DslTabLayout <com.angcyo.tablayout.DslTabLayout
android:layout_marginHorizontal="16dp"
android:id="@+id/tabLayout" android:id="@+id/tabLayout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="45dp" android:layout_height="45dp"
android:layout_marginHorizontal="16dp"
android:layout_marginVertical="10dp"
app:tab_deselect_color="@color/black" app:tab_deselect_color="@color/black"
app:tab_divider_solid_color="@android:color/transparent" app:tab_divider_solid_color="@android:color/transparent"
app:tab_divider_width="16dp" app:tab_divider_width="16dp"
app:tab_draw_divider="true" app:tab_draw_divider="true"
app:tab_enable_ico_color="false"
app:tab_indicator_style="STYLE_NONE" app:tab_indicator_style="STYLE_NONE"
app:tab_select_color="@color/white" /> app:tab_select_color="@color/white" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:nestedScrollingEnabled="false"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
tools:listitem="@layout/item_website_group" />
</LinearLayout> </LinearLayout>
\ No newline at end of file
...@@ -3,11 +3,12 @@ ...@@ -3,11 +3,12 @@
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/tv" android:id="@+id/tv"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="40dp"
android:layout_gravity="center_vertical"
android:background="@drawable/bg_tab_selector_webstore" android:background="@drawable/bg_tab_selector_webstore"
android:gravity="center" android:gravity="center"
android:paddingHorizontal="18dp" android:paddingHorizontal="18dp"
android:paddingVertical="10dp" android:paddingVertical="5dp"
android:textSize="17sp" android:textSize="17sp"
android:textStyle="bold" android:textStyle="bold"
tools:text="Socialize" /> tools:text="Socialize" />
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="45dp" android:layout_height="45dp"
...@@ -8,15 +9,25 @@ ...@@ -8,15 +9,25 @@
android:background="@drawable/bg_f3f4f6_10" android:background="@drawable/bg_f3f4f6_10"
android:orientation="horizontal"> android:orientation="horizontal">
<ImageView <androidx.cardview.widget.CardView
android:id="@+id/iv" android:layout_width="30dp"
android:layout_width="wrap_content" android:layout_height="30dp"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:layout_marginStart="10dp" android:layout_marginStart="10dp"
tools:ignore="ContentDescription" /> app:cardCornerRadius="5dp"
app:cardElevation="0dp">
<ImageView
android:id="@+id/iv"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:ignore="ContentDescription" />
</androidx.cardview.widget.CardView>
<TextView <TextView
android:id="@+id/tv_name"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
......
...@@ -37,6 +37,7 @@ ...@@ -37,6 +37,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginHorizontal="10dp" android:layout_marginHorizontal="10dp"
android:layout_marginTop="10dp" android:layout_marginTop="10dp"
android:nestedScrollingEnabled="false"
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager" app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
app:spanCount="2" app:spanCount="2"
tools:listitem="@layout/item_website_grid_2" /> tools:listitem="@layout/item_website_grid_2" />
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment