cloudist / happy-android-tools

A collection of tools for Android developers.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Happy Android Tools

A collection of tools for Android developers.

  • layout-to-style
  • ...

A script to convert the layout attributes into style file format.

  • layout_to_style.py - Python version
  • layout-to-style.html - JavaScript version (Recommended!)

Example

Input:

<LinearLayout
	android:layout_width="match_parent"
	android:layout_height="wrap_content"
	android:layout_marginBottom="30dp"
	android:layout_marginTop="30dp"
	android:background="@color/transparent_white"
	android:orientation="vertical"
	android:paddingBottom="30dp"
	android:paddingTop="20dp">

Output:

<style name="">
	<item name="android:layout_width">match_parent</item>
	<item name="android:layout_height">wrap_content</item>
	<item name="android:layout_marginBottom">30dp</item>
	<item name="android:layout_marginTop">30dp</item>
	<item name="android:background">@color/transparent_white</item>
	<item name="android:orientation">vertical</item>
	<item name="android:paddingBottom">30dp</item>
	<item name="android:paddingTop">20dp</item>
</style>

About

A collection of tools for Android developers.

License:MIT License


Languages

Language:HTML 68.4%Language:Python 31.6%