本帖最后由 dadashuai 于 2021-8-6 11:17 编辑
将安卓的xml布局转换为各种代码,方便学习使用
示例xml布局
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:gravity="center"
android:layout_height="match_parent">
<TextView
android:id="@+id/text_info"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="18sp"
android:gravity="center"
android:text="xml转代码\nhttps://github.com/fengdeyingzi/XmlToCode"
android:autoLink="web"
android:padding="32dp"
/>
<TextView
android:id="@+id/text_author"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="16sp"
android:text="风的影子 制作"
/>
</LinearLayout>
转换为findViewById代码
转换为java
转换为Flutter
转换为swift
源码:[https://github.com/fengdeyingzi/XmlToCode]
|