Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rendering problems missing styles

Missing styles. Is the correct theme chosen for this layout? Use the Theme combobox above the layout to choose a different layout, or fix the theme style references. Potential trying to resolve '?attr/textColorHighlight': cyclic resource definitions? Render may not be accurate. (16 similar errors not shown) Failed to find '?attr/textColorHighlight' in current theme. (16 similar errors not shown) The graphics preview in the layout editor may not be accurate: - Paint.setShadowLayer is not supported. (Ignore for this session)

 <?xml version="1.0" encoding="utf-8"?>
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
 android:orientation="vertical" android:layout_width="match_parent"
 android:layout_height="match_parent"
 >
  <RelativeLayout
    android:id="@+id/qwe"
    android:layout_width="match_parent"
    android:layout_height="50dp"
    android:background="#34b233"
    android:orientation="horizontal">

    <Button
        android:id="@+id/buttonmnu"
        android:layout_width="40dp"
        android:layout_height="40dp"
        android:layout_alignParentRight="true"
        android:layout_alignParentEnd="true"
        android:layout_marginRight="5dp"
        android:layout_centerVertical="true"
        android:background="@drawable/homeicon" />

    <TextView
        android:id="@+id/textView1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerHorizontal="true"
        android:layout_centerVertical="true"
        android:text="Contact Exhibitor"
        android:textColor="#fff"

        android:textSize="7pt" />
</RelativeLayout>

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"

    android:layout_height="match_parent">

    <LinearLayout
        android:id="@+id/buttons"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:layout_marginBottom="10dp"

        android:gravity="center"
        android:orientation="vertical">

        <Button
            android:id="@+id/buttonsubmit"
            android:layout_width="150dp"
            android:layout_height="40dp"
            android:layout_centerHorizontal="true"
            android:layout_gravity="center_horizontal"
            android:layout_marginLeft="10dp"
            android:layout_marginRight="10dp"
            android:layout_marginTop="5dp"
            android:background="@drawable/button_round"
            android:text="Submit"

            android:textColor="#fff"
            android:textSize="5pt"


            />


    </LinearLayout>


    <ScrollView
        android:id="@+id/scrollView1"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_above="@id/buttons"

        android:layout_marginBottom="10dp">

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginBottom="40dp"
            android:layout_marginLeft="10dp"
            android:layout_marginRight="10dp"
            android:layout_marginTop="15dp"
            android:orientation="vertical">

            <android.support.design.widget.TextInputLayout
                android:id="@+id/text1"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginBottom="10dp"
                android:layout_marginLeft="10dp"
                android:layout_marginRight="10dp"
                android:layout_marginTop="5dp"
                android:divider="#535353"
                android:theme="@style/TextLabel">

                <EditText
                    android:id="@+id/editText1"
                    android:layout_width="match_parent"
                    android:layout_height="30dp"
                    android:layout_centerHorizontal="true"
                    android:layout_marginLeft="10dp"
                    android:background="@null"
                    android:gravity="left"
                    android:hint="Name*"
                    android:maxLength="50"
                    android:textColor="#000"
                    android:textSize="7pt"

                    />

                <ImageView
                    android:layout_width="match_parent"
                    android:layout_height="1dp"
                    android:background="#535353" />
            </android.support.design.widget.TextInputLayout>

            <android.support.design.widget.TextInputLayout
                android:id="@+id/text2"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginBottom="10dp"
                android:layout_marginLeft="10dp"
                android:layout_marginRight="10dp"
                android:layout_marginTop="5dp"
                android:divider="#535353"
                android:theme="@style/TextLabel">

                <EditText
                    android:id="@+id/editText2"
                    android:layout_width="match_parent"
                    android:layout_height="30dp"
                    android:layout_centerHorizontal="true"
                    android:layout_marginLeft="10dp"
                    android:background="@null"
                    android:gravity="left"
                    android:hint="Designation*"
                    android:textColor="#000"
                    android:textSize="7pt"

                    />

                <ImageView
                    android:layout_width="match_parent"
                    android:layout_height="1dp"
                    android:background="#535353" />
            </android.support.design.widget.TextInputLayout>

            <android.support.design.widget.TextInputLayout
                android:id="@+id/text3"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginBottom="10dp"
                android:layout_marginLeft="10dp"
                android:layout_marginRight="10dp"
                android:layout_marginTop="5dp"
                android:divider="#535353"
                android:theme="@style/TextLabel">

                <EditText
                    android:id="@+id/editText3"
                    android:layout_width="match_parent"
                    android:layout_height="30dp"
                    android:layout_centerHorizontal="true"
                    android:layout_marginLeft="10dp"
                    android:background="@null"
                    android:gravity="left"
                    android:hint="Company Name*"
                    android:maxLength="30"
                    android:textColor="#000"
                    android:textSize="7pt"

                    />

                <ImageView
                    android:layout_width="match_parent"
                    android:layout_height="1dp"
                    android:background="#535353" />
            </android.support.design.widget.TextInputLayout>

            <android.support.design.widget.TextInputLayout
                android:id="@+id/text4"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginBottom="10dp"
                android:layout_marginLeft="10dp"
                android:layout_marginRight="10dp"
                android:layout_marginTop="5dp"
                android:divider="#535353"
                android:theme="@style/TextLabel">

                <EditText
                    android:id="@+id/editText4"
                    android:layout_width="match_parent"
                    android:layout_height="30dp"
                    android:layout_centerHorizontal="true"
                    android:layout_marginLeft="10dp"
                    android:background="@null"
                    android:gravity="left"
                    android:hint="Phone Number*"
                    android:inputType="number"
                    android:textColor="#000"
                    android:textSize="7pt"

                    />

                <ImageView
                    android:layout_width="match_parent"
                    android:layout_height="1dp"
                    android:background="#535353" />
            </android.support.design.widget.TextInputLayout>

            <android.support.design.widget.TextInputLayout
                android:id="@+id/text5"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginBottom="10dp"
                android:layout_marginLeft="10dp"
                android:layout_marginRight="10dp"
                android:layout_marginTop="5dp"
                android:divider="#535353"
                android:theme="@style/TextLabel">

                <EditText
                    android:id="@+id/editText5"
                    android:layout_width="match_parent"
                    android:layout_height="30dp"
                    android:layout_centerHorizontal="true"
                    android:layout_marginLeft="10dp"
                    android:background="@null"
                    android:gravity="left"
                    android:hint="E-mail address*"
                    android:textColor="#000"
                    android:textSize="7pt"

                    />

                <ImageView
                    android:layout_width="match_parent"
                    android:layout_height="1dp"
                    android:background="#535353" />
            </android.support.design.widget.TextInputLayout>

            <android.support.design.widget.TextInputLayout
                android:id="@+id/text6"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginBottom="10dp"
                android:layout_marginLeft="10dp"
                android:layout_marginRight="10dp"
                android:layout_marginTop="5dp"
                android:divider="#535353"
                android:theme="@style/TextLabel">

                <EditText
                    android:id="@+id/editText6"
                    android:layout_width="match_parent"
                    android:layout_height="30dp"
                    android:layout_centerHorizontal="true"
                    android:layout_marginLeft="10dp"
                    android:background="@null"
                    android:gravity="left"
                    android:hint="Main activity of your company*"
                    android:textColor="#000"
                    android:textSize="7pt"

                    />

                <ImageView
                    android:layout_width="match_parent"
                    android:layout_height="1dp"
                    android:background="#535353" />
            </android.support.design.widget.TextInputLayout>

            <android.support.design.widget.TextInputLayout
                android:id="@+id/text10"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginBottom="10dp"
                android:layout_marginLeft="10dp"
                android:layout_marginRight="10dp"
                android:layout_marginTop="5dp"
                android:divider="#535353"
                android:theme="@style/TextLabel">

                <EditText
                    android:id="@+id/edit10"
                    android:layout_width="match_parent"
                    android:layout_height="30dp"
                    android:layout_centerHorizontal="true"
                    android:layout_marginLeft="10dp"
                    android:background="@null"
                    android:gravity="left"

                    android:hint="P.O.Box*"
                    android:textColor="#000"
                    android:textSize="7pt"

                    />

                <ImageView
                    android:layout_width="match_parent"
                    android:layout_height="1dp"
                    android:background="#535353" />
            </android.support.design.widget.TextInputLayout>



            <android.support.design.widget.TextInputLayout
                android:id="@+id/text12"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginBottom="10dp"
                android:layout_marginLeft="10dp"

                android:layout_marginRight="10dp"
                android:layout_marginTop="10dp"
                android:divider="#535353"
                android:theme="@style/TextLabel">

                <EditText
                    android:id="@+id/edit12"
                    android:layout_width="match_parent"
                    android:layout_height="30dp"
                    android:layout_centerHorizontal="true"
                    android:layout_marginLeft="10dp"
                    android:background="@null"
                    android:gravity="left"

                    android:hint="City"
                    android:textColor="#000"
                    android:textSize="7pt"

                    />

                <ImageView
                    android:layout_width="match_parent"
                    android:layout_height="1dp"
                    android:background="#535353" />
            </android.support.design.widget.TextInputLayout>
            <TextView
                android:id="@+id/text11"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_marginLeft="4dp"
                android:layout_marginTop="25dp"
                android:text="Country*"

                android:textColor="#000"
                android:textSize="6pt" />

            <Spinner
                android:id="@+id/edit11"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_centerHorizontal="true"
                android:layout_marginLeft="10dp"
                android:entries="@array/country_arrays"
                android:gravity="center"
                android:popupBackground="#fff"
                android:spinnerMode="dropdown"
                android:textSize="6pt"

                />

            <TextView
                android:id="@+id/text7"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_alignLeft="@+id/text2"
                android:layout_alignParentTop="true"

                android:layout_marginLeft="4dp"
                android:layout_marginTop="25dp"
                android:text="Sector1"
                android:textColor="#000"
                android:textSize="6pt" />

            <Spinner
                android:id="@+id/spinner1"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_centerHorizontal="true"
                android:layout_marginLeft="10dp"

                android:gravity="center"
                android:popupBackground="#fff"
                android:prompt="@string/spinner1"
                android:spinnerMode="dropdown"
                android:textSize="7pt"
                android:theme="@style/TextAppearanceSpinnerItem"


                />

            <TextView
                android:id="@+id/text8"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_alignLeft="@+id/text2"
                android:layout_alignParentTop="true"

                android:layout_marginLeft="4dp"
                android:layout_marginTop="25dp"
                android:text="Exhibitor1"
                android:textColor="#000"
                android:textSize="6pt" />

            <Spinner
                android:id="@+id/spinnerExhibitor1"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_below="@+id/text4"
                android:layout_centerHorizontal="true"
                android:layout_marginLeft="10dp"
                android:gravity="center"
                android:popupBackground="#fff"
                android:prompt="@string/spinner1"
                android:spinnerMode="dropdown"
                android:textColor="#000"
                android:textSize="7pt"

                android:theme="@style/TextAppearanceSpinnerItem" />

            <TextView
                android:id="@+id/text00"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_alignLeft="@+id/text2"
                android:layout_alignParentTop="true"

                android:layout_marginLeft="4dp"
                android:layout_marginTop="25dp"
                android:text="Sector2"
                android:textColor="#000"
                android:textSize="6pt" />

            <Spinner
                android:id="@+id/spinner2"
                android:layout_width="match_parent"

                android:layout_height="wrap_content"
                android:layout_centerHorizontal="true"
                android:layout_marginLeft="10dp"
                android:entries="@array/About_arrays"
                android:gravity="center"
                android:popupBackground="#fff"
                android:prompt="@string/spinner1"
                android:spinnerMode="dropdown"
                android:textSize="7pt"
                android:theme="@style/TextAppearanceSpinnerItem" />


            <TextView
                android:id="@+id/text9"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_alignLeft="@+id/text2"
                android:layout_alignParentTop="true"

                android:layout_marginLeft="4dp"
                android:layout_marginTop="25dp"
                android:text="Exhibitor2"
                android:textColor="#000"
                android:textSize="6pt" />

            <Spinner
                android:id="@+id/spinnerExhibitor2"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_below="@+id/text4"
                android:layout_centerHorizontal="true"
                android:layout_marginBottom="10dp"
                android:layout_marginLeft="10dp"
                android:entries="@array/About_arrays"
                android:gravity="center"
                android:popupBackground="#fff"
                android:prompt="@string/spinner1"
                android:spinnerMode="dropdown"
                android:textColor="#000"
                android:textSize="7pt"
                android:theme="@style/TextAppearanceSpinnerItem" />

        </LinearLayout>

    </ScrollView>

    </RelativeLayout>

This is the relevant part of styles.xml:

  <resources>

  <!-- Base application theme. -->
  <style name="AppTheme" parent="Base.Theme.AppCompat.Light.DarkActionBar">
    <!-- Customize your theme here. -->

    <item name="colorPrimary">@color/colorPrimary</item>
     <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
    <item name="colorAccent">@color/colorAccent</item>
  </style>
<style name="AppTheme.AppBarOverlay"   parent="Base.ThemeOverlay.AppCompat.Dark.ActionBar">
    <item       name="android:textColorPrimary">@color/caldroid_lighter_gray</item>
     <item name="android:textColorSecondary">@color/colorAccent</item>
  </style>
  <style name="AppTheme.PopupOverlay"  parent="Base.ThemeOverlay.AppCompat.Light">
    <item name="android:colorBackground">@color/colorAccent</item>
    <item name="android:textColor">@color/colorAccent</item>
   </style>
   <style name="TextLabel" parent="Base.TextAppearance.AppCompat">
    <!-- Hint color and label color in FALSE state -->
    <item name="android:textColorHint">#535353</item>
    <item name="android:textSize">7pt</item>
    <!-- Label color in TRUE state and bar color FALSE and TRUE State -->
    <item name="colorAccent">#535353</item>
    <item name="colorControlNormal">#535353</item>
    <item name="colorControlActivated">#535353</item>
  </style>
  <style name="TextAppearanceSpinnerItem"   parent="android:TextAppearance.Widget.TextView.SpinnerItem">
    <item name="android:textColor">#000</item>
   </style>
    <style name="AppTheme.NoActionBar">
    <item name="windowActionBar">false</item>
    <item name="windowNoTitle">true</item>
 </style>

  <style name="MyEditTextTheme">
    <!-- Used for the bottom line when not selected / focused -->
    <item name="colorControlNormal">#d4d4d4</item>
    <!-- colorControlActivated & colorControlHighlight use the colorAccent      color by default -->
 </style>



  </resources>

And this is the error:

enter image description here

Here is the build.gradle(module: app) file

   apply plugin: 'com.android.application'
   apply plugin: 'realm-android'



    android {
    compileSdkVersion 23
   buildToolsVersion "23.0.3"

   defaultConfig {
    applicationId "com.project.evizon.wetex2016"
    minSdkVersion 16
    targetSdkVersion 23
    versionCode 1
    versionName "1.0"

  }
  buildTypes {
    release {
        minifyEnabled false


        proguardFiles getDefaultProguardFile('proguard-android.txt'),        'proguard-rules.pro'
    }
     }
    }

dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile files('libs/joda-time-2.0.jar')
compile files('libs/ksoap2-android-assembly-2.5.8-jar-with-  dependencies.jar')       
compile files('libs/joda-time-2.4.jar')
compile files('libs/YouTubeAndroidPlayerApi.jar')

compile 'com.android.volley:volley:1.0.0'
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.afollestad:sectioned-recyclerview:0.2.2'
compile 'pl.droidsonroids.gif:android-gif-drawable:1.1.16'
compile 'com.android.support:design:23.4.0'
compile 'dev.dworks.libs:astickyheader:0.1.0'
compile 'com.android.support:support-v4:23.4.0'
compile 'com.github.siyamed:android-shape-imageview:0.9.2@aar'
compile 'com.roomorama:caldroid:3.0.1'
compile 'com.google.android.gms:play-services:6.5.87'
compile 'com.github.siyamed:android-shape-imageview:0.9.+@aar'
    compile 'com.github.barteksc:android-pdf-viewer:1.3.0'
  compile "com.squareup.picasso:picasso:2.4.0"




  }

here is the build.gradle(project)

    buildscript {
  repositories {
    jcenter()
    maven { url "https://jitpack.io" }



  }


dependencies {
    classpath 'com.android.tools.build:gradle:2.1.0'
    classpath "io.realm:realm-gradle-plugin:1.0.1"


    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files
  }
 }

 allprojects {
repositories {
    jcenter()
  }
  }

task clean(type: Delete) {
delete rootProject.buildDir
  }
like image 286
MOHAMED HAFEEL K A Avatar asked Aug 30 '26 04:08

MOHAMED HAFEEL K A


2 Answers

This works for sure..... Use

style = "@style/TextLabel"

in your TextViews..... instead of

android:theme="@style/TextLabel"

this must be a bug in android because "android:theme: only works until you try to run your program.... and them all kinds of cryptic bugs come back.

like image 148
Denis Alarie 4RP Avatar answered Sep 02 '26 13:09

Denis Alarie 4RP


resolved the problem by removing the unnecessary styles such as 'android:theme="@style/MyEditTextTheme" ' added in the XML layout –

like image 25
MOHAMED HAFEEL K A Avatar answered Sep 02 '26 12:09

MOHAMED HAFEEL K A



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!