是否可以将xml布局设置为不是动态地从资源中获取的视图? [英] Is it possible to set xml layout as a view not from resources dynamically?

查看:73
本文介绍了是否可以将xml布局设置为不是动态地从资源中获取的视图?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想设置资源或资源中不存在的动态布局,如果它存在于我的文件管理器中并且我想将该布局设置为视图布局,是否可以将动态布局设置为视图,而无需构建应用程序.我想从服务器发送布局,下载布局并为视图设置视图,而无需构建,而不是从资源中获取.是用于此过程的黄油刀,还是仅用于将视图绑定到变量./p>

I want to set dynamic layout which is not present in resource like res or values.If it is present in my file-manager and i want to set that layout as a view layout.Is it possible to set dynamic layout to the views, without building app.I want to send the layout from the server and download the layout and set for the view without building and not from the resources.Is Butter knife used for this process or it's just for binding views to the variables.

推荐答案

尝试 变形杆菌

Proteus 旨在替代Android的LayoutInflater;但是与APK中捆绑的已编译XML布局不同,Proteus在运行时会夸大布局. 借助Proteus,您可以从后端(无WebView)控制您的Apps布局.忘记样板代码为findViewById,将其转换为TextView,然后转换为setText(). Proteus具有运行时数据绑定和格式化程序.插入您自己的自定义视图,属性和格式化程序.

Proteus is meant to be a drop-in replacement for Android’s LayoutInflater; but unlike the compiled XML layouts bundled in the APK, Proteus inflates layouts at runtime. With Proteus, you can control your Apps layout from the backend (no WebViews). Forget the boilerplate code to findViewById, cast it to a TextView, and then setText(). Proteus has runtime data bindings and formatters. Plugin in your own custom views and attributes and formatters.

p.s. Flipart 的大部分是使用变形虫

p.s. large parts of Flipart is built using proteus

这篇关于是否可以将xml布局设置为不是动态地从资源中获取的视图?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆