android - Shadows on toolbar and menu not showing in duplicate layout -


i encountered weird situation 1 of activity layout (design) acts differently!!to check error copied activity working design , link activity!! surprise, copied activity layout design changed, working before! attaching images reference!!

  1. activity works fine here
  2. the activity copied , created activity , linked

code of activity:

@override     protected void oncreate(bundle savedinstancestate) {         super.oncreate(savedinstancestate);         fabric.with(this, new crashlytics());         setcontentview(r.layout.activity_topup_method);         toolbar = (toolbar) findviewbyid(r.id.tool_bar);         setsupportactionbar(toolbar);         prefs = new preferencehelper(topupoperators.this);         topup = (linearlayout)findviewbyid(r.id.topup);         eload  = (linearlayout) findviewbyid(r.id.eload);         check = new checkinternetconnection(topupoperators.this);         isinternetpresent = check.isconnectingtointernet();         topup.setonclicklistener(new view.onclicklistener()         {             @override             public void onclick(view v)             {                 intent intent = new intent(topupoperators.this, topupall.class);                 intent.putextra("mode", "topup");                 startactivity(intent);             }         });         eload.setonclicklistener(new view.onclicklistener()         {             @override             public void onclick(view v)             {                 intent intent = new intent(topupoperators.this, topupall.class);                 intent.putextra("mode", "eload");                 startactivity(intent);             }         });     } 

----both activity has same code---

layout file:

<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="#fff">     <include         android:id="@+id/tool_bar"         layout="@layout/tool_bar"         ></include>     <progressbar         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:id="@+id/progressbar"         android:layout_centerinparent="true"         android:visibility="gone"/>      <imageview         android:id="@+id/zigzag_bottom"         android:layout_width="match_parent"         android:layout_below="@+id/mylayout"         android:layout_height="18dp"         android:adjustviewbounds="true"         android:scaletype="fitxy"         android:src="@drawable/zigzag"/>      <relativelayout         android:id="@+id/mylayout"         android:background="@color/colorprimary"         android:layout_width="match_parent"         android:layout_height="80dp"         android:layout_below="@+id/tool_bar"         android:layout_alignparentleft="true"         android:layout_alignparentstart="true">          <textview             android:text="select recharge method"             android:layout_width="wrap_content"             android:layout_height="wrap_content"             android:layout_alignparentbottom="true"             android:layout_centerhorizontal="true"             android:layout_marginbottom="22dp"             android:id="@+id/textview"             android:textsize="18sp"             android:textcolor="#fff"             android:textstyle="normal|bold" />     </relativelayout>      <linearlayout         android:id="@+id/eload"         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:layout_margintop="33dp"         android:background="@drawable/gridbackground"         android:orientation="vertical"         android:src="@drawable/voucher"         android:padding="5dp"         android:layout_below="@+id/topup"         android:layout_centerhorizontal="true">           <de.hdodenhof.circleimageview.circleimageview             xmlns:app="http://schemas.android.com/apk/res-auto"             android:id="@+id/grid_item_image2"             android:layout_width="95dp"             android:src="@drawable/eload"             android:layout_height="95dp"/>         <textview             android:id="@+id/grid_item_title2"             android:layout_width="fill_parent"             android:layout_height="wrap_content"             android:layout_margintop="5dp"             android:gravity="center"             android:text="e-load"             android:maxlines="2"             android:ellipsize="marquee"             android:textsize="15sp"             android:textstyle="normal|bold" />      </linearlayout>      <linearlayout         android:id="@+id/topup"         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:layout_margintop="16dp"         android:background="@drawable/gridbackground"         android:orientation="vertical"         android:padding="5dp"         android:layout_below="@+id/zigzag_bottom"         android:layout_alignleft="@+id/eload"         android:layout_alignstart="@+id/eload">           <de.hdodenhof.circleimageview.circleimageview             xmlns:app="http://schemas.android.com/apk/res-auto"             android:id="@+id/grid_item_image1"             android:layout_width="95dp"             android:layout_height="95dp"             android:src="@drawable/voucher"/>         <textview             android:id="@+id/grid_item_title1"             android:layout_width="fill_parent"             android:layout_height="wrap_content"             android:layout_margintop="5dp"             android:gravity="center"             android:maxlines="2"             android:ellipsize="marquee"             android:textsize="15sp"             android:textstyle="normal|bold"             android:text="voucher" />      </linearlayout> 

please help:

manifest:

<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android"     xmlns:tools="http://schemas.android.com/tools"     package="com.mobeeloadpartner">      <uses-permission android:name="android.permission.bluetooth" />     <uses-permission android:name="android.permission.bluetooth_admin" />     <uses-permission android:name="android.permission.internet"/>      <uses-permission android:name="android.permission.access_fine_location" />     <uses-permission android:name="android.permission.access_coarse_location" />     <uses-permission android:name="android.permission.access_network_state"/>     <uses-permission android:name="android.permission.access_wifi_state"/>     <uses-permission android:name="android.permission.write_external_storage" />     <uses-permission android:name="android.permission.read_external_storage" />     <uses-permission android:name="android.permission.install_packages" />     <application         android:allowbackup="true"         android:icon="@mipmap/ic_launcher"         android:label="@string/app_name"         android:supportsrtl="true"         android:screenorientation="portrait"         android:theme="@style/apptheme">         <activity             android:label="@string/app_name"             android:screenorientation="portrait"             android:name=".splashscreen">             <intent-filter>                 <action android:name="android.intent.action.main" />                 <category android:name="android.intent.category.launcher" />             </intent-filter>         </activity>         <activity             android:name=".deviceverification"             android:screenorientation="portrait"             android:label="@string/deviceverification" >         </activity>         <activity             android:name=".topuplist"             android:screenorientation="portrait"             android:label="mobile topup" >         </activity>         <activity             android:name=".pinverification"             android:screenorientation="portrait"             android:label="@string/pinverification" >         </activity>         <activity             android:name=".couponredeem"             android:screenorientation="portrait"             android:label="coupon redeem" >         </activity>          <activity             android:name=".mainactivity"             android:launchmode="singletask"             android:screenorientation="portrait"             android:label="@string/app_name" >         </activity>         <activity             android:name=".topup"             android:hardwareaccelerated="false"             android:screenorientation="portrait"             android:label="@string/topuptab" >         </activity>         <activity             android:name=".topupall"             android:hardwareaccelerated="false"             android:screenorientation="portrait"             android:label="@string/topuptab" >         </activity>         <activity             android:name=".topupoperators"             android:hardwareaccelerated="false"             android:screenorientation="portrait"             android:label="@string/topuptab" >         </activity>         <activity             android:name=".rechargeactivity"             android:screenorientation="portrait"             android:label="@string/rechargetab" >         </activity>         <activity             android:name=".eloadactivity1"             android:windowsoftinputmode="adjustpan"             android:screenorientation="portrait"             android:label="@string/erechargetab" >         </activity>          <activity             android:name=".bankreport"             android:windowsoftinputmode="adjustpan"             android:label="status" >         </activity>         <activity             android:name=".settingsactivity"             android:screenorientation="portrait"             android:label="@string/settings" >         </activity>         <activity             android:name=".earnings"             android:screenorientation="portrait"             android:label="@string/earnings_redem" >         </activity>         <activity             android:name=".bankincash"             android:screenorientation="portrait"             android:label="@string/bank_deposit" >         </activity>         <activity             android:name=".transactionsactivity"             android:screenorientation="portrait"             android:label="@string/transactions" >         </activity>         <activity             android:name=".bankactivity"             android:screenorientation="portrait"             android:label="@string/bankactivity" >         </activity>         <activity             android:name=".printactivity"             android:screenorientation="portrait"             android:label="print pos" >         </activity>         <activity             android:name=".printbluetooth"             android:screenorientation="portrait"             android:label="print bluetooth" >         </activity>         <activity             android:name=".transactionstatus"             android:screenorientation="portrait"             android:label="transaction status" >         </activity>         <activity             android:name=".internationalcountry"             android:screenorientation="portrait"             android:label="international topup" >         </activity>          <activity             android:name=".internationalzone"             android:screenorientation="portrait"             android:label="international topup" >         </activity>          <activity             android:name=".internationaloperators"             android:screenorientation="portrait"             android:label="international topup" >         </activity>         <activity             android:name=".dthlist"             android:screenorientation="portrait"             android:label="dth" >         </activity>         <activity             android:name=".dthrecharge"             android:screenorientation="portrait"             android:windowsoftinputmode="adjustpan"             android:label="dth recharge" >         </activity>         <activity             android:name=".internationaltopup"             android:windowsoftinputmode="adjustpan"             android:screenorientation="portrait"             android:label="international topup" >         </activity>         <activity             android:name=".billpaymentservices"             android:screenorientation="portrait"             android:label="bill payment" >         </activity>         <activity             android:name=".billpaymenttype"             android:screenorientation="portrait"             android:label="bill payment" >         </activity>         <activity             android:name=".billpaymentoperators"             android:screenorientation="portrait"             android:label="bill payment" >         </activity>         <activity             android:name=".billpaymentrecharge"             android:screenorientation="portrait"             android:label="bill payment" >         </activity>          <activity             android:name=".billpaymentvvp"             android:screenorientation="portrait"             android:label="bill payment" >         </activity>         <activity             android:name=".login"             android:screenorientation="portrait"             android:label="login" >         </activity>         <activity             android:name=".billpaymentold"             android:screenorientation="portrait"             android:label="bill payment" >         </activity>          <activity             android:name=".billpaymentfvv"             android:screenorientation="portrait"             android:label="bill payment" >         </activity>          <activity             android:name=".billpaymentvvr"             android:screenorientation="portrait"             android:label="bill payment" >         </activity>         <activity             android:name=".comingsoon"             android:screenorientation="portrait"             android:label="coming soon" >         </activity>         <activity             android:name=".paperrequest"             android:screenorientation="portrait"             android:label="paper request" >         </activity>         <activity             android:name=".billpaymentcountry"             android:screenorientation="portrait"             android:label="bill payment" >         </activity>         <activity             android:name=".globalactivity"             android:screenorientation="portrait"             android:label="international payments" >         </activity>         <activity             android:name=".voucheractivity"             android:screenorientation="portrait"             android:label="voucher printing" >         </activity>         <activity             android:name=".fundtransferhistory"             android:screenorientation="portrait"             android:label="fund transfer history" >         </activity>         <activity             android:name=".transactionstatusbt"             android:screenorientation="portrait"             android:label="transaction status" >         </activity>         <activity             android:name=".salesreport"             android:screenorientation="portrait"             android:label="sales report" >         </activity>         <activity             android:name=".salesreportpos"             android:screenorientation="portrait"             android:label="sales report" >         </activity>          <activity             android:name=".transactionstatuspos"             android:screenorientation="portrait"             android:label="transaction status" >         </activity>          <activity android:name=".devicelistactivity"             android:label="@string/select_device"             android:theme="@android:style/theme.dialog"             android:configchanges="orientation|keyboardhidden" />           <service android:name=".myfirebasemessagingservice">             <intent-filter>                 <action android:name="com.google.firebase.messaging_event" />             </intent-filter>         </service>         <service android:name=".firebaseidservice">             <intent-filter>                 <action android:name="com.google.firebase.instance_id_event" />             </intent-filter>         </service>         <meta-data             android:name="io.fabric.apikey"             android:value="xxxxxxx"             />     </application>  </manifest> 

finally, able issue!

android:hardwareaccelerated="false" 

this line in manifest making issue. removing line solved issue!! in android developer docs, saying may affect views!


Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -