本文整理汇总了Java中org.parceler.Parcels.wrap方法的典型用法代码示例。如果您正苦于以下问题:Java Parcels.wrap方法的具体用法?Java Parcels.wrap怎么用?Java Parcels.wrap使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.parceler.Parcels
的用法示例。
在下文中一共展示了Parcels.wrap方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: FABPressed
import org.parceler.Parcels; //导入方法依赖的package包/类
@OnClick(R.id.fab)
public void FABPressed() {
Intent result = new Intent();
Trip aTrip = new Trip();
aTrip.name = jname.getText().toString();
aTrip.location = location.getText().toString();
DateTimeFormatter fmt = ISODateTimeFormat.dateTime();
aTrip.startDate = fmt.print(startDate);
aTrip.endDate = fmt.print(endDate);
// add more code to initialize the rest of the fields
Parcelable parcel = Parcels.wrap(aTrip);
result.putExtra("TRIP", parcel);
setResult(RESULT_OK, result);
finish();
}
示例2: FABPressed
import org.parceler.Parcels; //导入方法依赖的package包/类
@OnClick(R.id.fab)
public void FABPressed() {
Intent result = new Intent();
currentTrip.name = jname.getText().toString();
DateTimeFormatter fmt = ISODateTimeFormat.dateTime();
currentTrip.startDate = fmt.print(startDate);
currentTrip.endDate = fmt.print(endDate);
// add more code to initialize the rest of the fields
Parcelable parcel = Parcels.wrap(currentTrip);
result.putExtra("TRIP", parcel);
setResult(RESULT_OK, result);
finish();
}
示例3: FABPressed
import org.parceler.Parcels; //导入方法依赖的package包/类
@OnClick(R.id.fab)
public void FABPressed() {
Intent result = new Intent();
currentTrip.setName(jname.getText().toString());
DateTimeFormatter fmt = ISODateTimeFormat.dateTime();
currentTrip.setStartDate(fmt.print(startDate));
currentTrip.setEndDate(fmt.print(endDate));
// add more code to initialize the rest of the fields
Parcelable parcel = Parcels.wrap(currentTrip);
result.putExtra("TRIP", parcel);
setResult(RESULT_OK, result);
finish();
}
示例4: toMediaEdit
import org.parceler.Parcels; //导入方法依赖的package包/类
private void toMediaEdit (JournalEntry model, String key) {
Intent toEdit = new Intent(this, JournalEditActivity.class);
Parcelable parcel = Parcels.wrap(model);
toEdit.putExtra ("JRNL_ENTRY", parcel);
toEdit.putExtra ("JRNL_KEY", key);
toEdit.putExtra ("DB_REF", entriesRef.getParent().toString());
startActivity (toEdit);
}
示例5: toMediaEdit
import org.parceler.Parcels; //导入方法依赖的package包/类
private void toMediaEdit (JournalEntry model, String key) {
Intent toEdit = new Intent(this, JournalEditActivity.class);
Parcelable parcel = Parcels.wrap(model);
toEdit.putExtra ("JRNL_ENTRY", parcel);
toEdit.putExtra ("JRNL_KEY", key);
toEdit.putExtra ("DB_REF", entriesRef.getRef().getParent()
.toString());
startActivity (toEdit);
}
示例6: FABPressed
import org.parceler.Parcels; //导入方法依赖的package包/类
@OnClick(R.id.fab)
public void FABPressed() {
Intent result = new Intent();
currentTrip.setName(jname.getText().toString());
DateTimeFormatter fmt = ISODateTimeFormat.dateTime();
currentTrip.setStartDate(fmt.print(startDate));
currentTrip.setEndDate(fmt.print(endDate));
if (coverPhotoUrl != null)
currentTrip.setCoverPhotoUrl(coverPhotoUrl);
// add more code to initialize the rest of the fields
Parcelable parcel = Parcels.wrap(currentTrip);
result.putExtra("TRIP", parcel);
setResult(RESULT_OK, result);
finish();
}
示例7: toMediaView
import org.parceler.Parcels; //导入方法依赖的package包/类
private void toMediaView (JournalEntry model) {
Intent toView = new Intent(this, MediaViewActivity.class);
Parcelable parcel = Parcels.wrap(model);
toView.putExtra ("JRNL_ENTRY", parcel);
startActivity (toView);
}