Reputation: 3968
How can we add components from external libraries directly in the android studio layout designer and constraint them?
Example:
This is not provided as a component you can drag to the design editor
<com.facebook.login.widget.LoginButton
android:id=”@+id/login_button”
android:layout_width=”wrap_content”
android:layout_height=”wrap_content”
/>
Upvotes: 0
Views: 113
Reputation: 4332
All that's missing from your example is the constraints that Android Studio places in the ui widgets for you. I recommend playing around with constraint layout by adding and moving around some of the pre-defined widgets and inspecting the generated code. The constraints are pretty easy to understand so you'll be able pick it up quite quickly.
Upvotes: 1