« |
Main
| »
March 11, 2010
It's annoying converting hard-coded attributes into styles for Android. For example:
android:paddingTop="3px"
into
<item name="android:paddingTop">3px</item>
but a lot of times... So, this is a little (very little) script to do it automatically.
#!/usr/bin/ruby -n
$_.scan /(\S+)="([^"]+"/ do |res|
puts '<item name="' + res[0] + '">' + res[1] + '</item>'
end
That's my contribution to society for this Thursday, March whatever, 2010.
Posted by jeff at March 11, 2010 08:04 PM