Transparent control over PictureBox

The Label control supports transparency well. It is just that the designer won’t let you place the label correctly. The PictureBox control is not a container control so the Form becomes the parent of the label. So you see the form’s background. It is easy to fix by adding a bit of code to the … Read more

How to fill background image of an UIView

You need to process the image beforehand, to make a centered and stretched image. Try this: UIGraphicsBeginImageContext(self.view.frame.size); [[UIImage imageNamed:@”image.png”] drawInRect:self.view.bounds]; UIImage *image = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext(); self.view.backgroundColor = [UIColor colorWithPatternImage:image];

how to add background image to activity?

use the android:background attribute in your xml. Easiest way if you want to apply it to a whole activity is to put it in the root of your layout. So if you have a RelativeLayout as the start of your xml, put it in here: <?xml version=”1.0″ encoding=”utf-8″?> <RelativeLayout xmlns:android=”http://schemas.android.com/apk/res/android” android:id=”@+id/rootRL” android:orientation=”vertical” android:layout_width=”fill_parent” android:layout_height=”fill_parent” android:background=”@drawable/background”> … Read more

Changing background color of selected item in recyclerview

Finally, I got the answer. public void onBindViewHolder(final ViewHolder holder, final int position) { holder.tv1.setText(android_versionnames[position]); holder.row_linearlayout.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { row_index=position; notifyDataSetChanged(); } }); if(row_index==position){ holder.row_linearlayout.setBackgroundColor(Color.parseColor(“#567845”)); holder.tv1.setTextColor(Color.parseColor(“#ffffff”)); } else { holder.row_linearlayout.setBackgroundColor(Color.parseColor(“#ffffff”)); holder.tv1.setTextColor(Color.parseColor(“#000000”)); } } here ‘row_index’ is set as ‘-1’ initially public class ViewHolder extends RecyclerView.ViewHolder { private TextView tv1; LinearLayout … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)