Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Signal/SMSSecure balloon theme #656

Closed
mimi89999 opened this issue Feb 27, 2016 · 28 comments
Closed

Add Signal/SMSSecure balloon theme #656

mimi89999 opened this issue Feb 27, 2016 · 28 comments
Assignees
Labels
enhancement New feature or request

Comments

@mimi89999
Copy link

No description provided.

@daniele-athome daniele-athome added the enhancement New feature or request label Feb 27, 2016
@daniele-athome daniele-athome added this to the 4.0 milestone Feb 27, 2016
@daniele-athome daniele-athome changed the title [UI] Add Signal/SMSSecure theme Add Signal/SMSSecure balloon theme Feb 27, 2016
@mimi89999
Copy link
Author

I can work on it.

@daniele-athome
Copy link
Member

Ok thank you! It should be relatively easy to add a new theme.
You should write a new balloon theme class by extending AvatarMessageTheme (I can see the outgoing avatar is not shown in SMSSecure, you can override the setOutgoing method to hide the relevant view) and then put a reference to that class into the theme factory (MessageListItemThemeFactory) by assigning a new string to it ("signal" or "smssecure").
Then you have to add a new element to the arrays.xml file and its translation (only add English, others will be added through Weblate) in strings.xml.

When you're finished, please open a pull request.
Thank you!

@daniele-athome
Copy link
Member

Also, please run a syntax check through ./gradlew check before opening the pull request. Thanks!

@mimi89999
Copy link
Author

Should I put it after hangout or at the end?

@daniele-athome
Copy link
Member

After Hangout, please.

@mimi89999
Copy link
Author

I can't assembleDebug:

FAILURE: Build failed with an exception.

  • What went wrong:
A problem occurred configuring project ':app'.
> Could not resolve all dependencies for configuration ':app:_basicDebugCompile'.
   > Could not resolve com.github.afollestad.material-dialogs:core:0.8.5.6.
     Required by:
         androidclient:app:unspecified
      > Could not resolve com.github.afollestad.material-dialogs:core:0.8.5.6.
         > Could not get resource 'https://jitpack.io/com/github/afollestad/material-dialogs/core/0.8.5.6/core-0.8.5.6.pom'.
            > Could not GET 'https://jitpack.io/com/github/afollestad/material-dialogs/core/0.8.5.6/core-0.8.5.6.pom'.
               > sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
   > Could not resolve com.github.afollestad.material-dialogs:commons:0.8.5.6.
     Required by:
         androidclient:app:unspecified
      > Could not resolve com.github.afollestad.material-dialogs:commons:0.8.5.6.
         > Could not get resource 'https://jitpack.io/com/github/afollestad/material-dialogs/commons/0.8.5.6/commons-0.8.5.6.pom'.
            > Could not GET 'https://jitpack.io/com/github/afollestad/material-dialogs/commons/0.8.5.6/commons-0.8.5.6.pom'.
               > sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
   > Could not resolve com.github.vlivanov:ListViewVariants:f606578467.
     Required by:
         androidclient:app:unspecified
      > Could not resolve com.github.vlivanov:ListViewVariants:f606578467.
         > Could not get resource 'https://jitpack.io/com/github/vlivanov/ListViewVariants/f606578467/ListViewVariants-f606578467.pom'.
            > Could not GET 'https://jitpack.io/com/github/vlivanov/ListViewVariants/f606578467/ListViewVariants-f606578467.pom'.
               > sun.security.validator.ValidatorException: PKIX pa

@daniele-athome
Copy link
Member

I remember having bumped into this too, but I can't remember how I fixed it...
Can you run a ./gradlew clean and try again?

@mimi89999
Copy link
Author

Even _./gradlew clean_ fails with the same error.

@mimi89999
Copy link
Author

I need to add the certificate to java...

@mimi89999
Copy link
Author

I don't know how to fix this.

@mimi89999
Copy link
Author

Maybe related to: jitpack/jitpack.io#423

In this case updating gradle wrapper should fix the issue.

Edit:
Yes, updating gradle to 2.11 solved the issue.

@daniele-athome
Copy link
Member

Weird... it works for me on 2.10.
Ok then, please include the upgrade to the Gradle wrapper in the PR.

@mimi89999
Copy link
Author

I can see the outgoing avatar is not shown in SMSSecure

The outgoing avatar is not shown in the latest version of Hangouts.

@mimi89999
Copy link
Author

screen
In SMSSecure and Signal you can choose the color of incoming messages. For testing I used white. If you prefer a color to another, I can change it...

@daniele-athome
Copy link
Member

The outgoing avatar is not shown in the latest version of Hangouts.

Oh I didn't notice that (I don't use Hangout much).

In SMSSecure and Signal you can choose the color of incoming messages. For testing I used white. If you prefer a color to another, I can change it...

Let's start with two colors, as Signal does: white for outgoing, color_primary_dark (that is, the toolbar background color) for incoming messages.

@mimi89999
Copy link
Author

I never used Hangouts. I saw a screenshot...

@daniele-athome
Copy link
Member

I didn't think of looking at the screenshots because I have it installed eheh actually I didn't even bother I just trusted what you said :-)

@mimi89999
Copy link
Author

In SMSSecure incoming text color is white. In Kontalk the text color is black. When I changed the balloon color, all incoming messages became unreadable.

@h-2
Copy link

h-2 commented Mar 5, 2016

Cool to see a new theme! Will this maybe make a dark theme easier, too?

@daniele-athome
Copy link
Member

@mimi89999 I think you have to change only the background color (or maybe I'm not getting what the problem is). Can I see the code you're writing?

@daniele-athome
Copy link
Member

@h-2 I'm afraid not so much, sorry :-( balloon theming needs some improvement to be usable with a dark theme and also the rest of the application should be themed too (although that could be relatively easy to do by using XML styles).

@mimi89999
Copy link
Author

Black text on dark background is unreadable...

@daniele-athome
Copy link
Member

@mimi89999 ok sorry I thought about another thing.
You could use a new text appearance style to be applied in TextContent.setDarkBackground() (which will autonomously decide which style to apply), called by AvatarMessageTheme.processComponentView().

@mimi89999
Copy link
Author

Here is my code: mimi89999@fc82f0b

@daniele-athome
Copy link
Member

Thanks. A small review:

  • please move the Gradle wrapper version upgrade to a separate commit
  • please avoid duplicating the whole XML layout of balloons. I think changing the colour could be made inside the new theme class by using a custom style that you can define in styles.xml (Add Signal/SMSSecure balloon theme #656 (comment))

If you fix those two things and create a pull request I'd be happy to merge it.
Thank you!!

@daniele-athome
Copy link
Member

Didn't we say use color_primary_dark for incoming? I don't understand, is that your final commit or do you need to amend something?

@mimi89999
Copy link
Author

No, it's not my final commit. After you wrote:

Can I see the code you're writing?

I commited the current state of my local version...

@pejakm
Copy link
Contributor

pejakm commented May 15, 2016

@mimi89999 What's the status of this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants