1
我想用CalendarView
显示Dialog
。我这是怎么显示Dialog
:Android日历视图有什么问题
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
View v = getActivity().getLayoutInflater().inflate(R.layout.dialog_calendart, null);
builder.setView(v);
builder.create().show();
,这是布局:
<?xml version="1.0" encoding="utf-8"?>
<CalendarView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
此工作正常时,Dialog
不包含CalendarView
,当它的Dialog
需要几秒钟显示我注意到这些线路的负荷在我LogCat
:
07-03 12:39:37.304 1534-1534/de.something.debug I/Choreographer﹕ Skipped 270 frames! The application may be doing too much work on its main thread.
07-03 12:39:37.348 1534-1534/de.something.debug D/dalvikvm﹕ GC_FOR_ALLOC freed 1621K, 10% free 18334K/20160K, paused 13ms, total 13ms
当它终于s ^怎么样了该Dialog
看起来是这样的:
我也试图设置一个日期为CalendarView
像
calendarView.setDate(23423423);
,但它仍然没有显示安雅日期。
那里出了什么问题?
即使你没能看到这个对话框还啊? “2014年7月” –