在Google Stock Android日历中存在多个视图(月,周,议程,周),从Google Android Sources Repositories下载的源代码具有相同的应用程序,通过探索代码,命名包com.android.calendar具有负责呈现这些活动的主视图:

通过努力解决代码,我使用了两个包com.android.calendar.month,com.android.calendar但无法实现我的目标,这是我使用的示例:

以及主要的以下代码:
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
Run Code Online (Sandbox Code Playgroud)
这是我的xml代码:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/month"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true"
android:paddingTop="1dip"
android:background="@null">
<TextView android:id="@+id/month_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="10dip"
android:visibility="gone"
style="@style/MonthView_MiniMonthLabel" />
<include android:id="@+id/day_names" layout="@layout/full_month_header" />
<View
android:background="@color/calendar_grid_line_inner_vertical_color"
android:layout_height="1px"
android:layout_width="match_parent" />
<com.android.calendar.month.MonthListView
android:id="@android:id/list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:drawSelectorOnTop="false" />
</LinearLayout>
Run Code Online (Sandbox Code Playgroud)
直到这里代码工作正常,但有一个空白的白色屏幕和一个操作栏,如果我的问题不明确请尝试编辑它.
What should be done to include Calendar Views (Month, Week, Day) in a custom application ?
Run Code Online (Sandbox Code Playgroud) 如何呈现存储在使用自定义标签的数据库中的图像文件(BLOB),I用于渲染标志,但图像被粉碎并输出为字节数组.
这是我试过的:
def logo = { attrs, body ->
if(session?.companyId && session?.companyId != 'null'){
Company company = Company.findById(session?.companyId)
if (!company || !company?.logo) {
println "No response..."
out <<"<img src='/cdc/static/images/logo.png' width='150' height='70' />"
}
else{
println "Writing..."
out << "<img src='"
out << company?.logo
out << "' width='150' height='70' />"
}
}
else{
println "No response..."
//out <<"<img src='/cdc/static/images/logo.png' width='150' height='70' />"
}
}
Run Code Online (Sandbox Code Playgroud)
输出如下:


公司如何?.logo呈现为图像而不是字节数组?