Recently i updated my android studio and i am facing lots of problems such as its not showing the particular error. In previous version if did any thing wrong in coding it shows red line under the code and now i am facing new problem I created a background design layout for buttons after i applying this background layout in my buttons it's not changing my button background i don't know what happened with my project or maybe software.
Here is my Button design layout which name is btn_design
<?xml version="1.0" encoding="utf-8"?>
<shape
android:shape="rectangle"
xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="@dimen/_10sdp"/>
<solid android:color="#00AD01"/>
</shape>
Here is my main Activity layout where i applied this design code.
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout 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="#ED000000"
android:orientation="vertical"
tools:context=".activites.IntenetChecker">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<ImageView
android:layout_width="@dimen/_130sdp"
android:layout_height="@dimen/_130sdp"
android:src="@drawable/ic_wifi_off_24"
android:layout_marginTop="@dimen/_50sdp"
android:layout_gravity="center_horizontal"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/_20sdp"
android:gravity="center"
android:fontFamily="monospace"
android:padding="@dimen/_5sdp"
android:textColor="@color/white"
android:textSize="@dimen/_18ssp"
android:textStyle="bold"
android:text="You are offline"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/_20sdp"
android:gravity="center"
android:fontFamily="monospace"
android:padding="@dimen/_5sdp"
android:textColor="#A8ffffff"
android:textSize="@dimen/_18ssp"
android:textStyle="bold"
android:text="Check your internet connection and try again"/>
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/btn_design"
android:padding="16dp"
android:paddingLeft="100dp"
android:drawablePadding="-100dp"
android:gravity="center"
android:text="Try again"
android:layout_margin="@dimen/_35sdp"
android:drawableLeft="@drawable/ic_refresh_24"/>
</LinearLayout>
</RelativeLayout>
Here is my output of that layout in xml design page