SimplePopupTable.java 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. package de.tudarmstadt.informatik.hostage.ui2.popup;
  2. import android.content.Context;
  3. import android.view.View;
  4. import android.widget.LinearLayout;
  5. import android.widget.TextView;
  6. import de.tudarmstadt.informatik.hostage.R;
  7. /**
  8. * Created by Julien on 13.02.14.
  9. */
  10. public class SimplePopupTable extends AbstractPopup {
  11. private String title;
  12. public void setTitle(String title){
  13. this.title = title;
  14. if (this.getPopupView() != null) this.configureView(this.getPopupView());
  15. }
  16. public String getTitle(){
  17. return this.title;
  18. }
  19. public SimplePopupTable(Context context, OnPopupItemClickListener listener){
  20. super(context, listener);
  21. }
  22. @Override
  23. public LinearLayout getScrollableItemLayout() {
  24. return (LinearLayout) this.getRootView().findViewById(R.id.item_scroll_layout);
  25. }
  26. public int getLayoutId(){
  27. return R.layout.simple_popup_table;
  28. }
  29. void configureView(View view){
  30. TextView titleView = (TextView) view.findViewById(R.id.title_text_view);
  31. titleView.setText(this.title);
  32. }
  33. }