protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.word); et =(EditText)findViewById(R.id.et); btnz =(Button)findViewById(R.id.btnz); btncopy =(Button)findViewById(R.id.btnc); tv =(TextView)findViewById(R.id.textView8); btnz.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { String name =et.getText().toString(); Typeface myfont=Typeface.createFromAsset(getAssets(), "ComialUnicoder.ttf"); tv.setText(name); tv.setTypeface(myfont); } }); btncopy.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { ClipboardManager clipboard = (ClipboardManager) getSystemService(CLIPBOARD_SERVICE); ClipData clip = ClipData.newPlainText("ComialUnicoder.ttf",tv.getText()); clipboard.setPrimaryClip(clip); } }); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)