Back to project page codemap.
The source code is released under:
GNU General Public License
If you think the Android project codemap 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 com.hdweiss.codemap.view.workspace.fragments; //from w w w. j ava 2s . c om import android.content.Context; import android.util.AttributeSet; import android.widget.EditText; import com.hdweiss.codemap.util.CodeMapPoint; public class CodeMapAnnotation extends CodeMapItem { private EditText editText; public CodeMapAnnotation(Context context, AttributeSet attrs) { this(context, null, ""); } public CodeMapAnnotation(Context context, CodeMapPoint point, String contents) { super(context, null, "Annotation"); this.editText = new EditText(getContext()); this.editText.setMaxWidth(300); setContentView(editText); init(contents); setPosition(point); setupForAnnotation(); } public void init(String contents) { if (contents.isEmpty()) editText.setHint("Click to add note"); else editText.setText(contents); } public String getContents() { return editText.getText().toString(); } }