diff --git a/.gitignore b/.gitignore index f8d94768..e85469c5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,7 @@ # built application files *.apk *.ap_ -*.jar +#*.jar # files for the dex VM *.dex diff --git a/build.gradle b/build.gradle index 3c9f496e..1b0d6f1a 100644 --- a/build.gradle +++ b/build.gradle @@ -5,7 +5,7 @@ buildscript { jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:2.3.1' + classpath 'com.android.tools.build:gradle:2.3.3' classpath 'com.novoda:bintray-release:0.4.0' // NOTE: Do not place your application dependencies here; they belong diff --git a/chatkit/build.gradle b/chatkit/build.gradle index 54b43859..8e96172e 100644 --- a/chatkit/build.gradle +++ b/chatkit/build.gradle @@ -1,9 +1,8 @@ apply plugin: 'com.android.library' -apply plugin: 'com.novoda.bintray-release' android { compileSdkVersion 25 - buildToolsVersion "25.0.2" + buildToolsVersion "25.0.3" defaultConfig { minSdkVersion 14 @@ -20,16 +19,6 @@ android { } } -publish { - groupId = 'com.github.stfalcon' - artifactId = 'chatkit' - publishVersion = '0.2.2' - desc = 'ChatKit - is a library designed to simplify the development of UI for such a trivial task as chat. It have flexible possibilities for styling, customizing and data management' - licences = ['Apache-2.0'] - uploadName = 'ChatKit' - website = 'https://github.com/stfalcon-studio/ChatKit.git' -} - ext { supportVersion = '25.3.1' flexboxVersion = '0.2.5' diff --git a/chatkit/src/main/java/com/stfalcon/chatkit/messages/MessageInput.java b/chatkit/src/main/java/com/stfalcon/chatkit/messages/MessageInput.java index 92fe2d5a..1b9514c6 100644 --- a/chatkit/src/main/java/com/stfalcon/chatkit/messages/MessageInput.java +++ b/chatkit/src/main/java/com/stfalcon/chatkit/messages/MessageInput.java @@ -41,6 +41,7 @@ @SuppressWarnings({"WeakerAccess", "unused"}) public class MessageInput extends RelativeLayout implements View.OnClickListener, TextWatcher { + private MessageInputStyle messageInputStyle; protected EditText messageInput; protected ImageButton messageSendButton; @@ -153,42 +154,7 @@ private void onAddAttachments() { private void init(Context context, AttributeSet attrs) { init(context); MessageInputStyle style = MessageInputStyle.parse(context, attrs); - - this.messageInput.setMaxLines(style.getInputMaxLines()); - this.messageInput.setHint(style.getInputHint()); - this.messageInput.setText(style.getInputText()); - this.messageInput.setTextSize(TypedValue.COMPLEX_UNIT_PX, style.getInputTextSize()); - this.messageInput.setTextColor(style.getInputTextColor()); - this.messageInput.setHintTextColor(style.getInputHintColor()); - ViewCompat.setBackground(this.messageInput, style.getInputBackground()); - setCursor(style.getInputCursorDrawable()); - - this.attachmentButton.setVisibility(style.showAttachmentButton() ? VISIBLE : GONE); - this.attachmentButton.setImageDrawable(style.getAttachmentButtonIcon()); - this.attachmentButton.getLayoutParams().width = style.getAttachmentButtonWidth(); - this.attachmentButton.getLayoutParams().height = style.getAttachmentButtonHeight(); - ViewCompat.setBackground(this.attachmentButton, style.getAttachmentButtonBackground()); - - this.attachmentButtonSpace.setVisibility(style.showAttachmentButton() ? VISIBLE : GONE); - this.attachmentButtonSpace.getLayoutParams().width = style.getAttachmentButtonMargin(); - - this.messageSendButton.setImageDrawable(style.getInputButtonIcon()); - this.messageSendButton.getLayoutParams().width = style.getInputButtonWidth(); - this.messageSendButton.getLayoutParams().height = style.getInputButtonHeight(); - ViewCompat.setBackground(messageSendButton, style.getInputButtonBackground()); - this.sendButtonSpace.getLayoutParams().width = style.getInputButtonMargin(); - - if (getPaddingLeft() == 0 - && getPaddingRight() == 0 - && getPaddingTop() == 0 - && getPaddingBottom() == 0) { - setPadding( - style.getInputDefaultPaddingLeft(), - style.getInputDefaultPaddingTop(), - style.getInputDefaultPaddingRight(), - style.getInputDefaultPaddingBottom() - ); - } + this.setStyle(style); } private void init(Context context) { @@ -231,6 +197,42 @@ private void setCursor(Drawable drawable) { } } + public MessageInputStyle getStyle() { + return this.messageInputStyle; + } + + public void setStyle(MessageInputStyle messageInputStyle) { + this.messageInputStyle = messageInputStyle; + + this.messageInput.setMaxLines(messageInputStyle.getInputMaxLines()); + this.messageInput.setHint(messageInputStyle.getInputHint()); + this.messageInput.setText(messageInputStyle.getInputText()); + this.messageInput.setTextSize(TypedValue.COMPLEX_UNIT_PX, messageInputStyle.getInputTextSize()); + this.messageInput.setTextColor(messageInputStyle.getInputTextColor()); + this.messageInput.setHintTextColor(messageInputStyle.getInputHintColor()); + ViewCompat.setBackground(this.messageInput, messageInputStyle.getInputBackground()); + setCursor(messageInputStyle.getInputCursorDrawable()); + + this.attachmentButton.setVisibility(messageInputStyle.showAttachmentButton() ? VISIBLE : GONE); + this.attachmentButton.setImageDrawable(messageInputStyle.getAttachmentButtonIcon()); + this.attachmentButton.getLayoutParams().width = messageInputStyle.getAttachmentButtonWidth(); + this.attachmentButton.getLayoutParams().height = messageInputStyle.getAttachmentButtonHeight(); + ViewCompat.setBackground(this.attachmentButton, messageInputStyle.getAttachmentButtonBackground()); + + this.attachmentButtonSpace.setVisibility(messageInputStyle.showAttachmentButton() ? VISIBLE : GONE); + this.attachmentButtonSpace.getLayoutParams().width = messageInputStyle.getAttachmentButtonMargin(); + + this.messageSendButton.setImageDrawable(messageInputStyle.getInputButtonIcon()); + this.messageSendButton.getLayoutParams().width = messageInputStyle.getInputButtonWidth(); + this.messageSendButton.getLayoutParams().height = messageInputStyle.getInputButtonHeight(); + ViewCompat.setBackground(messageSendButton, messageInputStyle.getInputButtonBackground()); + this.sendButtonSpace.getLayoutParams().width = messageInputStyle.getInputButtonMargin(); + + if (getPaddingLeft() == 0 && getPaddingRight() == 0 && getPaddingTop() == 0 && getPaddingBottom() == 0) { + setPadding(messageInputStyle.getInputDefaultPaddingLeft(), messageInputStyle.getInputDefaultPaddingTop(), messageInputStyle.getInputDefaultPaddingRight(), messageInputStyle.getInputDefaultPaddingBottom()); + } + } + /** * Interface definition for a callback to be invoked when user pressed 'submit' button */ diff --git a/chatkit/src/main/java/com/stfalcon/chatkit/messages/MessageInputStyle.java b/chatkit/src/main/java/com/stfalcon/chatkit/messages/MessageInputStyle.java index 99b4e7c9..7a14444e 100644 --- a/chatkit/src/main/java/com/stfalcon/chatkit/messages/MessageInputStyle.java +++ b/chatkit/src/main/java/com/stfalcon/chatkit/messages/MessageInputStyle.java @@ -32,7 +32,7 @@ * Style for MessageInputStyle customization by xml attributes */ @SuppressWarnings("WeakerAccess") -class MessageInputStyle extends Style { +public class MessageInputStyle extends Style { private static final int DEFAULT_MAX_LINES = 5; @@ -282,4 +282,192 @@ protected int getInputDefaultPaddingBottom() { return inputDefaultPaddingBottom; } + public int getAttachmentButtonDefaultBgColor() { + return attachmentButtonDefaultBgColor; + } + + public int getAttachmentButtonDefaultBgPressedColor() { + return attachmentButtonDefaultBgPressedColor; + } + + public int getAttachmentButtonDefaultBgDisabledColor() { + return attachmentButtonDefaultBgDisabledColor; + } + + public int getAttachmentButtonDefaultIconColor() { + return attachmentButtonDefaultIconColor; + } + + public int getAttachmentButtonDefaultIconPressedColor() { + return attachmentButtonDefaultIconPressedColor; + } + + public int getAttachmentButtonDefaultIconDisabledColor() { + return attachmentButtonDefaultIconDisabledColor; + } + + public int getInputButtonDefaultBgColor() { + return inputButtonDefaultBgColor; + } + + public int getInputButtonDefaultBgPressedColor() { + return inputButtonDefaultBgPressedColor; + } + + public int getInputButtonDefaultBgDisabledColor() { + return inputButtonDefaultBgDisabledColor; + } + + public int getInputButtonDefaultIconColor() { + return inputButtonDefaultIconColor; + } + + public int getInputButtonDefaultIconPressedColor() { + return inputButtonDefaultIconPressedColor; + } + + public int getInputButtonDefaultIconDisabledColor() { + return inputButtonDefaultIconDisabledColor; + } + + public void setShowAttachmentButton(boolean showAttachmentButton) { + this.showAttachmentButton = showAttachmentButton; + } + + public void setAttachmentButtonBackground(int attachmentButtonBackground) { + this.attachmentButtonBackground = attachmentButtonBackground; + } + + public void setAttachmentButtonDefaultBgColor(int attachmentButtonDefaultBgColor) { + this.attachmentButtonDefaultBgColor = attachmentButtonDefaultBgColor; + } + + public void setAttachmentButtonDefaultBgPressedColor(int attachmentButtonDefaultBgPressedColor) { + this.attachmentButtonDefaultBgPressedColor = attachmentButtonDefaultBgPressedColor; + } + + public void setAttachmentButtonDefaultBgDisabledColor(int attachmentButtonDefaultBgDisabledColor) { + this.attachmentButtonDefaultBgDisabledColor = attachmentButtonDefaultBgDisabledColor; + } + + public void setAttachmentButtonIcon(int attachmentButtonIcon) { + this.attachmentButtonIcon = attachmentButtonIcon; + } + + public void setAttachmentButtonDefaultIconColor(int attachmentButtonDefaultIconColor) { + this.attachmentButtonDefaultIconColor = attachmentButtonDefaultIconColor; + } + + public void setAttachmentButtonDefaultIconPressedColor(int attachmentButtonDefaultIconPressedColor) { + this.attachmentButtonDefaultIconPressedColor = attachmentButtonDefaultIconPressedColor; + } + + public void setAttachmentButtonDefaultIconDisabledColor(int attachmentButtonDefaultIconDisabledColor) { + this.attachmentButtonDefaultIconDisabledColor = attachmentButtonDefaultIconDisabledColor; + } + + public void setAttachmentButtonWidth(int attachmentButtonWidth) { + this.attachmentButtonWidth = attachmentButtonWidth; + } + + public void setAttachmentButtonHeight(int attachmentButtonHeight) { + this.attachmentButtonHeight = attachmentButtonHeight; + } + + public void setAttachmentButtonMargin(int attachmentButtonMargin) { + this.attachmentButtonMargin = attachmentButtonMargin; + } + + public void setInputButtonBackground(int inputButtonBackground) { + this.inputButtonBackground = inputButtonBackground; + } + + public void setInputButtonDefaultBgColor(int inputButtonDefaultBgColor) { + this.inputButtonDefaultBgColor = inputButtonDefaultBgColor; + } + + public void setInputButtonDefaultBgPressedColor(int inputButtonDefaultBgPressedColor) { + this.inputButtonDefaultBgPressedColor = inputButtonDefaultBgPressedColor; + } + + public void setInputButtonDefaultBgDisabledColor(int inputButtonDefaultBgDisabledColor) { + this.inputButtonDefaultBgDisabledColor = inputButtonDefaultBgDisabledColor; + } + + public void setInputButtonIcon(int inputButtonIcon) { + this.inputButtonIcon = inputButtonIcon; + } + + public void setInputButtonDefaultIconColor(int inputButtonDefaultIconColor) { + this.inputButtonDefaultIconColor = inputButtonDefaultIconColor; + } + + public void setInputButtonDefaultIconPressedColor(int inputButtonDefaultIconPressedColor) { + this.inputButtonDefaultIconPressedColor = inputButtonDefaultIconPressedColor; + } + + public void setInputButtonDefaultIconDisabledColor(int inputButtonDefaultIconDisabledColor) { + this.inputButtonDefaultIconDisabledColor = inputButtonDefaultIconDisabledColor; + } + + public void setInputButtonWidth(int inputButtonWidth) { + this.inputButtonWidth = inputButtonWidth; + } + + public void setInputButtonHeight(int inputButtonHeight) { + this.inputButtonHeight = inputButtonHeight; + } + + public void setInputButtonMargin(int inputButtonMargin) { + this.inputButtonMargin = inputButtonMargin; + } + + public void setInputMaxLines(int inputMaxLines) { + this.inputMaxLines = inputMaxLines; + } + + public void setInputHint(String inputHint) { + this.inputHint = inputHint; + } + + public void setInputText(String inputText) { + this.inputText = inputText; + } + + public void setInputTextSize(int inputTextSize) { + this.inputTextSize = inputTextSize; + } + + public void setInputTextColor(int inputTextColor) { + this.inputTextColor = inputTextColor; + } + + public void setInputHintColor(int inputHintColor) { + this.inputHintColor = inputHintColor; + } + + public void setInputBackground(Drawable inputBackground) { + this.inputBackground = inputBackground; + } + + public void setInputCursorDrawable(Drawable inputCursorDrawable) { + this.inputCursorDrawable = inputCursorDrawable; + } + + public void setInputDefaultPaddingLeft(int inputDefaultPaddingLeft) { + this.inputDefaultPaddingLeft = inputDefaultPaddingLeft; + } + + public void setInputDefaultPaddingRight(int inputDefaultPaddingRight) { + this.inputDefaultPaddingRight = inputDefaultPaddingRight; + } + + public void setInputDefaultPaddingTop(int inputDefaultPaddingTop) { + this.inputDefaultPaddingTop = inputDefaultPaddingTop; + } + + public void setInputDefaultPaddingBottom(int inputDefaultPaddingBottom) { + this.inputDefaultPaddingBottom = inputDefaultPaddingBottom; + } + } diff --git a/chatkit/src/main/java/com/stfalcon/chatkit/messages/MessagesList.java b/chatkit/src/main/java/com/stfalcon/chatkit/messages/MessagesList.java index 17b3f8ed..a6267164 100644 --- a/chatkit/src/main/java/com/stfalcon/chatkit/messages/MessagesList.java +++ b/chatkit/src/main/java/com/stfalcon/chatkit/messages/MessagesList.java @@ -94,4 +94,12 @@ void setAdapter(MessagesListAdapter adapter, boolean reverseLayout) { private void parseStyle(Context context, AttributeSet attrs) { messagesListStyle = MessagesListStyle.parse(context, attrs); } + + public MessagesListStyle getStyle() { + return this.messagesListStyle; + } + + public void setStyle(MessagesListStyle messagesListStyle) { + this.messagesListStyle = messagesListStyle; + } } diff --git a/chatkit/src/main/java/com/stfalcon/chatkit/messages/MessagesListAdapter.java b/chatkit/src/main/java/com/stfalcon/chatkit/messages/MessagesListAdapter.java index 0533f221..d4c2271f 100644 --- a/chatkit/src/main/java/com/stfalcon/chatkit/messages/MessagesListAdapter.java +++ b/chatkit/src/main/java/com/stfalcon/chatkit/messages/MessagesListAdapter.java @@ -595,7 +595,11 @@ void setLayoutManager(RecyclerView.LayoutManager layoutManager) { this.layoutManager = layoutManager; } - void setStyle(MessagesListStyle style) { + public MessagesListStyle getStyle() { + return this.messagesListStyle; + } + + public void setStyle(MessagesListStyle style) { this.messagesListStyle = style; } diff --git a/chatkit/src/main/java/com/stfalcon/chatkit/messages/MessagesListStyle.java b/chatkit/src/main/java/com/stfalcon/chatkit/messages/MessagesListStyle.java index 88c6fe15..42991a5a 100644 --- a/chatkit/src/main/java/com/stfalcon/chatkit/messages/MessagesListStyle.java +++ b/chatkit/src/main/java/com/stfalcon/chatkit/messages/MessagesListStyle.java @@ -34,7 +34,7 @@ * Style for MessagesListStyle customization by xml attributes */ @SuppressWarnings("WeakerAccess") -class MessagesListStyle extends Style { +public class MessagesListStyle extends Style { private int textAutoLinkMask; private int incomingTextLinkColor; @@ -210,7 +210,7 @@ static MessagesListStyle parse(Context context, AttributeSet attrs) { return style; } - private MessagesListStyle(Context context, AttributeSet attrs) { + public MessagesListStyle(Context context, AttributeSet attrs) { super(context, attrs); } @@ -231,55 +231,55 @@ private Drawable getMessageSelector(@ColorInt int normalColor, @ColorInt int sel return drawable; } - protected int getTextAutoLinkMask() { + public int getTextAutoLinkMask() { return textAutoLinkMask; } - protected int getIncomingTextLinkColor() { + public int getIncomingTextLinkColor() { return incomingTextLinkColor; } - protected int getOutcomingTextLinkColor() { + public int getOutcomingTextLinkColor() { return outcomingTextLinkColor; } - protected int getIncomingAvatarWidth() { + public int getIncomingAvatarWidth() { return incomingAvatarWidth; } - protected int getIncomingAvatarHeight() { + public int getIncomingAvatarHeight() { return incomingAvatarHeight; } - protected int getIncomingDefaultBubblePaddingLeft() { + public int getIncomingDefaultBubblePaddingLeft() { return incomingDefaultBubblePaddingLeft; } - protected int getIncomingDefaultBubblePaddingRight() { + public int getIncomingDefaultBubblePaddingRight() { return incomingDefaultBubblePaddingRight; } - protected int getIncomingDefaultBubblePaddingTop() { + public int getIncomingDefaultBubblePaddingTop() { return incomingDefaultBubblePaddingTop; } - protected int getIncomingDefaultBubblePaddingBottom() { + public int getIncomingDefaultBubblePaddingBottom() { return incomingDefaultBubblePaddingBottom; } - protected int getIncomingTextColor() { + public int getIncomingTextColor() { return incomingTextColor; } - protected int getIncomingTextSize() { + public int getIncomingTextSize() { return incomingTextSize; } - protected int getIncomingTextStyle() { + public int getIncomingTextStyle() { return incomingTextStyle; } - protected Drawable getOutcomingBubbleDrawable() { + public Drawable getOutcomingBubbleDrawable() { if (outcomingBubbleDrawable == -1) { return getMessageSelector(outcomingDefaultBubbleColor, outcomingDefaultBubbleSelectedColor, outcomingDefaultBubblePressedColor, R.drawable.shape_outcoming_message); @@ -288,7 +288,7 @@ protected Drawable getOutcomingBubbleDrawable() { } } - protected Drawable getOutcomingImageOverlayDrawable() { + public Drawable getOutcomingImageOverlayDrawable() { if (outcomingImageOverlayDrawable == -1) { return getMessageSelector(Color.TRANSPARENT, outcomingDefaultImageOverlaySelectedColor, outcomingDefaultImageOverlayPressedColor, R.drawable.shape_outcoming_message); @@ -297,103 +297,143 @@ protected Drawable getOutcomingImageOverlayDrawable() { } } - protected int getOutcomingDefaultBubblePaddingLeft() { + public int getOutcomingDefaultBubblePaddingLeft() { return outcomingDefaultBubblePaddingLeft; } - protected int getOutcomingDefaultBubblePaddingRight() { + public int getOutcomingDefaultBubblePaddingRight() { return outcomingDefaultBubblePaddingRight; } - protected int getOutcomingDefaultBubblePaddingTop() { + public int getOutcomingDefaultBubblePaddingTop() { return outcomingDefaultBubblePaddingTop; } - protected int getOutcomingDefaultBubblePaddingBottom() { + public int getOutcomingDefaultBubblePaddingBottom() { return outcomingDefaultBubblePaddingBottom; } - protected int getOutcomingTextColor() { + public int getIncomingDefaultBubbleColor() { + return incomingDefaultBubbleColor; + } + + public int getIncomingDefaultBubblePressedColor() { + return incomingDefaultBubblePressedColor; + } + + public int getIncomingDefaultBubbleSelectedColor() { + return incomingDefaultBubbleSelectedColor; + } + + public int getIncomingDefaultImageOverlayPressedColor() { + return incomingDefaultImageOverlayPressedColor; + } + + public int getIncomingDefaultImageOverlaySelectedColor() { + return incomingDefaultImageOverlaySelectedColor; + } + + public int getOutcomingDefaultBubbleColor() { + return outcomingDefaultBubbleColor; + } + + public int getOutcomingDefaultBubblePressedColor() { + return outcomingDefaultBubblePressedColor; + } + + public int getOutcomingDefaultBubbleSelectedColor() { + return outcomingDefaultBubbleSelectedColor; + } + + public int getOutcomingDefaultImageOverlayPressedColor() { + return outcomingDefaultImageOverlayPressedColor; + } + + public int getOutcomingDefaultImageOverlaySelectedColor() { + return outcomingDefaultImageOverlaySelectedColor; + } + + public int getOutcomingTextColor() { return outcomingTextColor; } - protected int getOutcomingTextSize() { + public int getOutcomingTextSize() { return outcomingTextSize; } - protected int getOutcomingTextStyle() { + public int getOutcomingTextStyle() { return outcomingTextStyle; } - protected int getOutcomingTimeTextColor() { + public int getOutcomingTimeTextColor() { return outcomingTimeTextColor; } - protected int getOutcomingTimeTextSize() { + public int getOutcomingTimeTextSize() { return outcomingTimeTextSize; } - protected int getOutcomingTimeTextStyle() { + public int getOutcomingTimeTextStyle() { return outcomingTimeTextStyle; } - protected int getOutcomingImageTimeTextColor() { + public int getOutcomingImageTimeTextColor() { return outcomingImageTimeTextColor; } - protected int getOutcomingImageTimeTextSize() { + public int getOutcomingImageTimeTextSize() { return outcomingImageTimeTextSize; } - protected int getOutcomingImageTimeTextStyle() { + public int getOutcomingImageTimeTextStyle() { return outcomingImageTimeTextStyle; } - protected int getDateHeaderTextColor() { + public int getDateHeaderTextColor() { return dateHeaderTextColor; } - protected int getDateHeaderTextSize() { + public int getDateHeaderTextSize() { return dateHeaderTextSize; } - protected int getDateHeaderTextStyle() { + public int getDateHeaderTextStyle() { return dateHeaderTextStyle; } - protected int getDateHeaderPadding() { + public int getDateHeaderPadding() { return dateHeaderPadding; } - protected String getDateHeaderFormat() { + public String getDateHeaderFormat() { return dateHeaderFormat; } - protected int getIncomingTimeTextSize() { + public int getIncomingTimeTextSize() { return incomingTimeTextSize; } - protected int getIncomingTimeTextStyle() { + public int getIncomingTimeTextStyle() { return incomingTimeTextStyle; } - protected int getIncomingTimeTextColor() { + public int getIncomingTimeTextColor() { return incomingTimeTextColor; } - protected int getIncomingImageTimeTextColor() { + public int getIncomingImageTimeTextColor() { return incomingImageTimeTextColor; } - protected int getIncomingImageTimeTextSize() { + public int getIncomingImageTimeTextSize() { return incomingImageTimeTextSize; } - protected int getIncomingImageTimeTextStyle() { + public int getIncomingImageTimeTextStyle() { return incomingImageTimeTextStyle; } - protected Drawable getIncomingBubbleDrawable() { + public Drawable getIncomingBubbleDrawable() { if (incomingBubbleDrawable == -1) { return getMessageSelector(incomingDefaultBubbleColor, incomingDefaultBubbleSelectedColor, incomingDefaultBubblePressedColor, R.drawable.shape_incoming_message); @@ -402,7 +442,7 @@ protected Drawable getIncomingBubbleDrawable() { } } - protected Drawable getIncomingImageOverlayDrawable() { + public Drawable getIncomingImageOverlayDrawable() { if (incomingImageOverlayDrawable == -1) { return getMessageSelector(Color.TRANSPARENT, incomingDefaultImageOverlaySelectedColor, incomingDefaultImageOverlayPressedColor, R.drawable.shape_incoming_message); @@ -410,4 +450,204 @@ protected Drawable getIncomingImageOverlayDrawable() { return getDrawable(incomingImageOverlayDrawable); } } + + public void setTextAutoLinkMask(int textAutoLinkMask) { + this.textAutoLinkMask = textAutoLinkMask; + } + + public void setIncomingTextLinkColor(int incomingTextLinkColor) { + this.incomingTextLinkColor = incomingTextLinkColor; + } + + public void setOutcomingTextLinkColor(int outcomingTextLinkColor) { + this.outcomingTextLinkColor = outcomingTextLinkColor; + } + + public void setIncomingAvatarWidth(int incomingAvatarWidth) { + this.incomingAvatarWidth = incomingAvatarWidth; + } + + public void setIncomingAvatarHeight(int incomingAvatarHeight) { + this.incomingAvatarHeight = incomingAvatarHeight; + } + + public void setIncomingBubbleDrawable(int incomingBubbleDrawable) { + this.incomingBubbleDrawable = incomingBubbleDrawable; + } + + public void setIncomingDefaultBubbleColor(int incomingDefaultBubbleColor) { + this.incomingDefaultBubbleColor = incomingDefaultBubbleColor; + } + + public void setIncomingDefaultBubblePressedColor(int incomingDefaultBubblePressedColor) { + this.incomingDefaultBubblePressedColor = incomingDefaultBubblePressedColor; + } + + public void setIncomingDefaultBubbleSelectedColor(int incomingDefaultBubbleSelectedColor) { + this.incomingDefaultBubbleSelectedColor = incomingDefaultBubbleSelectedColor; + } + + public void setIncomingImageOverlayDrawable(int incomingImageOverlayDrawable) { + this.incomingImageOverlayDrawable = incomingImageOverlayDrawable; + } + + public void setIncomingDefaultImageOverlayPressedColor(int incomingDefaultImageOverlayPressedColor) { + this.incomingDefaultImageOverlayPressedColor = incomingDefaultImageOverlayPressedColor; + } + + public void setIncomingDefaultImageOverlaySelectedColor(int incomingDefaultImageOverlaySelectedColor) { + this.incomingDefaultImageOverlaySelectedColor = incomingDefaultImageOverlaySelectedColor; + } + + public void setIncomingDefaultBubblePaddingLeft(int incomingDefaultBubblePaddingLeft) { + this.incomingDefaultBubblePaddingLeft = incomingDefaultBubblePaddingLeft; + } + + public void setIncomingDefaultBubblePaddingRight(int incomingDefaultBubblePaddingRight) { + this.incomingDefaultBubblePaddingRight = incomingDefaultBubblePaddingRight; + } + + public void setIncomingDefaultBubblePaddingTop(int incomingDefaultBubblePaddingTop) { + this.incomingDefaultBubblePaddingTop = incomingDefaultBubblePaddingTop; + } + + public void setIncomingDefaultBubblePaddingBottom(int incomingDefaultBubblePaddingBottom) { + this.incomingDefaultBubblePaddingBottom = incomingDefaultBubblePaddingBottom; + } + + public void setIncomingTextColor(int incomingTextColor) { + this.incomingTextColor = incomingTextColor; + } + + public void setIncomingTextSize(int incomingTextSize) { + this.incomingTextSize = incomingTextSize; + } + + public void setIncomingTextStyle(int incomingTextStyle) { + this.incomingTextStyle = incomingTextStyle; + } + + public void setIncomingTimeTextColor(int incomingTimeTextColor) { + this.incomingTimeTextColor = incomingTimeTextColor; + } + + public void setIncomingTimeTextSize(int incomingTimeTextSize) { + this.incomingTimeTextSize = incomingTimeTextSize; + } + + public void setIncomingTimeTextStyle(int incomingTimeTextStyle) { + this.incomingTimeTextStyle = incomingTimeTextStyle; + } + + public void setIncomingImageTimeTextColor(int incomingImageTimeTextColor) { + this.incomingImageTimeTextColor = incomingImageTimeTextColor; + } + + public void setIncomingImageTimeTextSize(int incomingImageTimeTextSize) { + this.incomingImageTimeTextSize = incomingImageTimeTextSize; + } + + public void setIncomingImageTimeTextStyle(int incomingImageTimeTextStyle) { + this.incomingImageTimeTextStyle = incomingImageTimeTextStyle; + } + + public void setOutcomingBubbleDrawable(int outcomingBubbleDrawable) { + this.outcomingBubbleDrawable = outcomingBubbleDrawable; + } + + public void setOutcomingDefaultBubbleColor(int outcomingDefaultBubbleColor) { + this.outcomingDefaultBubbleColor = outcomingDefaultBubbleColor; + } + + public void setOutcomingDefaultBubblePressedColor(int outcomingDefaultBubblePressedColor) { + this.outcomingDefaultBubblePressedColor = outcomingDefaultBubblePressedColor; + } + + public void setOutcomingDefaultBubbleSelectedColor(int outcomingDefaultBubbleSelectedColor) { + this.outcomingDefaultBubbleSelectedColor = outcomingDefaultBubbleSelectedColor; + } + + public void setOutcomingImageOverlayDrawable(int outcomingImageOverlayDrawable) { + this.outcomingImageOverlayDrawable = outcomingImageOverlayDrawable; + } + + public void setOutcomingDefaultImageOverlayPressedColor(int outcomingDefaultImageOverlayPressedColor) { + this.outcomingDefaultImageOverlayPressedColor = outcomingDefaultImageOverlayPressedColor; + } + + public void setOutcomingDefaultImageOverlaySelectedColor(int outcomingDefaultImageOverlaySelectedColor) { + this.outcomingDefaultImageOverlaySelectedColor = outcomingDefaultImageOverlaySelectedColor; + } + + public void setOutcomingDefaultBubblePaddingLeft(int outcomingDefaultBubblePaddingLeft) { + this.outcomingDefaultBubblePaddingLeft = outcomingDefaultBubblePaddingLeft; + } + + public void setOutcomingDefaultBubblePaddingRight(int outcomingDefaultBubblePaddingRight) { + this.outcomingDefaultBubblePaddingRight = outcomingDefaultBubblePaddingRight; + } + + public void setOutcomingDefaultBubblePaddingTop(int outcomingDefaultBubblePaddingTop) { + this.outcomingDefaultBubblePaddingTop = outcomingDefaultBubblePaddingTop; + } + + public void setOutcomingDefaultBubblePaddingBottom(int outcomingDefaultBubblePaddingBottom) { + this.outcomingDefaultBubblePaddingBottom = outcomingDefaultBubblePaddingBottom; + } + + public void setOutcomingTextColor(int outcomingTextColor) { + this.outcomingTextColor = outcomingTextColor; + } + + public void setOutcomingTextSize(int outcomingTextSize) { + this.outcomingTextSize = outcomingTextSize; + } + + public void setOutcomingTextStyle(int outcomingTextStyle) { + this.outcomingTextStyle = outcomingTextStyle; + } + + public void setOutcomingTimeTextColor(int outcomingTimeTextColor) { + this.outcomingTimeTextColor = outcomingTimeTextColor; + } + + public void setOutcomingTimeTextSize(int outcomingTimeTextSize) { + this.outcomingTimeTextSize = outcomingTimeTextSize; + } + + public void setOutcomingTimeTextStyle(int outcomingTimeTextStyle) { + this.outcomingTimeTextStyle = outcomingTimeTextStyle; + } + + public void setOutcomingImageTimeTextColor(int outcomingImageTimeTextColor) { + this.outcomingImageTimeTextColor = outcomingImageTimeTextColor; + } + + public void setOutcomingImageTimeTextSize(int outcomingImageTimeTextSize) { + this.outcomingImageTimeTextSize = outcomingImageTimeTextSize; + } + + public void setOutcomingImageTimeTextStyle(int outcomingImageTimeTextStyle) { + this.outcomingImageTimeTextStyle = outcomingImageTimeTextStyle; + } + + public void setDateHeaderPadding(int dateHeaderPadding) { + this.dateHeaderPadding = dateHeaderPadding; + } + + public void setDateHeaderFormat(String dateHeaderFormat) { + this.dateHeaderFormat = dateHeaderFormat; + } + + public void setDateHeaderTextColor(int dateHeaderTextColor) { + this.dateHeaderTextColor = dateHeaderTextColor; + } + + public void setDateHeaderTextSize(int dateHeaderTextSize) { + this.dateHeaderTextSize = dateHeaderTextSize; + } + + public void setDateHeaderTextStyle(int dateHeaderTextStyle) { + this.dateHeaderTextStyle = dateHeaderTextStyle; + } } diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 00000000..cd515d3f Binary files /dev/null and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index fb4882dc..a29bddb2 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Thu Apr 06 11:02:19 EEST 2017 +#Sun Jul 30 20:50:34 CEST 2017 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-4.0.2-bin.zip diff --git a/gradlew b/gradlew index 27309d92..cccdd3d5 100755 --- a/gradlew +++ b/gradlew @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env sh ############################################################################## ## @@ -33,11 +33,11 @@ DEFAULT_JVM_OPTS="" # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD="maximum" -warn ( ) { +warn () { echo "$*" } -die ( ) { +die () { echo echo "$*" echo @@ -154,11 +154,19 @@ if $cygwin ; then esac fi -# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules -function splitJvmOpts() { - JVM_OPTS=("$@") +# Escape application args +save () { + for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done + echo " " } -eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS -JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" +APP_ARGS=$(save "$@") -exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" +# Collect all arguments for the java command, following the shell quoting and substitution rules +eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" + +# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong +if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then + cd "$(dirname "$0")" +fi + +exec "$JAVACMD" "$@" diff --git a/gradlew.bat b/gradlew.bat index 832fdb60..f9553162 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -49,7 +49,6 @@ goto fail @rem Get command-line arguments, handling Windows variants if not "%OS%" == "Windows_NT" goto win9xME_args -if "%@eval[2+2]" == "4" goto 4NT_args :win9xME_args @rem Slurp the command line arguments. @@ -60,11 +59,6 @@ set _SKIP=2 if "x%~1" == "x" goto execute set CMD_LINE_ARGS=%* -goto execute - -:4NT_args -@rem Get arguments from the 4NT Shell from JP Software -set CMD_LINE_ARGS=%$ :execute @rem Setup the command line