Skip to content
Snippets Groups Projects
Commit ec4b9017 authored by Jawnnypoo's avatar Jawnnypoo
Browse files

Revert send message back to old style.

parent 6e0e6052
No related branches found
No related tags found
No related merge requests found
Pipeline #
Loading
Loading
@@ -326,13 +326,8 @@ public class IssueActivity extends BaseActivity {
}
 
@Override
public void onGalleryClicked() {
Navigator.navigateToChoosePhoto(IssueActivity.this, REQUEST_IMAGE);
}
@Override
public void onCameraClicked() {
public void onAttachmentClicked() {
Navigator.navigateToAttach(IssueActivity.this);
}
});
 
Loading
Loading
Loading
Loading
@@ -60,7 +60,7 @@ public class IssueDetailsAdapter extends RecyclerView.Adapter<RecyclerView.ViewH
@Override
public void onBindViewHolder(final RecyclerView.ViewHolder holder, int position) {
if (holder instanceof IssueHeaderViewHolder) {
((IssueHeaderViewHolder) holder).bind(mIssue);
((IssueHeaderViewHolder) holder).bind(mIssue, mProject);
} else if (holder instanceof IssueLabelsViewHolder) {
((IssueLabelsViewHolder) holder).bind(mIssue.getLabels());
} else if (holder instanceof NoteViewHolder) {
Loading
Loading
Loading
Loading
@@ -20,6 +20,7 @@ import com.commit451.gitlab.event.MergeRequestChangedEvent;
import com.commit451.gitlab.model.api.MergeRequest;
import com.commit451.gitlab.model.api.Note;
import com.commit451.gitlab.model.api.Project;
import com.commit451.gitlab.navigation.Navigator;
import com.commit451.gitlab.util.PaginationUtil;
import com.commit451.gitlab.view.SendMessageView;
import com.commit451.teleprinter.Teleprinter;
Loading
Loading
@@ -190,13 +191,8 @@ public class MergeRequestDiscussionFragment extends ButterKnifeFragment {
}
 
@Override
public void onGalleryClicked() {
}
@Override
public void onCameraClicked() {
public void onAttachmentClicked() {
Navigator.navigateToAttach(getActivity());
}
});
 
Loading
Loading
Loading
Loading
@@ -230,6 +230,10 @@ public class Navigator {
activity.startActivity(intent);
}
 
public static void navigateToAttach(Activity activity) {
//TODO
}
public static void navigateToChoosePhoto(Activity activity, int requestCode) {
Intent photoPickerIntent = new Intent(Intent.ACTION_PICK);
photoPickerIntent.setType("image/*");
Loading
Loading
Loading
Loading
@@ -31,17 +31,10 @@ public class SendMessageView extends LinearLayout {
}
}
 
@OnClick(R.id.icon_gallery)
void onGalleryClicked() {
@OnClick(R.id.button_attach)
void onAttachClicked() {
if (mCallbacks != null) {
mCallbacks.onGalleryClicked();
}
}
@OnClick(R.id.icon_camera)
void onCameraClicked() {
if (mCallbacks != null) {
mCallbacks.onCameraClicked();
mCallbacks.onAttachmentClicked();
}
}
 
Loading
Loading
@@ -70,7 +63,7 @@ public class SendMessageView extends LinearLayout {
 
private void init() {
inflate(getContext(), R.layout.view_send_message, this);
setOrientation(VERTICAL);
setOrientation(HORIZONTAL);
ButterKnife.bind(this);
setBackgroundColor(Easel.getThemeAttrColor(getContext(), R.attr.colorPrimary));
if (Build.VERSION.SDK_INT >= 21) {
Loading
Loading
@@ -100,7 +93,6 @@ public class SendMessageView extends LinearLayout {
 
public interface Callbacks {
void onSendClicked(String message);
void onGalleryClicked();
void onCameraClicked();
void onAttachmentClicked();
}
}
Loading
Loading
@@ -9,10 +9,13 @@ import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
 
import com.commit451.bypasspicassoimagegetter.BypassPicassoImageGetter;
import com.commit451.gitlab.App;
import com.commit451.gitlab.R;
import com.commit451.gitlab.model.api.Issue;
import com.commit451.gitlab.model.api.Project;
import com.commit451.gitlab.transformation.CircleTransformation;
import com.commit451.gitlab.util.BypassImageGetterFactory;
import com.commit451.gitlab.util.DateUtil;
import com.commit451.gitlab.util.ImageUtil;
 
Loading
Loading
@@ -45,12 +48,17 @@ public class IssueHeaderViewHolder extends RecyclerView.ViewHolder {
mBypass = new Bypass(view.getContext());
}
 
public void bind(Issue issue) {
public void bind(Issue issue, Project project) {
if (TextUtils.isEmpty(issue.getDescription())) {
mDescriptionView.setVisibility(View.GONE);
} else {
mDescriptionView.setVisibility(View.VISIBLE);
mDescriptionView.setText(mBypass.markdownToSpannable(issue.getDescription()));
BypassPicassoImageGetter getter = BypassImageGetterFactory.create(mDescriptionView,
App.instance().getPicasso(),
App.instance().getAccount().getServerUrl().toString(),
project);
mDescriptionView.setText(mBypass.markdownToSpannable(issue.getDescription(), getter));
mDescriptionView.setMovementMethod(LinkMovementMethod.getInstance());
}
 
Loading
Loading
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#FFFFFFFF"
android:pathData="M2,12.5C2,9.46 4.46,7 7.5,7H18c2.21,0 4,1.79 4,4s-1.79,4 -4,4H9.5C8.12,15 7,13.88 7,12.5S8.12,10 9.5,10H17v2H9.41c-0.55,0 -0.55,1 0,1H18c1.1,0 2,-0.9 2,-2s-0.9,-2 -2,-2H7.5C5.57,9 4,10.57 4,12.5S5.57,16 7.5,16H17v2H7.5C4.46,18 2,15.54 2,12.5z"/>
</vector>
Loading
Loading
@@ -6,57 +6,39 @@
android:layout_width="match_parent"
android:layout_height="wrap_content">
 
<ImageView
android:id="@+id/button_attach"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:srcCompat="@drawable/ic_attachment_24dp"
android:layout_gravity="center_vertical"
android:padding="8dp"
android:background="?attr/selectableItemBackgroundBorderless"
android:visibility="gone"
android:contentDescription="@null"/>
<EditText
android:id="@+id/text_note"
android:layout_width="match_parent"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="8dp"
android:layout_marginRight="8dp"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:layout_weight="1"
android:hint="@string/new_note_hint"
android:imeOptions="actionNone"
android:inputType="textCapSentences|textAutoCorrect|textMultiLine"
android:maxLines="4"/>
 
<LinearLayout
android:layout_width="match_parent"
<android.support.design.widget.FloatingActionButton
android:id="@+id/button_send"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal">
<ImageView
android:id="@+id/icon_gallery"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:srcCompat="@drawable/ic_gallery_24dp"
android:layout_gravity="center_vertical"
android:padding="8dp"
android:background="?attr/selectableItemBackgroundBorderless"
android:visibility="gone"
android:contentDescription="@null"/>
<ImageView
android:id="@+id/icon_camera"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:srcCompat="@drawable/ic_camera_24dp"
android:layout_gravity="center_vertical"
android:padding="8dp"
android:background="?attr/selectableItemBackgroundBorderless"
android:visibility="gone"
android:contentDescription="@null"/>
<Space
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"/>
<android.support.design.widget.FloatingActionButton
android:id="@+id/button_send"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
app:srcCompat="@drawable/ic_send_24dp"
app:fabSize="mini"/>
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_gravity="center_vertical"
app:srcCompat="@drawable/ic_send_24dp"
app:fabSize="mini"/>
 
</LinearLayout>
</merge>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment