Advertisement
Guest User

Untitled

a guest
Aug 31st, 2014
276
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.30 KB | None | 0 0
  1. <?xml version="1.0" encoding="utf-8"?>
  2.  
  3. <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  4. xmlns:fontawesometext="http://schemas.android.com/apk/res-auto"
  5. android:orientation="vertical"
  6. android:layout_width="match_parent"
  7. android:layout_height="match_parent">
  8.  
  9. <LinearLayout
  10. android:orientation="horizontal"
  11. android:layout_width="match_parent"
  12. android:layout_height="wrap_content"
  13. android:layout_marginLeft="16dp"
  14. android:layout_marginTop="32dp"
  15. android:layout_marginBottom="16dp"
  16. android:layout_marginRight="16dp">
  17.  
  18. <com.beardedhen.androidbootstrap.FontAwesomeText
  19. android:layout_width="wrap_content"
  20. android:layout_height="wrap_content"
  21. android:layout_marginTop="16dp"
  22. android:layout_marginLeft="16dp"
  23. android:layout_marginRight="4dp"
  24. android:textSize="45sp"
  25. android:textColor="#737373"
  26. android:id="@+id/faIcon"
  27. fontawesometext:fa_icon="fa-question" />
  28.  
  29. <TextView
  30. android:layout_width="wrap_content"
  31. android:layout_height="wrap_content"
  32. android:textAppearance="?android:attr/textAppearanceLarge"
  33. android:text='"texto de ejemplo de pregunta"'
  34. android:id="@+id/tvQuestion"
  35. android:textColor="@color/primary"
  36. android:textStyle="bold"
  37. android:textSize="28sp"
  38. android:typeface="monospace"
  39. android:layout_marginLeft="16dp"
  40. android:layout_marginTop="32dp"
  41. android:layout_marginBottom="16sp" />
  42. </LinearLayout>
  43.  
  44. <FrameLayout
  45. android:layout_width="match_parent"
  46. android:layout_height="match_parent"
  47. android:id="@+id/frameConainter"
  48. android:background="@color/dark_grey" />
  49.  
  50. </LinearLayout>
  51.  
  52. public class YesNoReplyView extends ReplyParentView {
  53.  
  54. private FloatingActionButton buttonYes;
  55. private FloatingActionButton buttonNo;
  56.  
  57. public YesNoReplyView(Context context) {
  58. super(context);
  59. }
  60.  
  61. public YesNoReplyView(Context context, AttributeSet attrs, int defStyleAttr) {
  62. super(context, attrs, defStyleAttr);
  63. }
  64.  
  65. @TargetApi(Build.VERSION_CODES.HONEYCOMB)
  66. public YesNoReplyView(Context context, AttributeSet attrs) {
  67. super(context, attrs);
  68. }
  69.  
  70. @Override
  71. public void initializeComponents() {
  72.  
  73. int[] position = new int[2];
  74. getLocationOnScreen(position);
  75.  
  76. buttonYes = new FloatingActionButton.Builder((Activity)getContext())
  77. .withDrawable(getResources().getDrawable(R.drawable.ic_plus))
  78. .withButtonColor(getResources().getColor(R.color.green_success))
  79. .withGravity(Gravity.BOTTOM | Gravity.RIGHT)
  80. .withMargins(0, 0, 16, 16)
  81. .create();
  82.  
  83. buttonNo = new FloatingActionButton.Builder((Activity)getContext())
  84. .withDrawable(getResources().getDrawable(R.drawable.ic_plus))
  85. .withButtonColor(getResources().getColor(R.color.primary))
  86. .withGravity(Gravity.BOTTOM | Gravity.RIGHT)
  87. .withMargins(0, 0, 26, 26)
  88. .create();
  89.  
  90. }
  91.  
  92.  
  93. @Override
  94. public String getResult() {
  95. String result = "";
  96. return result;
  97. }
  98. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement