0
I ListFragment
のカスタムエラーDialogFragment
のエラーが表示されます。そのエラーを示しています。 私はそこにこだわっていますカスタムダイアログでListFragmentを使用すると、複数のマップを持つ
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/sky_blue"
android:orientation="vertical">
<TextView
android:id="@+id/upcomingShifts"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:textColor="@color/black"
android:textSize="@dimen/text_size_24sp"
android:padding="@dimen/padding_10dp"
android:text="@string/upcoming_shifts"/>
<FrameLayout
android:id="@+id/frameLayout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<fragment
android:id="@+id/lvMapFragment"
class="android.support.v4.app.ListFragment"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</FrameLayout>
</LinearLayout>
を私を助けここに私のカスタムダイアログコード
あなたがレイアウトを変更しようとすることができます@Override
protected Dialog onCreateDialogPost(Bundle savedInstanceState) {
dialog = new Dialog(getActivity(), R.style.AppDialogTheme);
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
dialog.setContentView(R.layout.activity_up_coming_shift);
WindowManager windowManager = (WindowManager) getActivity().getSystemService(Context.WINDOW_SERVICE);
dialog.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_HIDDEN | WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);
// dialog.getWindow().getAttributes().windowAnimations = R.style.AppDialogPullAnimation;
WindowManager.LayoutParams layoutParams = dialog.getWindow().getAttributes();
Display display = windowManager.getDefaultDisplay();
Point point = new Point();
display.getSize(point);
int width = point.x - 40;
layoutParams.gravity = Gravity.TOP | Gravity.LEFT;
dialog.getWindow().setLayout(width, ViewGroup.LayoutParams.MATCH_PARENT);
dialog.setCancelable(true);
init();
return dialog;
}
あなたがレイアウトし、また、エラーログを膨らまコードを表示してください。 – ishmaelMakitla
も間違いを投稿してください。 – Sush
android.view.InflateException:バイナリXMLファイル行#23:クラスフラグメントinflatingエラー –