Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Button not showing in API 26 and above #47

Open
VinodKumar-b opened this issue Dec 15, 2018 · 0 comments
Open

Button not showing in API 26 and above #47

VinodKumar-b opened this issue Dec 15, 2018 · 0 comments

Comments

@VinodKumar-b
Copy link

My app minimum API Level is 21 and max is 28. Button is not showing in API 26 and above. But button is working. when I click on the position where the button was placed, from then onwards the button is showing in API 26 and above.

the following is the xml code for my layout file.

`

<android.support.design.widget.AppBarLayout
    android:id="@+id/app_bar_layout"
    android:layout_width="match_parent"
    android:layout_height="?attr/actionBarSize">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="horizontal">

        <android.support.v7.widget.AppCompatImageButton
            android:id="@+id/d_btn_close"
            android:layout_width="?attr/actionBarSize"
            android:layout_height="?attr/actionBarSize"
            android:background="?attr/selectableItemBackgroundBorderless"
            android:tint="@color/colorAccent"
            app:srcCompat="@drawable/ic_close"/>

        <TextView
            android:id="@+id/d_tv_cardName_toolbar"
            android:layout_width="0dp"
            android:layout_height="match_parent"
            android:layout_weight="1"
            android:gravity="center_vertical"
            android:text="@string/card_name"
            android:fontFamily="monospace"
            android:textStyle="bold"
            android:textAppearance="@style/Base.TextAppearance.AppCompat.Title"
            android:textColor="@color/secondaryTextColor" />

        <android.support.v7.widget.AppCompatImageButton
            android:id="@+id/d_btn_edt"
            android:layout_width="?attr/actionBarSize"
            android:layout_height="?attr/actionBarSize"
            android:background="?attr/selectableItemBackgroundBorderless"
            android:tint="@color/colorAccent"
            app:srcCompat="@drawable/ic_edit" />

        <android.support.v7.widget.AppCompatImageButton
            android:id="@+id/d_btn_dlt"
            android:layout_width="?attr/actionBarSize"
            android:layout_height="?attr/actionBarSize"
            android:background="?attr/selectableItemBackgroundBorderless"
            android:tint="@color/colorAccent"
            app:srcCompat="@drawable/ic_delete" />

    </LinearLayout>

</android.support.design.widget.AppBarLayout>

<RelativeLayout
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/background_1">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical">

        <View
            android:layout_width="match_parent"
            android:layout_height="@dimen/spacing_medium"/>

        <LinearLayout
            android:id="@+id/lay_card"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical">

            <android.support.v7.widget.CardView
                android:id="@+id/d_card_view"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_margin="@dimen/spacing_large"
                android:visibility="visible"
                app:cardBackgroundColor="@color/light_green_700"
                app:cardCornerRadius="8dp"
                app:cardElevation="5dp">

                <!--  My Code -->

            </android.support.v7.widget.CardView>

        </LinearLayout>

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="horizontal"
            android:gravity="center_vertical"
            android:padding="8dp"
            android:baselineAligned="false">

            <LinearLayout
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="2"
                android:orientation="horizontal"
                android:gravity="center_vertical"
                android:paddingStart="8dp"
                android:paddingEnd="@dimen/spacing_middle">

                <View
                    android:layout_width="@dimen/spacing_middle"
                    android:layout_height="0dp" />

                <android.support.v7.widget.AppCompatImageView
                    android:id="@+id/d_img_remState"
                    android:layout_width="35dp"
                    android:layout_height="35dp"
                    android:background="?attr/selectableItemBackgroundBorderless"
                    android:src="@drawable/ic_notifications_none"
                    android:tint="@color/colorAccent"
                    android:clickable="false"/>

                <View
                    android:layout_width="@dimen/spacing_middle"
                    android:layout_height="0dp" />

                <com.sackcentury.shinebuttonlib.ShineButton
                    android:layout_width="30dp"
                    android:layout_height="30dp"
                    android:id="@+id/d_btn_fav"
                    app:btn_fill_color="@color/colorAccent"
                    app:siShape="@raw/heart"
                    android:contentDescription="@string/favorite_button"
                    app:small_shine_color="@color/colorAccent"
                    app:big_shine_color="@color/colorPrimary"
                    android:elevation="10dp" />

            </LinearLayout>

            <LinearLayout
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="2"
                android:gravity="center_vertical|end"
                android:orientation="horizontal">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:padding="3dp"
                    android:text="@string/show_btn" />

                <View
                    android:layout_width="@dimen/spacing_medium"
                    android:layout_height="0dp"/>

                <android.support.v7.widget.AppCompatImageButton
                    android:id="@+id/d_btn_showw"
                    android:layout_width="35dp"
                    android:layout_height="35dp"
                    android:background="?attr/selectableItemBackgroundBorderless"
                    android:scaleType="fitXY"
                    android:src="@drawable/asl_eye"
                    android:tint="@color/colorAccent" />
                <View
                    android:layout_width="@dimen/spacing_large"
                    android:layout_height="0dp"/>

            </LinearLayout>

        </LinearLayout>

    </LinearLayout>

    <com.google.android.gms.ads.AdView
        android:id="@+id/banner_adView_credit_open"
        xmlns:ads="http://schemas.android.com/apk/res-auto"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:layout_centerHorizontal="true"
        ads:adSize="BANNER"
        ads:adUnitId="@string/banner_add_unit_id"/>

</RelativeLayout>

`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant