How to set Ripple effect on a LinearLayout programmatically?

You can use this way. if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) { // If we’re running on Honeycomb or newer, then we can use the Theme’s // selectableItemBackground to ensure that the View has a pressed state TypedValue outValue = new TypedValue(); this.getTheme().resolveAttribute(android.R.attr.selectableItemBackground, outValue, true); textView.setBackgroundResource(outValue.resourceId); }

android span click event

Latest code ,pls see link form github message.setSpan(span, start, end, flags); You need remove origin span before set new span. Please see below The onClick() of ClickableSpan is not working for URLSpan? EDIT You can capture any span click event by extends LinkMovementMethod import android.os.Handler; import android.os.Message; import android.text.Layout; import android.text.Selection; import android.text.Spannable; import android.text.method.LinkMovementMethod; … Read more

Clickable URL in a Winform Message Box?

One option is display the url in the message box, along with a message and provide the help button that takes you to that url: MessageBox.Show( “test message”, “caption”, MessageBoxButtons.YesNo, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1, 0, ‘0 is default otherwise use MessageBoxOptions Enum “http://google.com”, “keyword”) Important to note this code cannot be in the load event of the … Read more

Android – How to create clickable listview?

In fact it is quite easy: This is your Activity with the ListView, it implements an OnItemClickListener: public class MainActivity extends Activity implements OnItemClickListener { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_NO_TITLE); setContentView(R.layout.activity_main); //* *EDIT* * ListView listview = (ListView) findViewById(R.id.listView1); listview.setOnItemClickListener(this); } public void onItemClick(AdapterView<?> l, View v, int position, long id) { … Read more

UILabel and NSLinkAttributeName: Link is not clickable

I can answer my own question now: I am using UITextView instead of UILabel now. I have formatted the UITextView to look and behave like my labels and added: UITextView *textView = [[UITextView alloc] init]; textView.scrollEnabled = NO; textView.editable = NO; textView.textContainer.lineFragmentPadding = 0; textView.textContainerInset = UIEdgeInsetsMake(0, 0, 0, 0); textView.delegate = self; Don’t forget … Read more