本文整理汇总了Java中com.heaven7.core.util.Toaster类的典型用法代码示例。如果您正苦于以下问题:Java Toaster类的具体用法?Java Toaster怎么用?Java Toaster使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Toaster类属于com.heaven7.core.util包,在下文中一共展示了Toaster类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: onInit
import com.heaven7.core.util.Toaster; //导入依赖的package包/类
@Override
protected void onInit(Context context, Bundle savedInstanceState) {
mHelper.init(context);
RootModule rootModule = DataMediatorFactory.createData(RootModule.class);
//bind data.
rootBinder = DataMediatorFactory.bind(this, rootModule);
//mock get data. 翻译: 模拟获取数据
MainWorker.postDelay(3000, new Runnable() {
@Override
public void run() {
//模拟数据获取
final ViewBind data = DataMediatorFactory.createData(ViewBind.class);
rootBinder.getData().setViewBind(data);
//reinflate (重新inflate property chain.)
if(rootBinder.getDataMediator().reinflatePropertyChains()){
Toaster.show(getApplicationContext(), "reflate property chain success.");
}
//attach the inflate callbacks to 'dm_viewBind'. 翻译: 将inflate的callbacks 挂在到 dm_viewBind
dm_viewBind = DataMediatorFactory.createDataMediator(
rootBinder.getDataMediator(), data);
//now all data prepared.
}
});
}
开发者ID:LightSun,项目名称:data-mediator,代码行数:27,代码来源:PendingPropertyChainActivity.java
示例2: onClickWarnToast
import com.heaven7.core.util.Toaster; //导入依赖的package包/类
@OnClick(R.id.bt_toast_warn)
public void onClickWarnToast(final View v){
getToastWindow()
.withEndAction(new Runnable() {
@Override
public void run() {
Toaster.show(v.getContext(), "action end...");
}
})
.withStartAction(new Runnable() {
@Override
public void run() {
Toaster.show(v.getContext(), "action start...");
}
})
.type(AppToastComponent.TYPE_WARN)
.show("your toast BackKeyListenermessage");
}
开发者ID:LightSun,项目名称:android-util2,代码行数:19,代码来源:ToastTestActivity.java
示例3: AndroidController
import com.heaven7.core.util.Toaster; //导入依赖的package包/类
/**
* create an AndroidController .
* @param activity the activity
* @param gravity the gravity of toast. {@linkplain android.view.Gravity#CENTER} and etc.
*/
public AndroidController(AppCompatActivity activity, int gravity) {
super(activity);
this.mToaster = new Toaster(activity, gravity);
this.mViewHelper = new ViewHelper(activity.getWindow().getDecorView());
setParameterMerger(BUNDLE_MERGER);
}
开发者ID:LightSun,项目名称:Mvcs,代码行数:12,代码来源:AndroidController.java
示例4: bindImageUrl
import com.heaven7.core.util.Toaster; //导入依赖的package包/类
@Override
public Binder<T> bindImageUrl(String property, Object imageView, Object imageLoader) {
if(!(imageView instanceof ImageView)){
throw new IllegalArgumentException("the view must be ImageView");
}
if(imageLoader instanceof ImageLoader){
ImageView iv = (ImageView) imageView;
Toaster.show(iv.getContext(), "start using self MyBinder with image loader.");
return bind(property, new ImageUrlBinderCallback<T>(iv, getPropertyInterceptor(),
(ImageLoader)imageLoader));
}
return super.bindImageUrl(property, imageView, imageLoader);
}
开发者ID:LightSun,项目名称:data-mediator,代码行数:14,代码来源:TestSelfBinderActivity.java
示例5: checkPrepaired
import com.heaven7.core.util.Toaster; //导入依赖的package包/类
private boolean checkPrepaired(){
if(dm_viewBind == null){
Toaster.show(getApplicationContext(), "property chain has not inflate. please wait....");
return false;
}
return true;
}
开发者ID:LightSun,项目名称:data-mediator,代码行数:8,代码来源:PendingPropertyChainActivity.java
示例6: onCreate
import com.heaven7.core.util.Toaster; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mIntentExecutor = new IntentExecutor();
mToaster = new Toaster(this);
mViewHelper = new ViewHelper(getWindow().getDecorView());
setContentView(getlayoutId());
ButterKnife.inject(this);
initView();
initData(savedInstanceState);
}
开发者ID:LightSun,项目名称:android-photo-picker,代码行数:14,代码来源:BaseActivity.java
示例7: onCreate
import com.heaven7.core.util.Toaster; //导入依赖的package包/类
@Override
protected final void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mIntentExecutor = new IntentExecutor();
// mHttpExecutor = new VolleyUtil.HttpExecutor();
mToaster = new Toaster(this);
mViewHelper = new ViewHelper(getWindow().getDecorView());
// mSaveStateHelper = new SaveStateHelper(this);
setContentView(getlayoutId());
ButterKnife.inject(this);
initView();
initData(savedInstanceState);
}
开发者ID:LightSun,项目名称:android-common-util-light,代码行数:16,代码来源:BaseActivity.java
示例8: onBindData
import com.heaven7.core.util.Toaster; //导入依赖的package包/类
@Override
public void onBindData(ViewHelper view, Bundle arguments, Bundle saveBundle) {
view.setText(R.id.tv_title, arguments.getString("title"))
.setRootOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Toaster.show(v.getContext(),"onClick");
}
});
}
开发者ID:LightSun,项目名称:android-common-util-light,代码行数:11,代码来源:FragmentComponentTestActivity.java
示例9: onCreate
import com.heaven7.core.util.Toaster; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mIntentExecutor = new IntentExecutor();
mHttpExecutor = new VolleyUtil.HttpExecutor();
mToaster = new Toaster(this);
mViewHelper = new ViewHelper(getWindow().getDecorView());
onPreSetContentView();
setContentView(getlayoutId());
ButterKnife.inject(this);
initView();
initData(savedInstanceState);
}
开发者ID:LightSun,项目名称:Adapter-CountDownTimer,代码行数:16,代码来源:BaseActivity.java
示例10: onViewCreated
import com.heaven7.core.util.Toaster; //导入依赖的package包/类
@Override
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
ButterKnife.inject(this, view);
mToaster = new Toaster(view.getContext());
init(view.getContext(), savedInstanceState);
}
开发者ID:LightSun,项目名称:Android-sticky-navigation-layout,代码行数:8,代码来源:BaseFragment.java
示例11: onCreate
import com.heaven7.core.util.Toaster; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_scrolling);
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
fab.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
testWrite();
/* Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG)
.setAction("Action", null).show();*/
}
});
mLogClient = new LogClient(this);
mPermissionHelper = new PermissionHelper(this);
mPermissionHelper.startRequestPermission(new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE},
new int[]{1}, new PermissionHelper.ICallback() {
@Override
public void onRequestPermissionResult(String requestPermission, int requestCode, boolean success) {
Logger.i(TAG, "mPermissionHelper_onRequestPermissionResult", "success = " + success);
if(!success){
Toaster.show(getApplication(),"request permission(WRITE_EXTERNAL_STORAGE) failed.");
}else{
test();
}
}
});
}
开发者ID:LightSun,项目名称:android-fully-log,代码行数:33,代码来源:ScrollingActivity.java
示例12: onViewCreated
import com.heaven7.core.util.Toaster; //导入依赖的package包/类
@Override
public void onViewCreated(View view, Bundle savedInstanceState) {
Context ctx = view.getContext();
mToaster = new Toaster(ctx);
mViewHelper = new ViewHelper(view);
// mHttpExecutor = new VolleyUtil.HttpExecutor();
initView(ctx);
initData(ctx, savedInstanceState);
}
开发者ID:medlinker,项目名称:source-path-track,代码行数:10,代码来源:BaseFragment.java
示例13: onCreate
import com.heaven7.core.util.Toaster; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mIntentExecutor = new IntentExecutor();
// mHttpExecutor = new VolleyUtil.HttpExecutor();
mToaster = new Toaster(this);
mViewHelper = new ViewHelper(getWindow().getDecorView());
// mSaveStateHelper = new SaveStateHelper(this);
setContentView(getlayoutId());
ButterKnife.inject(this);
initView();
initData(savedInstanceState);
}
开发者ID:medlinker,项目名称:source-path-track,代码行数:16,代码来源:BaseActivity.java
示例14: onReceive
import com.heaven7.core.util.Toaster; //导入依赖的package包/类
@Override
public void onReceive(Context context, Intent intent) {
if(intent ==null) return;
/**
*
1, 只要app的没有一个进程存活(正在运行的进程和缓存进程都不存在),都将启动不了service(通过系统receiver)
2,强制停止后也 启动不了service(通过系统receiver)
3,只要该app有进程存活,就可以.
*/
Toaster.show(context, "NetstateChangeReceiver");
Logger.i("NetstateChangeReceiver", "action = " + intent.getAction());
context.startService(new Intent(context, SimpleService.class));
}
开发者ID:LightSun,项目名称:android-drag-FlowLayout,代码行数:14,代码来源:NetstateChangeReceiver.java
示例15: getToaster
import com.heaven7.core.util.Toaster; //导入依赖的package包/类
@Override
public final Toaster getToaster() {
return getController().getToaster();
}
开发者ID:LightSun,项目名称:Mvcs,代码行数:5,代码来源:MvcsBaseActivity.java
示例16: getToaster
import com.heaven7.core.util.Toaster; //导入依赖的package包/类
@Override
public final Toaster getToaster() {
return mToaster;
}
开发者ID:LightSun,项目名称:Mvcs,代码行数:5,代码来源:AndroidController.java
示例17: getToaster
import com.heaven7.core.util.Toaster; //导入依赖的package包/类
protected Toaster getToaster(){
return mToaster;
}
开发者ID:LightSun,项目名称:android-photo-picker,代码行数:4,代码来源:BaseActivity.java
示例18: getToaster
import com.heaven7.core.util.Toaster; //导入依赖的package包/类
public Toaster getToaster() {
return mToaster;
}
开发者ID:LightSun,项目名称:Android-sticky-navigation-layout,代码行数:4,代码来源:BaseFragment.java
示例19: onCreate
import com.heaven7.core.util.Toaster; //导入依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
Logger.i("SimpleService", "onCreate");
Toaster.show(this, "NetstateChangeReceiver_onCreate");
}
开发者ID:LightSun,项目名称:android-drag-FlowLayout,代码行数:7,代码来源:SimpleService.java
示例20: getToaster
import com.heaven7.core.util.Toaster; //导入依赖的package包/类
/**
* get the toaster.
* @return the {@link Toaster}
*/
Toaster getToaster();
开发者ID:LightSun,项目名称:Mvcs,代码行数:6,代码来源:AppComponentContext.java
注:本文中的com.heaven7.core.util.Toaster类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论