WaterMark.jpg
代码位于lib_core

1. 使用

  1. public class MainActivity extends AppCompatActivity {
  2. private WaterMarkManager shuiyinUtils;
  3. @Override
  4. protected void onCreate(Bundle savedInstanceState) {
  5. super.onCreate(savedInstanceState);
  6. setContentView(R.layout.activity_main);
  7. }
  8. @Override
  9. protected void onStart() {
  10. super.onStart();
  11. // 如果Activity上加载了Fragment, 会把水印盖住, 所以放在这里加载水印是最合适的
  12. if (shuiyinUtils == null) {
  13. shuiyinUtils = WaterMarkManager.instance();
  14. shuiyinUtils.addWatermark2Activity(this, "员工名+员工号");
  15. }
  16. }
  17. }