本文整理汇总了Java中com.simplify.ink.InkView类的典型用法代码示例。如果您正苦于以下问题:Java InkView类的具体用法?Java InkView怎么用?Java InkView使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
InkView类属于com.simplify.ink包,在下文中一共展示了InkView类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onCreate
import com.simplify.ink.InkView; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_sketch);
findViewById(R.id.btn_cancel).setOnClickListener(this);
findViewById(R.id.btn_delete).setOnClickListener(this);
findViewById(R.id.btn_save).setOnClickListener(this);
etName = (EditText) findViewById(R.id.etName);
drawView = (InkView) findViewById(R.id.draw_view);
btnColorSelector = (Button) findViewById(R.id.btn_color_selector);
spinner = (Spinner) findViewById(R.id.spinner_category);
btnColorSelector.setOnClickListener(this);
drawView.setColor(Color.BLACK);
drawView.setMinStrokeWidth(1.5f);
drawView.setMaxStrokeWidth(6f);
loadActivity(true);
}
示例2: onCreate
import com.simplify.ink.InkView; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
FontAwesome.apply();
setContentView(R.layout.activity_signature);
Bundle bundle = getIntent().getExtras();
if (bundle != null) {
filename = "sign." + bundle.getString(REQUEST_ID);
}
if (filename.equals("")){
filename = "sign." + System.currentTimeMillis() + "";
}
title = (TextView) findViewById(R.id.title);
title.setText("File: " + filename);
inkView = (InkView) findViewById(R.id.ink);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
inkView.setColor(getResources().getColor(R.color.ink, null));
} else {
inkView.setColor(getResources().getColor(R.color.ink));
}
inkView.setMinStrokeWidth(1.5f);
inkView.setMaxStrokeWidth(3f);
delete = (TextView) findViewById(R.id.delete);
delete.setOnClickListener(this);
done = (TextView) findViewById(R.id.done);
done.setOnClickListener(this);
}
示例3: onCreate
import com.simplify.ink.InkView; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
toolbar = (Toolbar) findViewById(R.id.toolbar);
inkView = (InkView) findViewById(R.id.ink);
initToolbar();
}