LayoutXML Control Extractor
Tools for extracting control IDs from Android Layout XML and writing findByViewId code.
It creates a Kotlin, Kotlin(BindExt), Java code by Android Layout XML.
Compile
Use Delphi XE5. :)
Usage
- Copy the Android Layout XML to the left size
- Select output options
- Click the Extract button.
- Copy & Paste created code :)
Example
Java output
private TextView mTextView3;
private TextView mTextView4;
private TextView mTextView5;
private ImageView mImageView;
private ImageButton mImageButton;
mTextView3 = (TextView) findViewById(R.id.textView3);
mTextView4 = (TextView) findViewById(R.id.textView4);
mTextView5 = (TextView) findViewById(R.id.textView5);
mImageView = (ImageView) findViewById(R.id.imageView);
mImageButton = (ImageButton) findViewById(R.id.imageButton);
Kotlin output
private val mTextView3 = findViewById(R.id.textView3) as TextView
private val mTextView4 = findViewById(R.id.textView4) as TextView
private val mTextView5 = findViewById(R.id.textView5) as TextView
private val mImageView = findViewById(R.id.imageView) as ImageView
private val mImageButton = findViewById(R.id.imageButton) as ImageButton
Kotlin(BindExt) output
private val mTextView3: TextView by bind(R.id.textView3)
private val mTextView4: TextView by bind(R.id.textView4)
private val mTextView5: TextView by bind(R.id.textView5)
private val mImageView: ImageView by bind(R.id.imageView)
private val mImageButton: ImageButton by bind(R.id.imageButton)
History
v1.1
Added clipboard function
v1.0
Implemented basic functionality
License
MIT License