Back to project page PolygonImageView.
The source code is released under:
Apache License
If you think the Android project PolygonImageView listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package net.grobas.polygonimageview.sample; /* w ww.j av a 2s .c om*/ import android.graphics.Color; import android.support.v7.app.ActionBarActivity; import android.os.Bundle; import android.view.Menu; import android.view.MenuItem; import android.widget.LinearLayout; import net.grobas.view.PolygonImageView; public class SampleActivity extends ActionBarActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_sample); PolygonImageView kitty = (PolygonImageView) findViewById(R.id.kitty01); LinearLayout layout = (LinearLayout) findViewById(R.id.layout); PolygonImageView view = new PolygonImageView(this); view.setImageResource(R.drawable.cat01); view.addShadow(7.5f, 0f, 7.5f, Color.RED); view.setBorder(true); view.setBorderWidth(5); view.setCornerRadius(5); view.setBorderColorResource(android.R.color.white); view.setVertices(6); layout.addView(view, kitty.getLayoutParams()); } }