您好我在Caused by: org.apache.camel.ResolveEndpointFailedException:
Failed to resolve endpoint: arn://aws:sns:yopa-local:000000000000:test-topic-with-subscriptions due to: No component found with scheme: arn
org.apache.camel.RuntimeCamelException: org.apache.camel.FailedToCreateRouteException:
Failed to create route publish.route at: >>> To[arn:aws:sns:yopa-local:000000000000:test-topic with-subscriptions] <<< in route: Route(publish.route [[From[bean:snsPublisher... because of Failed to resolve endpoint: arn://aws:sns:yopa-local:000000000000:test-topic-with-subscriptions due to: No component found with scheme: arn
档案
activity.xml
我在<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/activity_change_password"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="0dp"
android:paddingLeft="0dp"
android:paddingRight="0dp"
android:paddingTop="0dp"
android:layout_marginTop="0dp"
tools:context="com.kdpl.motodriver.ChangePassword">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar1"
android:layout_width="fill_parent"
android:layout_height="58dp"
android:background="?attr/colorPrimary"
android:minHeight="?attr/actionBarSize"
android:titleTextColor="#ffffff">
<Button
android:layout_width="25dp"
android:layout_height="25dp"
android:background="@drawable/back_arrow" android:onClick="onBackPressed" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/change_password_header"
android:layout_gravity="center"
android:id="@+id/toolbar_title"
style="@style/TitleStyle"/>
</android.support.v7.widget.Toolbar>
<android.support.design.widget.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="30dp"
android:layout_below="@+id/toolbar1"
android:id="@+id/txt1">
<EditText
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:id="@+id/txtOldPIN"
android:hint="@string/txt_old_pin"
android:maxLength="4"
android:paddingLeft="10dp"
android:textColor="#ffffff"
android:inputType="numberPassword"
android:textColorHint="@color/lightGray"
android:gravity="center_vertical"/>
</android.support.design.widget.TextInputLayout>
<android.support.design.widget.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:layout_below="@+id/txt1"
android:id="@+id/txt2">
<EditText
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:paddingLeft="10dp"
android:textColor="#ffffff"
android:id="@+id/txtNewPin"
android:inputType="numberPassword"
android:maxLength="4"
android:hint="@string/txt_new_pin"
android:textColorHint="@color/lightGray"
android:gravity="center_vertical"/>
</android.support.design.widget.TextInputLayout>
<android.support.design.widget.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:layout_below="@+id/txt2"
android:id="@+id/txt3">
<EditText
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:paddingLeft="10dp"
android:id="@+id/txtConfirmPin"
android:inputType="numberPassword"
android:maxLength="4"
android:textColor="#ffffff"
android:layout_below="@+id/txt2"
android:hint="@string/txt_confirm_new_pin"
android:textColorHint="@color/lightGray"
android:gravity="center_vertical"/>
</android.support.design.widget.TextInputLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_alignParentBottom="true">
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/btnChangePIN"
android:layout_marginRight="16dp"
android:layout_marginLeft="16dp"
android:layout_centerHorizontal="true"
android:background="@drawable/my_custom_btn_1"
android:layout_below="@id/txt3"
style="@style/buttonStyle"
android:text="@string/txt_change_pin"
android:enabled="false"/>
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/btnCancelPIN"
android:layout_marginTop="20dp"
android:layout_marginRight="16dp"
android:layout_marginLeft="16dp"
android:layout_centerHorizontal="true"
android:background="@drawable/my_custom_btn_1"
android:layout_below="@id/btnChangePIN"
style="@style/buttonStyle"
android:text="@string/btn_cancel_text" />
</LinearLayout>
Manifest.xml
但是当键盘打开时 <activity android:name=".ChangePassword"
android:configChanges="orientation|keyboardHidden"
android:screenOrientation="portrait"
android:windowSoftInputMode="adjustResize"
/>
会隐藏。布局不会自行调整大小。
我缺少什么?
更新了视图
Buttons align parent bottom
我已更新自己的观点,在<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/activity_change_password"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="0dp"
android:paddingLeft="0dp"
android:paddingRight="0dp"
android:paddingTop="0dp"
android:layout_marginTop="0dp"
tools:context="com.kdpl.motodriver.ChangePassword">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar1"
android:layout_width="fill_parent"
android:layout_height="58dp"
android:background="?attr/colorPrimary"
android:minHeight="?attr/actionBarSize"
android:titleTextColor="#ffffff">
<Button
android:layout_width="25dp"
android:layout_height="25dp"
android:background="@drawable/back_arrow" android:onClick="onBackPressed" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/change_password_header"
android:layout_gravity="center"
android:id="@+id/toolbar_title"
style="@style/TitleStyle"/>
</android.support.v7.widget.Toolbar>
<ScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/toolbar1">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<android.support.design.widget.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:layout_below="@+id/toolbar1"
android:id="@+id/txt1">
<EditText
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:id="@+id/txtOldPIN"
android:hint="@string/txt_old_pin"
android:maxLength="4"
android:paddingLeft="10dp"
android:textColor="#ffffff"
android:inputType="numberPassword"
android:textColorHint="@color/lightGray"
android:gravity="center_vertical"/>
</android.support.design.widget.TextInputLayout>
<android.support.design.widget.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:layout_below="@+id/txt1"
android:id="@+id/txt2">
<EditText
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:paddingLeft="10dp"
android:textColor="#ffffff"
android:id="@+id/txtNewPin"
android:inputType="numberPassword"
android:maxLength="4"
android:hint="@string/txt_new_pin"
android:textColorHint="@color/lightGray"
android:gravity="center_vertical"/>
</android.support.design.widget.TextInputLayout>
<android.support.design.widget.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:layout_below="@+id/txt2"
android:id="@+id/txt3">
<EditText
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:paddingLeft="10dp"
android:id="@+id/txtConfirmPin"
android:inputType="numberPassword"
android:maxLength="4"
android:textColor="#ffffff"
android:layout_below="@+id/txt2"
android:hint="@string/txt_confirm_new_pin"
android:textColorHint="@color/lightGray"
android:gravity="center_vertical"/>
</android.support.design.widget.TextInputLayout>
</LinearLayout>
</ScrollView>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingBottom="10dp"
android:layout_alignParentBottom="true">
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/btnChangePIN"
android:layout_marginRight="16dp"
android:layout_marginLeft="16dp"
android:layout_centerHorizontal="true"
android:background="@drawable/my_custom_btn_1"
android:layout_below="@id/txt3"
style="@style/buttonStyle"
android:text="@string/txt_change_pin"
android:enabled="false"/>
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/btnCancelPIN"
android:layout_marginTop="20dp"
android:layout_marginRight="16dp"
android:layout_marginLeft="16dp"
android:layout_centerHorizontal="true"
android:background="@drawable/my_custom_btn_1"
android:layout_below="@id/btnChangePIN"
style="@style/buttonStyle"
android:text="@string/btn_cancel_text" />
</LinearLayout>
和scrollview
之间添加toolbar
。我也按照建议在我的活动中添加了buttons
..它有效但不完美。现在getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);
重叠了Buttons
中的观看次数。附件是图片
答案 0 :(得分:1)
添加父布局是滚动视图
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
</ScrollView >
答案 1 :(得分:1)
另一个答案是添加
android:windowSoftInputMode="adjustResize"
答案 2 :(得分:0)
请使用adjustPan而不是adjustResize,如下所示:
<activity android:name=".ChangePassword"
android:configChanges="orientation|keyboardHidden"
android:screenOrientation="portrait"
android:windowSoftInputMode="adjustPan" />
答案 3 :(得分:0)
为什么不使用CoordinateLayout作为父布局。如果它可以用于零食,它也必须适用于键盘
答案 4 :(得分:0)
在您的活动中添加此代码:
getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);