|
Programación y Desarrollo para Android Subforo exclusivo para temas de programación de software para PDAs y desarrollo de aplicaciones, interfaces, etc bajo Android |
|
Herramientas |
#1
|
||||
|
||||
RecyclerView
Veran, tengo un layout que me vuelve loco:
Código:
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" xmlns:app="http://schemas.android.com/apk/res-auto" android:orientation="vertical" android:layout_height="match_parent" android:paddingLeft="@dimen/activity_horizontal_margin" android:paddingRight="@dimen/activity_horizontal_margin" android:paddingTop="@dimen/activity_vertical_margin" android:paddingBottom="@dimen/activity_vertical_margin" tools:context="com.ramon.campos.ui.MainActivity" android:background="@color/primaryDarkColor"> <android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent" > <android.support.v7.widget.RecyclerView android:id="@+id/recyclerView" android:layout_width="match_parent" android:layout_height="wrap_content"/> <android.support.design.widget.FloatingActionButton android:id="@+id/fab" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="bottom|end" android:layout_margin="@dimen/fab_margin" android:src="@drawable/ic_add"/> <android.support.design.widget.CoordinatorLayout> <LinearLayout> Código:
<android.support.v7.widget.RecyclerView android:id="@+id/recyclerView" android:layout_width="match_parent" android:layout_height="300dp"/> ¿alguna sugerencia? gracias Última edición por Merche300 Día 22/07/17 a las 15:28:46. |
|
#2
|
||||
|
||||
Me falta poner algun archivo para obtener respuesta?
|
#3
|
||||
|
||||
Estás haciendo una jerarquía de Layouts que no tiene mucho sentido, imagino que lo que buscas es simplemente la animación del FloatingActionButton cuando scrolleas.
¿Por qué metes el CoordinatorLayout dentro de un LinearLayout? El CoordinatorLayout debe ser el contenedor principal. El LinearLayout te sobra. Y aunque así te debería funcionar, recuerda que el CoordinatorLayout está pensado para usarse con temas sin Action Bar, e implementar un AppBarLayout. Donde el CollapsingToolbarLayout si que es totalmente opcional. |
Gracias de parte de: | ||
#4
|
||||
|
||||
kriogeN, mi intencion era poner el color dark al final de la pantalla, osea, cambiar el blanco que se ve.
Gracias por tu luz: Código:
<?xml version="1.0" encoding="utf-8"?> <android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@color/primaryDarkColor" tools:context="com.ramon.campos.Campos.MainActivity10"> <android.support.constraint.ConstraintLayout android:layout_width="match_parent" android:layout_height="match_parent"> </android.support.constraint.ConstraintLayout> <android.support.v7.widget.RecyclerView android:id="@+id/recyclerView" android:layout_width="match_parent" android:layout_height="match_parent"/> <android.support.design.widget.FloatingActionButton android:id="@+id/fab" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="bottom|end" android:layout_margin="@dimen/fab_margin" app:srcCompat="@drawable/ic_add"/> </android.support.design.widget.CoordinatorLayout> |
Estás aquí | ||||||
|