First year new graduate from liberal arts, java, Android inexperienced person This is a summary of things that were helpful in creating Android apps! (Layout)
If there are recommended articles, we will update them from time to time! !!
The color of the EditText cursor changes depending on the terminal, so if you want to unify it, specify it in xml
Summary of color changes in EditText
Change the color of the cursor of an EditText in Android across all the sdk
Possible by using an empty view. Convenient.
Set the width of View of the child of RelativeLayout to 50%
FindViewWithTag () is useful in such cases. For example, when there are 10 child views in the parent view, you don't have to find by 10 It is OK if you add a tag in xml and turn the for statement.
[How to use findViewWithTag ()](http://koga-app.tumblr.com/post/49431453714/ How to use findviewwithtag)
If you are targeting API21 or above, you can use elevation in xml. In the meantime, create xml to deal with it.
How would I get a ListView Item to be elevated?
A custom view class that allows you to determine how many times the height is based on the width, such as 1: 1 or 4: 3. The best usability.
[Android] Create a view with a fixed aspect ratio
When specifying the size in the code, the unit is px. If you want to fix it to dp, refer to the following.
Problem that the height changes for each device when setting the height numerically on the code
Override getItemViewType () with Adapter and change the view to inflate using case statement in getView ()
Use a different View for each row in ListView
Touch the contents of the list
<ListView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:divider="@null"
android:dividerHeight="10dp" />
How to remove the dividing line of Android ListView and how to set the space for each element
Touch the contents of the list
getDialog().getWindow().setBackgroundDrawable(new
ColorDrawable(Color.TRANSPARENT));
Can't make the custom DialogFragment transparent over the Fragment
Add a divider with RecyclerView
Recommended Posts