1. 使用
public class MainActivity extends AppCompatActivity {
private WaterMarkManager shuiyinUtils;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
@Override
protected void onStart() {
super.onStart();
// 如果Activity上加载了Fragment, 会把水印盖住, 所以放在这里加载水印是最合适的
if (shuiyinUtils == null) {
shuiyinUtils = WaterMarkManager.instance();
shuiyinUtils.addWatermark2Activity(this, "员工名+员工号");
}
}
}