Good morning Gentlemen,
I'm having problems trying to set an horizontal gravity to an ImageView in that way:
w[ImageView] <~ res(R.drawable.logo_app) <~ gravity(Gravity.CENTER_HORIZONTAL) <~ (...)
The error message is: Don't know how to tweak macroid.Ui[android.widget.ImageView] with macroid.Loaf. Try importing an instance of
CanTweak[macroid.Ui[android.widget.ImageView], macroid.Loaf, ...].
Thank you a lot, I really appreciate your help :)
You can see the response here http://stackoverflow.com/questions/2586301/set-inputtype-for-an-edittext
you can create a new tweak for that, for example,
def edPassword = Tweak[EditText] (_.setInputType(InputType.TYPE_CLASS_NUMBER | InputType.TYPE_NUMBER_VARIATION_PASSWORD))
I have not tried the code, but It should work fine
You can use
lazy val recycler = Option(findView(TR.recycler)) ... (recycler <~ rvAdapter(new ImageListAdapter())).run
For example.... Here, you can use XML Layouts and Styles in Android, and later you can initialize your UI
def edPassword = Tweak[EditText] (_.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_PASSWORD))
Warning: com.fortysevendeg.macroid.extras.TR$layout$: can't find referenced field 'int design_navigation_item_separator' in program class com.fortysevendeg.macroid.extras.R$layoutand then android:package crashes with an IOExcepion in ProGuard
sbt compile, read what the ProGuard guys have to say about it. But only found one StackOverflow answer which basically suggested to ignore these warnings... I don't know if that's the best idea...
No problem at all ^^. Today I hit another problem, but it might very well be my fault. When trying to tweak a Button
w[<~ lp[LinearLayout](64 dp, WRAP_CONTENT, 1)]
java.lang.NoClassDefFoundError: Failed resolution of: Lscala/math/Numeric$IntIsIntegral$; at runtime :/.