Hi plusminus,
i was trying to set background color for list view. i set like dis.bt nothing is coming
.can u tell me how to set color and what value i have to give in place of int color.i attached the code below.
.
private class SpeechView extends LinearLayout {
private Button mButton;
public SpeechView(Context context, String title, String dialogue, boolean expanded) {
super(context);
LinearLayout l1 = new LinearLayout(context);
LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(
LinearLayout.LayoutParams.FILL_PARENT,
LinearLayout.LayoutParams.FILL_PARENT);
l1.setLayoutParams(lp);
l1.setBackgroundColor(????); // what value i have to set here
//color.setBackgroundColor(32);
this.setOrientation(VERTICAL);
mTitle = new TextView(context);
mTitle.setText(title);
addView(mTitle, new LinearLayout.LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT));
mDialogue = new TextView(context);
mDialogue.setText(dialogue);
addView(mDialogue, new LinearLayout.LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT));
mDialogue.setVisibility(expanded ? VISIBLE : GONE);
mButton=new Button(context);
mButton.setText("chat");
addView(mButton, new LinearLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));
mButton.setVisibility(expanded ? VISIBLE : GONE);
mButton.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
Intent mI = new Intent(Matching_Profile.this,Chat.class);
startActivity(mI);
}
});
}


