Fix margins and paddings

This commit is contained in:
Tanguy Herbron 2018-06-17 02:12:33 +02:00
parent 40e511a576
commit 5a512a304a
5 changed files with 12 additions and 19 deletions

View File

@ -212,7 +212,8 @@ public class CurrencyCardview extends CardView {
private void setupCardView()
{
ViewGroup.MarginLayoutParams layoutParams = new ViewGroup.MarginLayoutParams(ViewGroup.MarginLayoutParams.MATCH_PARENT, ViewGroup.MarginLayoutParams.WRAP_CONTENT);
layoutParams.setMargins((int) MoodlBox.convertDpToPx(10, getResources()), 0, (int) MoodlBox.convertDpToPx(10, getResources()), (int) MoodlBox.convertDpToPx(10, getResources()));
int margin = (int) MoodlBox.convertDpToPx(10, getResources());
layoutParams.setMargins(margin, margin, margin, 0);
setLayoutParams(layoutParams);

View File

@ -53,17 +53,17 @@ public class CurrencyDetailsList {
new Response.Listener<String>() {
@Override
public void onResponse(String response) {
if (response.length() > 0) {
processDetailResult(response, callBack);
}
upToDate = true;
}
}
},
new Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError error) {
upToDate = true;
}
});

View File

@ -51,8 +51,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="?attr/actionBarSize"
android:background="@color/summary_background"
android:paddingTop="15dp">
android:background="@color/summary_background">
<ListView android:id="@+id/linearLayoutOverview"
android:layout_width="match_parent"
@ -61,7 +60,8 @@
android:orientation="vertical"
xmlns:android="http://schemas.android.com/apk/res/android"
android:divider="@null"
android:dividerHeight="0dp"/>
android:dividerHeight="0dp"
android:clipChildren="false"/>
</LinearLayout>
</android.support.constraint.ConstraintLayout>

View File

@ -82,7 +82,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginTop="10dp">
android:clipChildren="false">
<LinearLayout
android:id="@+id/currencyListLayout"
@ -96,11 +96,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/button_dashed_background"
android:layout_marginStart="10dp"
android:layout_marginEnd="10dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginBottom="10dp"
android:layout_margin="10dp"
android:textColor="@color/separationColor"
style="@style/Widget.AppCompat.Button.Borderless"/>

View File

@ -74,7 +74,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingTop="25dp">
android:clipChildren="false">
<com.jmedeisis.draglinearlayout.DragLinearLayout android:id="@+id/linearLayoutWatchlist"
android:layout_width="match_parent"
@ -96,11 +96,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/button_dashed_background"
android:layout_marginStart="10dp"
android:layout_marginEnd="10dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginBottom="10dp"
android:layout_margin="10dp"
android:textColor="@color/separationColor"
style="@style/Widget.AppCompat.Button.Borderless"/>