<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout
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"
tools:context=".MainActivity"
android:background="#c4c4c4">
<com.google.android.material.bottomappbar.BottomAppBar
android:id="#+id/bottomAppBar"
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_gravity="bottom"
android:background="color/white"
app:fabCradleRoundedCornerRadius="10dp"
app:fabCradleMargin="4dp" />
<com.google.android.material.bottomnavigation.BottomNavigationView
android:id="#+id/bottomNavigationView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:menu="#menu/bottom_menu"
android:background="#android:color/transparent"
android:layout_gravity="bottom"/>
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:layout_width="90dp"
android:layout_height="90dp"
android:backgroundTint="#color/white"
android:src="#drawable/qr"
app:fabCustomSize="90dp"
app:layout_anchor="#id/bottomAppBar"
app:maxImageSize="40dp"
tools:ignore="SpeakableTextPresentCheck" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>
<com.google.android.material.bottomappbar >this part error occured
the error is
"Android resource linking failed"
what can i do ???
i tried to fix <build.gradle>
dependencies {
implementation 'androidx.appcompat:appcompat:1.5.1'
implementation 'com.google.android.material:material:1.3.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.4'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.0'
}
someone tell that can be fixed when i downgrade material version
but it's not..
Related
I have implemented submit feed API for _POST_ORDER_FULFILLMENT_DATA_ and get feedsubmission result. it returns InputDataError.
request:
<?xml version="1.0" encoding="UTF-8"?>
<AmazonEnvelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="amzn-envelope.xsd">
<Header>
<DocumentVersion>1.01</DocumentVersion>
<MerchantIdentifier>A1OLX7E3BCNOP2</MerchantIdentifier>
</Header>
<MessageType>OrderFulfillment</MessageType>
<Message>
<MessageID>1</MessageID>
<OrderFulfillment>
<MerchantOrderID>114-7129872-3010653</MerchantOrderID>
<MerchantFulfillmentID>5e79aa3205f4f</MerchantFulfillmentID>
<FulfillmentDate>2020-03-06T09:00:00Z</FulfillmentDate>
<FulfillmentData>
<CarrierCode>USPS</CarrierCode>
<ShippingMethod>First Class</ShippingMethod>
<ShipperTrackingNumber>9405511298370995607859</ShipperTrackingNumber>
</FulfillmentData>
<Item>
<MerchantOrderItemID>60227359610258</MerchantOrderItemID>
<MerchantFulfillmentItemID>item_5e79aa3205f4f</MerchantFulfillmentItemID>
<Quantity>1</Quantity>
<Transparencycode>AZ:SHGNCW8HKBBB8O4WZKYSHN7GYI</Transparencycode>
</Item>
</OrderFulfillment>
</Message>
</AmazonEnvelope>
Response:
<?xml version="1.0"?>
<ErrorResponse xmlns="http://mws.amazonaws.com/doc/2009-01-01/">
<Error>
<Type>Sender</Type>
<Code>InputDataError</Code>
<Message>InputDataError</Message>
<Detail />
</Error>
<RequestID>7d4ebf9a-6cb1-4b45-9191-0a00c268982a</RequestID>
</ErrorResponse>
Can anyone help me for this issue?
In my past experience, MWS is very picky about capitalization (and spelling). Check TransparencyCode. You don't have the "c" capitalized. According to the XSD, it is. Make sure everything matches.
https://images-na.ssl-images-amazon.com/images/G/01/rainier/help/xsd/release_4_1/OrderFulfillment.xsd
Application with multiple content and each content with multiple documents is throwing "ClusterSearcher should have a top level dispatch." when deployed on multi node cluster with multiple content nodes. The same is working on a single node cluster with a single content node.
Using [Vespa version: ] 7.51.13
com.yahoo.container.di.componentgraph.core.ComponentNode$ComponentConstructorException: Error constructing 'com.yahoo.prelude.cluster.ClusterSearcher in acme'
Caused by: java.lang.IllegalStateException: ClusterSearcher should have a top level dispatch.
================= services.xml ==============
<?xml version="1.0" encoding="utf-8" ?>
<admin version="2.0">
<adminserver hostalias="admin0"/>
<configservers>
<configserver hostalias="admin0"/>
</configservers>
</admin>
<container id="container" version="1.0">
<config name="search.config.qr-start">
<jvm>
<heapSizeAsPercentageOfPhysicalMemory>50</heapSizeAsPercentageOfPhysicalMemory>
</jvm>
</config>
<document-api />
<http>
<server id="stateless1" port="8080">
</server>
</http>
<search>
<chain id="default" inherits="vespa">
<searcher id="com.acme.search.CatalogSearcher" bundle="sth-search">
<config name="com.acme.search.Searcher">
<redirectsFile>redirects.txt</redirectsFile>
<autoCorrectAPI>https://apps02.acme.com:9815/search/</autoCorrectAPI>
<connectionTimeout>250</connectionTimeout>
<connectionRequestTimeout>250</connectionRequestTimeout>
<socketTimeout>250</socketTimeout>
</config>
</searcher>
</chain>
</search>
<nodes jvmargs="-verbose:gc">
<node hostalias="stateless0"/>
<node hostalias="stateless1"/>
</nodes>
</container>
<content id="sth" version="1.0">
<redundancy>2</redundancy>
<documents>
<document type="sth" mode="index" />
</documents>
<nodes>
<node hostalias="content0" distribution-key="0"/>
<node hostalias="content1" distribution-key="1"/>
</nodes>
</content>
<content id="thesaurus" version="1.0">
<redundancy>2</redundancy>
<documents>
<document type="thesaurus" mode="index"/>
</documents>
<nodes>
<node hostalias="content0" distribution-key="0"/>
<node hostalias="content1" distribution-key="1"/>
</nodes>
</content>
<content id="acme" version="1.0">
<redundancy>2</redundancy>
<documents>
<document type="vc_products" mode="index" />
<document type="vc_thesaurus" mode="index"/>
</documents>
<nodes>
<node hostalias="content0" distribution-key="0"/>
<node hostalias="content1" distribution-key="1"/>
</nodes>
</content>
From comments, you get this not when you actually deploy on multiple nodes but when you try to instantiate a mock Application instance in a unit test, as in Application.fromApplicationPackage(...).
The reason for this is that Application is not able to fully mock a full application, only the stateless container parts. The ClusterSearcher which is instantiated in this setup complains that it can't see any real content clusters downstream (which is correct), it does not know it has been created in a mocked setup.
For this reason you need to create special services.xmls for unit tests as in general the one you use in production will give problems like this. Using Application works well for testing specific functionality of a set of components but not for unit testing your true production application.
We would like to improve this by mocking component clusters inside application but nobody's working on it at the moment. if you want to have a go at it the code is in
https://github.com/vespa-engine/vespa/tree/master/application
I have my custom Searcher and my custom DocumenetProcessor in my vespa app.My service.xml is given below:
<services version="1.0">
<container id="default" version="1.0">
<document-api/>
<search>
<chain id="default" inherits="vespa">
<searcher id="com.example.test.CustomSearcher" bundle="example-vespa-app"/>
</chain>
</search>
<nodes>
<node hostalias="node1" />
</nodes>
<document-processing>
<chain id="default" inherits="vespa">
<documentprocessor id="com.example.test.CustomDocumentProcessor"/>
</chain>
</document-processing>
</container>
<content id="test_user" version="1.0">
<redundancy>1</redundancy>
<documents>
.....
</documents>
<nodes>
<node hostalias="node1" distribution-key="0" />
</nodes>
</content>
</services>
My CustomDocumentProcessor is given below:
public class CustomDocumentProcessor extends DocumentProcessor {
#Override
public Progress process(Processing processing) {
for (DocumentOperation op : processing.getDocumentOperations()) {
if (op instanceof DocumentPut) {
DocumentPut put = (DocumentPut) op;
Document document = put.getDocument();
document.setFieldValue("documentType",
String.valueOf(document.getDataType()));
}
}
return Progress.DONE;
}
}
When I remove CustomDocumentProcessor from service.xml, my app works .When I add it , It gives an error:
Request failed. HTTP status code: 400
Invalid application package: default.default: Error loading model: Missing chain 'vespa'.
Why is that? Please help.
Remove "inherits=vespa" from the document-processing chain.
There is no "vespa document processing chain like there is for search chains.
I want to place ad banner startapp at bottom of screen. it keeps appears on the top . i want it to be in the buttom of the screen you find my code down here ..
I am trying to position the ad at the bottom of the screen but nothing I try seems to work.
Below is the XML code for the layout thanks a lot .
<android.support.constraint.ConstraintLayout
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="#mipmap/pictureone"
tools:context="org.sna.myapplication.MainActivity">
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_gravity="center"
android:background="#mipmap/pictureone"
android:weightSum="10"
android:clickable="false">
<TextView
android:layout_width="340dp"
android:layout_height="wrap_content"
android:text="click NEXT to start the application"
android:id="#+id/textView3"
android:layout_gravity="center_horizontal"
android:textColor="#ffffff"
android:textSize="30dp"
android:layout_weight="1.58"
android:textAlignment="center" />
<ImageView
android:layout_width="150dp"
android:layout_height="wrap_content"
android:id="#+id/imageView6"
android:layout_gravity="center_horizontal"
android:layout_weight="1"
android:background="#mipmap/oussama"
android:layout_marginTop="1dp"
android:clickable="true"
android:onClick="next" />
</LinearLayout>
<com.startapp.android.publish.ads.banner.Banner
android:id="#+id/startAppBanner"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
tools:layout_editor_absoluteY="0dp"
tools:layout_editor_absoluteX="0dp" />
</android.support.constraint.ConstraintLayout>
Place the banner within your LinearLayout
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_gravity="center"
android:background="#mipmap/pictureone"
android:weightSum="10"
android:clickable="false">
<TextView
android:layout_width="340dp"
android:layout_height="wrap_content"
android:text="click NEXT to start the application"
android:id="#+id/textView3"
android:layout_gravity="center_horizontal"
android:textColor="#ffffff"
android:textSize="30dp"
android:layout_weight="1.58"
android:textAlignment="center" />
<ImageView
android:layout_width="150dp"
android:layout_height="wrap_content"
android:id="#+id/imageView6"
android:layout_gravity="center_horizontal"
android:layout_weight="1"
android:background="#mipmap/oussama"
android:layout_marginTop="1dp"
android:clickable="true"
android:onClick="next" />
<com.startapp.android.publish.ads.banner.Banner
android:id="#+id/startAppBanner"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
tools:layout_editor_absoluteY="0dp"
tools:layout_editor_absoluteX="0dp" />
</LinearLayout>
I have a requirement to create a Keypad as follows
1) only Edit Text is Visible Initially
2) on click of the Edit Text launches a tabwidget/Buttons/ImageView and the first tab of the Widget contains the Default system keypad and rest of the tabs contain the Custom Keypad.
3) The EditText appears on top of the Keypad and the tabWi
I tried using the SCrollView as mentioned below
I have the following XML
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<ScrollView
android:id="#+id/scrollView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentRight="true">
<EditText
android:id="#+id/editview"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="15dp"
android:ems="10"
android:inputType="text"/>
</ScrollView>
<RelativeLayout
android:id="#+id/relView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_marginBottom="-8dip ">
<ImageView
android:id="#+id/button1"
android:src="#drawable/ic_launcher"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_marginRight="-8dip"
android:layout_marginLeft="-8dip" />
<ImageView
android:id="#+id/button2"
android:src="#drawable/ic_launcher"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="#id/button1"
android:adjustViewBounds="true"
android:layout_marginRight="-8dip" />
<ImageView
android:id="#+id/button3"
android:src="#drawable/ic_launcher"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="#id/button2"
android:adjustViewBounds="true"
android:layout_marginRight="-8dip" />
<ImageView
android:id="#+id/button4"
android:src="#drawable/ic_launcher"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="#id/button3"
android:adjustViewBounds="true"
android:layout_marginRight="-8dip" />
</RelativeLayout>
</RelativeLayout>
This way it launches the Keypad and the Image View is visible at the bottom of screen
by setting android:windowSoftInputMode="stateAlwaysHidden|adjustResize|adjustPan"
But i want to get only ImageView and the Keypad on click of EditText & Edit Text should be on top of the Keypad.