.
This commit is contained in:
Binary file not shown.
@@ -7,6 +7,8 @@ import com.p3.bewoplaner.page.chat.ChatComponent;
|
||||
import com.p3.bewoplaner.page.chat.DaggerChatComponent;
|
||||
import com.p3.bewoplaner.page.contacts.ContactsComponent;
|
||||
import com.p3.bewoplaner.page.contacts.DaggerContactsComponent;
|
||||
import com.p3.bewoplaner.page.fileconfirmation.DaggerFileConfirmationComponent;
|
||||
import com.p3.bewoplaner.page.fileconfirmation.FileConfirmationComponent;
|
||||
import com.p3.bewoplaner.page.login.DaggerLoginComponent;
|
||||
import com.p3.bewoplaner.page.login.LoginComponent;
|
||||
import com.p3.bewoplaner.page.main.DaggerMainComponent;
|
||||
@@ -30,6 +32,7 @@ public class InjectionHelper {
|
||||
private static MessagingComponent sMessagingComponent;
|
||||
private static ChatComponent sChatComponent;
|
||||
private static ProfileComponent sProfileComponent;
|
||||
private static FileConfirmationComponent sFileConfirmationComponent;
|
||||
|
||||
public static ApplicationComponent getApplicationComponent(Context context) {
|
||||
return ((BewoplanerApplication) context.getApplicationContext()).getApplicationComponent();
|
||||
@@ -105,6 +108,16 @@ public class InjectionHelper {
|
||||
return sChatComponent;
|
||||
}
|
||||
|
||||
public static FileConfirmationComponent getFileConfirmationComponent(Context context) {
|
||||
if(sFileConfirmationComponent == null) {
|
||||
sFileConfirmationComponent = DaggerFileConfirmationComponent.builder()
|
||||
.applicationComponent(getApplicationComponent(context))
|
||||
.build();
|
||||
}
|
||||
|
||||
return sFileConfirmationComponent;
|
||||
}
|
||||
|
||||
public static void destroySplashComponent() {
|
||||
sSplashComponent = null;
|
||||
}
|
||||
|
||||
@@ -320,7 +320,7 @@ abstract class BaseChatActivity extends RuntimePermissionActivity implements Cha
|
||||
|
||||
// TODO: Show preview for images/gifs and maybe videos
|
||||
|
||||
//mCallback.sendFile(uri);
|
||||
mCallback.sendFile(uri);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -57,8 +57,7 @@ public class ChatMembersActivity extends AppCompatActivity {
|
||||
Group group = getIntent().getParcelableExtra(GROUP_ARG);
|
||||
setToolbar(group);
|
||||
|
||||
mHorizontalDividerItemDecoration = new HorizontalDividerItemDecoration.Builder(this)
|
||||
.colorResId(R.color.colorFill).build();
|
||||
mHorizontalDividerItemDecoration = new HorizontalDividerItemDecoration.Builder(this).colorResId(R.color.colorFill).build();
|
||||
mChatMembersRecyclerView.addItemDecoration(mHorizontalDividerItemDecoration);
|
||||
mChatMembersRecyclerView.setLayoutManager(new LinearLayoutManager(this));
|
||||
|
||||
@@ -70,11 +69,9 @@ public class ChatMembersActivity extends AppCompatActivity {
|
||||
mGroupTitleTextView.setVisibility(View.VISIBLE);
|
||||
mGroupMembersTextView.setVisibility(View.GONE);
|
||||
mExtraImageView.setVisibility(View.GONE);
|
||||
mChatImageView.setImageResource(group.isHelpGroup() ? R.drawable.avatar_help_group
|
||||
: R.drawable.avatar_team_group);
|
||||
mChatImageView.setImageResource(group.isHelpGroup() ? R.drawable.avatar_help_group : R.drawable.avatar_team_group);
|
||||
mGroupTitleTextView.setText(group.name);
|
||||
mGroupTitleTextView.setTextColor(ContextCompat.getColor(this,
|
||||
group.isHelpGroup() ? R.color.colorHelpGroup : R.color.colorTeamGroup));
|
||||
mGroupTitleTextView.setTextColor(ContextCompat.getColor(this, group.isHelpGroup() ? R.color.colorHelpGroup : R.color.colorTeamGroup));
|
||||
}
|
||||
|
||||
@OnClick(R.id.chat_toolbar_back_arrow)
|
||||
|
||||
@@ -4,14 +4,32 @@ import android.support.annotation.Nullable;
|
||||
import android.support.annotation.StringRes;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.os.Bundle;
|
||||
import android.webkit.WebView;
|
||||
import android.widget.ImageView;
|
||||
|
||||
import com.p3.bewoplaner.R;
|
||||
import com.p3.bewoplaner.di.InjectionHelper;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
import butterknife.BindView;
|
||||
import hani.momanii.supernova_emoji_library.Helper.EmojiconEditText;
|
||||
|
||||
public class FileConfirmationActivity extends AppCompatActivity implements FileConfirmationView {
|
||||
|
||||
@BindView(R.id.file_message)
|
||||
EmojiconEditText mMessageEmojiconEditText;
|
||||
|
||||
@BindView(R.id.file_emoji_button)
|
||||
ImageView mEmojiButtonImageView;
|
||||
|
||||
@BindView(R.id.media_file_webview)
|
||||
WebView mFileWebView;
|
||||
|
||||
@BindView(R.id.file_send_message)
|
||||
ImageView mSendMessageButtonImageView;
|
||||
|
||||
|
||||
@Inject
|
||||
FileConfirmationPresenter mFileConfirmationPresenter;
|
||||
|
||||
|
||||
@@ -455,7 +455,6 @@ public class LoginPresenter extends MVPAbstractPresenter<LoginView> implements L
|
||||
@Override
|
||||
public void onNext(RegisterResponse registerResponse) {
|
||||
Log.d(TAG, "onNext: " + registerResponse);
|
||||
getView().showError("Topkek");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,9 +1,68 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:emojicon="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context="com.p3.bewoplaner.page.fileconfirmation.FileConfirmationActivity">
|
||||
|
||||
<WebView
|
||||
android:id="@+id/media_file_webview"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
</WebView>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
app:layout_behavior="com.p3.bewoplaner.utils.ui.LinearLayoutBehavior">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/file_emoji_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="5dp"
|
||||
android:contentDescription="@null"
|
||||
android:paddingBottom="10dp"
|
||||
android:paddingLeft="16dp"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingTop="10dp"
|
||||
android:src="@drawable/smiley"
|
||||
tools:ignore="RtlSymmetry" />
|
||||
|
||||
<hani.momanii.supernova_emoji_library.Helper.EmojiconEditText
|
||||
android:id="@+id/file_message"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_weight="1"
|
||||
android:background="@android:color/transparent"
|
||||
android:hint="@string/chat_type_your_message"
|
||||
android:maxHeight="100dp"
|
||||
android:paddingBottom="10dp"
|
||||
android:paddingEnd="5dp"
|
||||
android:paddingRight="5dp"
|
||||
android:paddingTop="10dp"
|
||||
android:scrollHorizontally="false"
|
||||
android:scrollbars="vertical"
|
||||
android:textColor="@color/colorBlack"
|
||||
android:textColorHint="@color/colorManatee"
|
||||
emojicon:emojiconSize="28sp"
|
||||
tools:ignore="RtlSymmetry" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/file_send_message"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:contentDescription="@null"
|
||||
android:paddingEnd="16dp"
|
||||
android:paddingRight="16dp"
|
||||
android:src="@drawable/send"
|
||||
tools:ignore="RtlSymmetry" />
|
||||
</LinearLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
Reference in New Issue
Block a user