mirror of https://github.com/ThmmyNoLife/mTHMMY
committed by
GitHub
10 changed files with 489 additions and 27 deletions
@ -0,0 +1,49 @@ |
|||||
|
package gr.thmmy.mthmmy.activities.topic; |
||||
|
|
||||
|
public class EditTaskDTO { |
||||
|
private int position; |
||||
|
private final String url, subject, message, numReplies, seqnum, sc, topic; |
||||
|
|
||||
|
public EditTaskDTO(int position, String url, String subject, String message, String numReplies, String seqnum, String sc, String topic) { |
||||
|
this.position = position; |
||||
|
this.url = url; |
||||
|
this.subject = subject; |
||||
|
this.message = message; |
||||
|
this.numReplies = numReplies; |
||||
|
this.seqnum = seqnum; |
||||
|
this.sc = sc; |
||||
|
this.topic = topic; |
||||
|
} |
||||
|
|
||||
|
public int getPosition() { |
||||
|
return position; |
||||
|
} |
||||
|
|
||||
|
public String getUrl() { |
||||
|
return url; |
||||
|
} |
||||
|
|
||||
|
public String getSubject() { |
||||
|
return subject; |
||||
|
} |
||||
|
|
||||
|
public String getMessage() { |
||||
|
return message; |
||||
|
} |
||||
|
|
||||
|
public String getNumReplies() { |
||||
|
return numReplies; |
||||
|
} |
||||
|
|
||||
|
public String getSeqnum() { |
||||
|
return seqnum; |
||||
|
} |
||||
|
|
||||
|
public String getSc() { |
||||
|
return sc; |
||||
|
} |
||||
|
|
||||
|
public String getTopic() { |
||||
|
return topic; |
||||
|
} |
||||
|
} |
@ -0,0 +1,5 @@ |
|||||
|
<vector android:height="24dp" android:tint="#FFFFFF" |
||||
|
android:viewportHeight="24.0" android:viewportWidth="24.0" |
||||
|
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android"> |
||||
|
<path android:fillColor="#FF000000" android:pathData="M3,17.25V21h3.75L17.81,9.94l-3.75,-3.75L3,17.25zM20.71,7.04c0.39,-0.39 0.39,-1.02 0,-1.41l-2.34,-2.34c-0.39,-0.39 -1.02,-0.39 -1.41,0l-1.83,1.83 3.75,3.75 1.83,-1.83z"/> |
||||
|
</vector> |
@ -0,0 +1,117 @@ |
|||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||
|
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" |
||||
|
xmlns:tools="http://schemas.android.com/tools" |
||||
|
android:layout_width="match_parent" |
||||
|
android:layout_height="wrap_content" |
||||
|
android:layout_marginBottom="5dp" |
||||
|
android:paddingEnd="4dp" |
||||
|
android:paddingStart="4dp"> |
||||
|
|
||||
|
<android.support.v7.widget.CardView xmlns:card_view="http://schemas.android.com/apk/res-auto" |
||||
|
android:id="@+id/card_view" |
||||
|
android:layout_width="match_parent" |
||||
|
android:layout_height="match_parent" |
||||
|
android:layout_gravity="center" |
||||
|
android:foreground="?android:attr/selectableItemBackground" |
||||
|
card_view:cardBackgroundColor="@color/card_background" |
||||
|
card_view:cardCornerRadius="5dp" |
||||
|
card_view:cardElevation="2dp" |
||||
|
card_view:cardPreventCornerOverlap="false" |
||||
|
card_view:cardUseCompatPadding="true"> |
||||
|
|
||||
|
<LinearLayout |
||||
|
android:layout_width="match_parent" |
||||
|
android:layout_height="wrap_content" |
||||
|
android:orientation="vertical"> |
||||
|
|
||||
|
<RelativeLayout |
||||
|
android:id="@+id/header" |
||||
|
android:layout_width="wrap_content" |
||||
|
android:layout_height="0dp" |
||||
|
android:layout_weight="1" |
||||
|
android:clickable="true" |
||||
|
android:focusable="true" |
||||
|
android:paddingLeft="16dp" |
||||
|
android:paddingRight="16dp" |
||||
|
android:paddingTop="16dp"> |
||||
|
|
||||
|
<FrameLayout |
||||
|
android:id="@+id/thumbnail_holder" |
||||
|
android:layout_width="wrap_content" |
||||
|
android:layout_height="wrap_content" |
||||
|
android:layout_alignParentTop="true" |
||||
|
android:layout_centerVertical="true" |
||||
|
android:layout_marginEnd="16dp"> |
||||
|
|
||||
|
<ImageView |
||||
|
android:id="@+id/thumbnail" |
||||
|
android:layout_width="wrap_content" |
||||
|
android:layout_height="wrap_content" |
||||
|
android:layout_gravity="center" |
||||
|
android:adjustViewBounds="true" |
||||
|
android:contentDescription="@string/post_thumbnail" |
||||
|
android:maxHeight="@dimen/thumbnail_size" |
||||
|
android:maxWidth="@dimen/thumbnail_size" |
||||
|
android:src="@drawable/ic_default_user_thumbnail" /> |
||||
|
</FrameLayout> |
||||
|
|
||||
|
<TextView |
||||
|
android:id="@+id/username" |
||||
|
android:layout_width="wrap_content" |
||||
|
android:layout_height="wrap_content" |
||||
|
android:layout_alignParentTop="true" |
||||
|
android:layout_toEndOf="@+id/thumbnail_holder" |
||||
|
android:ellipsize="end" |
||||
|
android:maxLines="1" |
||||
|
android:text="@string/post_author" |
||||
|
android:textColor="@color/primary_text" |
||||
|
android:textStyle="bold" /> |
||||
|
|
||||
|
<EditText |
||||
|
android:id="@+id/edit_message_subject" |
||||
|
android:layout_width="match_parent" |
||||
|
android:layout_height="wrap_content" |
||||
|
android:layout_below="@+id/username" |
||||
|
android:layout_toEndOf="@+id/thumbnail_holder" |
||||
|
android:hint="@string/subject" |
||||
|
android:inputType="textMultiLine" |
||||
|
android:maxLength="80" |
||||
|
android:textSize="10sp" |
||||
|
tools:ignore="SmallSp" /> |
||||
|
</RelativeLayout> |
||||
|
|
||||
|
<LinearLayout |
||||
|
android:layout_width="match_parent" |
||||
|
android:layout_height="wrap_content" |
||||
|
android:orientation="horizontal" |
||||
|
android:paddingLeft="16dp" |
||||
|
android:paddingRight="16dp"> |
||||
|
|
||||
|
<android.support.design.widget.TextInputLayout |
||||
|
android:layout_width="0dp" |
||||
|
android:layout_height="wrap_content" |
||||
|
android:layout_weight="1" |
||||
|
android:orientation="vertical"> |
||||
|
|
||||
|
<EditText |
||||
|
android:id="@+id/edit_message_text" |
||||
|
android:layout_width="match_parent" |
||||
|
android:layout_height="wrap_content" |
||||
|
android:hint="@string/post_message" |
||||
|
android:inputType="textMultiLine" /> |
||||
|
</android.support.design.widget.TextInputLayout> |
||||
|
|
||||
|
<android.support.v7.widget.AppCompatImageButton |
||||
|
android:id="@+id/edit_message_submit" |
||||
|
android:layout_width="wrap_content" |
||||
|
android:layout_height="wrap_content" |
||||
|
android:layout_gravity="bottom" |
||||
|
android:layout_marginBottom="5dp" |
||||
|
android:layout_marginEnd="5dp" |
||||
|
android:background="@color/card_background" |
||||
|
android:contentDescription="@string/submit" |
||||
|
android:src="@drawable/ic_send" /> |
||||
|
</LinearLayout> |
||||
|
</LinearLayout> |
||||
|
</android.support.v7.widget.CardView> |
||||
|
</FrameLayout> |
Loading…
Reference in new issue