My real questions is: is there anyway of putting "layout" above "layout 1" in the "flanel" LinearLayout?
Using java Syntax Highlighting
- private View makeUserStatusView(Context context, TwitterEntry entry) {
- ImageView iv = new ImageView(context);
- Bitmap photo = BitmapCache.getInstance().get(entry.getUser().getProfileImageURL());
- iv.setImageBitmap(photo);
- iv.setScaleType(ScaleType.CENTER);
- iv.setPadding(0, 4, 4, 0);
- iv.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));
- Button click = new Button(context);
- click.setBackgroundResource(R.drawable.button);
- TextView name = new TextView(context);
- name.setTextSize(10);
- name.setTextColor(Color.BLACK);
- name.setText(entry.getUser().getName());
- name.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));
- TextView tv = new TextView(context);
- tv.setTextSize(10);
- tv.setTextColor(Color.BLACK);
- tv.setText(entry.getCreatedAt() + "\n" + entry.getText());
- tv.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));
- LinearLayout layout1 = new LinearLayout(context);
- layout1.setOrientation(LinearLayout.HORIZONTAL);
- layout1.addView(name);
- LinearLayout layout = new LinearLayout(context);
- layout.setOrientation(LinearLayout.HORIZONTAL);
- layout.addView(iv);
- layout.addView(tv);
- LinearLayout flanel = new LinearLayout(context);
- flanel.setOrientation(LinearLayout.HORIZONTAL);
- flanel.setPadding(4, 2, 4, 2);
- flanel.addView(layout1);
- flanel.addView(layout);
- return flanel;
- }
- }
Parsed in 0.015 seconds, using GeSHi 1.0.8.4