本文整理汇总了Java中android.support.design.widget.BottomSheetDialogFragment类的典型用法代码示例。如果您正苦于以下问题:Java BottomSheetDialogFragment类的具体用法?Java BottomSheetDialogFragment怎么用?Java BottomSheetDialogFragment使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
BottomSheetDialogFragment类属于android.support.design.widget包,在下文中一共展示了BottomSheetDialogFragment类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: add
import android.support.design.widget.BottomSheetDialogFragment; //导入依赖的package包/类
public void add(int pos) {
final MainFragment ma = (MainFragment) ((TabFragment) mainActivity.getSupportFragmentManager().findFragmentById(R.id.content_frame)).getCurrentTabFragment();
final String path = ma.getCurrentPath();
switch (pos) {
case NEW_FOLDER:
mkdir(ma.openMode, path, ma);
break;
case NEW_FILE:
mkfile(ma.openMode, path, ma);
break;
case NEW_CLOUD:
BottomSheetDialogFragment fragment = new CloudSheetFragment();
fragment.show(ma.getActivity().getSupportFragmentManager(),
CloudSheetFragment.TAG_FRAGMENT);
break;
}
}
示例2: showBottomSheetDialogFragment
import android.support.design.widget.BottomSheetDialogFragment; //导入依赖的package包/类
public void showBottomSheetDialogFragment(BottomSheetDialogFragment sheetDialogFragment, String tag ) {
if( sheetDialogFragment == null ) return;
if( this.fragmentSheet != null && this.fragmentSheet.isVisible() )
this.fragmentSheet.dismiss();
sheetDialogFragment.show( getSupportFragmentManager(), tag );
this.fragmentSheet = sheetDialogFragment;
}
示例3: onClick
import android.support.design.widget.BottomSheetDialogFragment; //导入依赖的package包/类
@Override
public void onClick(View v) {
if (v.getId() == R.id.btn_behavior) {
if (mBottomSheetBehavior.getState() == BottomSheetBehavior.STATE_COLLAPSED) {
mBottomSheetBehavior.setState(BottomSheetBehavior.STATE_EXPANDED);
} else {
mBottomSheetBehavior.setState(BottomSheetBehavior.STATE_COLLAPSED);
}
} else {
BottomSheetDialogFragment fragment = new MyBottomSheetDialogFragment();
fragment.show(getSupportFragmentManager(), "MyBottomSheetDialogFragment");
}
}
示例4: onClick
import android.support.design.widget.BottomSheetDialogFragment; //导入依赖的package包/类
@Override
public void onClick(View v) {
if (v.getId() == R.id.btn_behavior) {
// TODO:レッスンではここにプログラムを追加
} else {
BottomSheetDialogFragment fragment = new MyBottomSheetDialogFragment();
fragment.show(getSupportFragmentManager(), "MyBottomSheetDialogFragment");
}
}
示例5: showRequestDetail
import android.support.design.widget.BottomSheetDialogFragment; //导入依赖的package包/类
@Override
public void showRequestDetail(int position, Meal meal) {
Bundle bundle = new Bundle();
bundle.putParcelable(MealDetailFragment.TAG_MEAL, meal);
BottomSheetDialogFragment bottomSheetDialogFragment = new MealDetailFragment();
bottomSheetDialogFragment.setArguments(bundle);
bottomSheetDialogFragment.show(getActivity().getSupportFragmentManager(), bottomSheetDialogFragment.getTag());
}
示例6: showBottomSheet
import android.support.design.widget.BottomSheetDialogFragment; //导入依赖的package包/类
@OnClick({R.id.hm_route, R.id.hm_sug3})
public void showBottomSheet() {
BottomSheetDialogFragment bottomSheetDialogFragment;
if (currentObject != null) {
bottomSheetDialogFragment = TransportFragment.newInstance(currentObject.getRouteNo(), -1);
} else {
bottomSheetDialogFragment = TransportFragment.newInstance(-1, -1);
}
bottomSheetDialogFragment.show(getSupportFragmentManager(), bottomSheetDialogFragment.getTag());
}
示例7: showBottomSheet
import android.support.design.widget.BottomSheetDialogFragment; //导入依赖的package包/类
@OnClick(R.id.tp_show_all)
public void showBottomSheet() {
BottomSheetDialogFragment bottomSheetDialogFragment;
if (currentDetails != null) {
bottomSheetDialogFragment = TransportFragment.newInstance(currentDetails.getRouteID(), currentDetails.getReturnIndex());
} else {
bottomSheetDialogFragment = TransportFragment.newInstance(-1, -1);
}
bottomSheetDialogFragment.show(getSupportFragmentManager(), bottomSheetDialogFragment.getTag());
}
示例8: onCreate
import android.support.design.widget.BottomSheetDialogFragment; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
final BottomSheetDialogFragment myBottomSheet = MyBottomSheetDialogFragment.newInstance("Modal Bottom Sheet");
Button button = (Button) findViewById(R.id.button);
button.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
myBottomSheet.show(getSupportFragmentManager(), myBottomSheet.getTag());
}
});
}
示例9: onCreate
import android.support.design.widget.BottomSheetDialogFragment; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_bottom_sheet_dialog_fragment);
Button button = (Button)findViewById(R.id.button);
button.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
BottomSheetDialogFragment dialog = new MyBottomSheetDialogFragment();
dialog.show(getSupportFragmentManager(), dialog.getTag());
}
});
}
开发者ID:krossovochkin,项目名称:AndroidDesignSupportLibrarySample,代码行数:15,代码来源:BottomSheetDialogFragmentActivity.java
示例10: onCreate
import android.support.design.widget.BottomSheetDialogFragment; //导入依赖的package包/类
@Override
public void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setStyle(BottomSheetDialogFragment.STYLE_NO_FRAME, R.style.Theme_Design_BottomSheetDialog);
}
示例11: openBottomSheet
import android.support.design.widget.BottomSheetDialogFragment; //导入依赖的package包/类
private void openBottomSheet() {
BottomSheetDialogFragment bottomSheetDialogFragment = new CustomBottomSheetDialogFragment();
bottomSheetDialogFragment.show(getActivity().getSupportFragmentManager(), bottomSheetDialogFragment.getTag());
}
示例12: openBottomSheet
import android.support.design.widget.BottomSheetDialogFragment; //导入依赖的package包/类
private void openBottomSheet(Messages message) {
BottomSheetDialogFragment bottomSheetDialogFragment = BottomSheetTopicInfoDialogFragment.newInstance(message);
bottomSheetDialogFragment.show(context.getSupportFragmentManager(), bottomSheetDialogFragment.getTag());
}
示例13: openDetailSheet
import android.support.design.widget.BottomSheetDialogFragment; //导入依赖的package包/类
private void openDetailSheet() {
BottomSheetDialogFragment bottomSheetDialogFragment = new ExploreDetailFragment();
bottomSheetDialogFragment.show(getActivity().getSupportFragmentManager(), bottomSheetDialogFragment.getTag());
}
示例14: openConfirmationSheet
import android.support.design.widget.BottomSheetDialogFragment; //导入依赖的package包/类
private void openConfirmationSheet(){
BottomSheetDialogFragment bottomSheetDialogFragment = new FreeMealConfirmationFragment();
bottomSheetDialogFragment.show(getActivity().getSupportFragmentManager(), bottomSheetDialogFragment.getTag());
}
示例15: showBottomSheet
import android.support.design.widget.BottomSheetDialogFragment; //导入依赖的package包/类
public void showBottomSheet(ContactModel model) {
BottomSheetDialogFragment bottomSheetDialogFragment = ContactFragment.newInstance(model);
bottomSheetDialogFragment.show(getSupportFragmentManager(), bottomSheetDialogFragment.getTag());
}