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() private void setupCardView()
{ {
ViewGroup.MarginLayoutParams layoutParams = new ViewGroup.MarginLayoutParams(ViewGroup.MarginLayoutParams.MATCH_PARENT, ViewGroup.MarginLayoutParams.WRAP_CONTENT); 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); setLayoutParams(layoutParams);

View File

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

View File

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

View File

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

View File

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