I have a strange problem, I made an app with gridView, this is the first view to load after the splash screen. My devices (galaxy s5 and padfone2 and LG G5) working great but other tested devices(LG G2 mini and LG G4) wouldn't load the gridview at all, my compile sdk ver is API 23, min sdk ver is API 15 and target sdk ver is API 22, build tools is 23.0.3. Anyone can help me to understand what is wrong? If needed I can present any other code from the app.
this is the XML for the gridview:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:paddingLeft="@dimen/activity_horizontal_margin" android:paddingRight="@dimen/activity_horizontal_margin" android:paddingTop="2dp" android:background="@drawable/background_wood" android:paddingBottom="@dimen/activity_vertical_margin" tools:context=".CalendarView" android:orientation="vertical" > <RelativeLayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:id="@+id/upper_layout" android:layout_weight="0.9" android:gravity="center_horizontal"> <ImageButton android:layout_width="75dp" android:layout_height="80dp" android:id="@+id/prev_month_btn" android:src="@drawable/arrow_left" android:scaleType="fitXY" android:alpha="0.6" android:background="@drawable/background_wood" android:layout_alignParentTop="true" android:layout_alignParentStart="true" android:layout_alignParentLeft="true" /> <TextView android:layout_width="wrap_content" android:layout_height="48dp" android:textSize="30sp" android:text="MONTH" android:id="@+id/month_picker" android:layout_weight="5.65" android:layout_gravity="bottom" android:gravity="center|end" android:layout_alignBottom="@+id/prev_month_btn" android:layout_centerHorizontal="true" /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="YEAR" android:id="@+id/year" android:textSize="30sp" android:textStyle="bold" android:layout_weight="15.61" android:layout_alignParentTop="true" android:layout_centerHorizontal="true" /> <ImageButton android:layout_width="75dp" android:layout_height="80dp" android:id="@+id/next_month_btn" android:src="@drawable/arrow_right" android:scaleType="fitXY" android:alpha="0.6" android:background="@drawable/background_wood" android:layout_alignTop="@+id/prev_month_btn" android:layout_alignParentEnd="true" android:layout_alignParentRight="true"/> </RelativeLayout> <LinearLayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" android:id="@+id/month_view_layout" android:layout_weight="0.3"> <GridView android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/grid_view_of_month" android:paddingTop="3dp" android:gravity="center" android:alpha="0.4" android:numColumns="7" android:layout_marginBottom="4dp" android:listSelector="@drawable/grid_selector"/> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="55dp" android:orientation="horizontal" android:id="@+id/buttons_layout" android:paddingLeft="2dp" android:paddingRight="2dp" android:layout_marginBottom="3dp"> <ImageButton android:layout_width="10dp" android:layout_height="55dp" android:id="@+id/feed_baby" android:layout_weight="0.1" android:src="@drawable/baby_feed" android:scaleType="fitCenter" android:layout_marginRight="8dp" android:layout_marginLeft="6dp" /> <ImageButton android:layout_width="10dp" android:layout_height="55dp" android:id="@+id/walk_with_baby" android:layout_weight="0.1" android:src="@drawable/baby_walk" android:scaleType="centerInside" android:layout_marginRight="8dp"/> <ImageButton android:layout_width="10dp" android:layout_height="55dp" android:id="@+id/baby_put_to_sleep" android:layout_weight="0.1" android:src="@drawable/crying" android:scaleType="centerInside" android:layout_marginRight="8dp" /> <ImageButton android:layout_width="10dp" android:layout_height="55dp" android:id="@+id/baby_change" android:layout_weight="0.1" android:src="@drawable/baby_diaper" android:scaleType="fitXY" android:layout_marginRight="6dp"/> </LinearLayout>
No comments:
Post a Comment