我有一个工作调度程序,它使用来自ajax调用的json数据。我似乎无法在文档中找到的问题是:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:elevation="4dp"
android:layoutDirection="ltr"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:id="@id/exo_position"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:includeFontPadding="false"
android:paddingLeft="4dp"
android:paddingRight="4dp"
android:textColor="#FFBEBEBE"
android:textSize="12sp"
android:textStyle="bold" />
<com.example.myapplication.PreviewSeekBarLayout
android:id="@+id/previewSeekBarLayout"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical">
<FrameLayout
android:id="@+id/previewFrameLayout"
android:layout_width="@dimen/video_preview_width"
android:layout_height="@dimen/video_preview_height"
android:background="@drawable/video_frame"
android:padding="@dimen/video_frame_width">
<com.google.android.exoplayer2.ui.SimpleExoPlayerView
android:id="@+id/previewPlayerView"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:controller_layout_id="@layout/exo_simple_player_view"
app:surface_type="surface_view"
app:use_artwork="false"
app:use_controller="false" />
</FrameLayout>
<com.example.myapplication.PreviewSeekBar
android:id="@+id/exo_progress"
style="?android:attr/progressBarStyleHorizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/previewFrameLayout"
android:layout_marginTop="10dp"
android:max="800"
android:progressTint="@color/colorPrimary"
android:thumbTint="@color/colorPrimary"
app:paddingStart="10dp" />
</com.example.myapplication.PreviewSeekBarLayout>
<TextView
android:id="@id/exo_duration"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:includeFontPadding="false"
android:paddingLeft="4dp"
android:paddingRight="4dp"
android:textColor="#FFBEBEBE"
android:textSize="12sp"
android:textStyle="bold" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#CC000000"
android:gravity="center"
android:orientation="horizontal"
android:paddingTop="4dp">
<ImageButton
android:id="@id/exo_prev"
style="@style/ExoMediaButton.Previous" />
<ImageButton
android:id="@id/exo_rew"
style="@style/ExoMediaButton.Rewind" />
<ImageButton
android:id="@id/exo_play"
style="@style/ExoMediaButton.Play" />
<ImageButton
android:id="@id/exo_pause"
style="@style/ExoMediaButton.Pause" />
<ImageButton
android:id="@id/exo_ffwd"
style="@style/ExoMediaButton.FastForward" />
<ImageButton
android:id="@id/exo_next"
style="@style/ExoMediaButton.Next" />
</LinearLayout>
</LinearLayout>
(例如),以便它们不会更改/可见?我只想编辑时间表名称。Description
它不会出现,我必须手动导航到计划要查看它的日期,是否有一个选项那?我认为我能实现这一目标的唯一方法是获取日期并将其设置为current date
属性,但这有可能吗?答案 0 :(得分:2)
1)要自定义约会表单,请使用onAppointmentFormCreated事件。请参阅此demo。
2)要将调度程序导航到特定日期,请使用currentDate选项。下面的示例显示了如何使用onContentReady选项执行此操作:
$("#scheduler").dxScheduler({
/*...*/
// set default current date too old for demo
currentDate: new Date(2010, 4, 18),
onContentReady: function(e) {
// get all loaded appointments
var appointments = e.component.getDataSource().items();
// navigate to the first appointment
e.component.option("currentDate", new Date(appointments[0].startDate));
}
});