1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-08-13 17:03:48 -04:00
Commit Graph

34 Commits

Author SHA1 Message Date
Stephan Fuhrmann
16f6d85ea2 GMail-app-style generated colorful one-letter contact pictures for pictureless contacts 2013-07-21 14:34:45 -04:00
Jesse Vincent
fa1b7dec31 broaden a 'catch' to catch other failures showing all headers.
Market reported NPE:

java.lang.NullPointerException
at com.fsck.k9.view.MessageHeader.showAdditionalHeaders(MessageHeader.java:186)
at com.fsck.k9.view.MessageHeader.onShowAdditionalHeaders(MessageHeader.java:318)
at com.fsck.k9.fragment.MessageViewFragment.onToggleAllHeadersView(MessageViewFragment.java:300)
at com.fsck.k9.activity.MessageList.onOptionsItemSelected(MessageList.java:867)
at android.support.v4.app.Watson.onMenuItemSelected(Watson.java:119)
at com.actionbarsherlock.ActionBarSherlock.callbackOptionsItemSelected(ActionBarSherlock.java:603)
at com.actionbarsherlock.internal.ActionBarSherlockNative.dispatchOptionsItemSelected(ActionBarSherlockNative.java:78)
at com.actionbarsherlock.app.SherlockFragmentActivity.onMenuItemSelected(SherlockFragmentActivity.java:205)
at com.android.internal.policy.impl.PhoneWindow.onMenuItemSelected(PhoneWindow.java:1047)
at com.android.internal.view.menu.MenuBuilder.dispatchMenuItemSelected(MenuBuilder.java:735)
at com.android.internal.view.menu.MenuItemImpl.invoke(MenuItemImpl.java:149)
at com.android.internal.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:874)
at com.android.internal.view.menu.ListMenuPresenter.onItemClick(ListMenuPresenter.java:180)
at android.widget.AdapterView.performItemClick(AdapterView.java:301)
at android.widget.AbsListView.performItemClick(AbsListView.java:1276)
at android.widget.AbsListView$PerformClick.run(AbsListView.java:3067)
at android.widget.AbsListView$1.run(AbsListView.java:3963)
at android.os.Handler.handleCallback(Handler.java:615)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4898)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1006)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:773)
at dalvik.system.NativeStart.main(Native Method)
2013-06-30 18:52:27 -04:00
Danny Baumann
0fac8e999d Clean up date handling.
Remove home-grown date formatting, and replace it by usage of the
DateUtils class which is present since API level 3.
2013-02-11 15:19:15 +01:00
m0viefreak
8d4a82ba0e message view: fix subject bugs
- Android does not support ellipsize in combination with maxlines
  for TextViews. This caused getEllipsisCount() in MessageTitleView
  to always fail, and the full subject was never shown in the regular
  headers area when needed.
  To work around that, check for ourselves whether the text is
  longer than 2, and ellipsize manually.

- Clicking the star button on a message caused the subject line to
  re-appear, even if it fits in the action bar title without being
  cut off. This was caused by MessageHeader.populate(), which always
  set the subject to visible.
  As a workaround: Only set subject to visible in case populate()
  actually shows a new message.

- delete res/layout/actionbar_message_view.xml, its already present
  in the actionbar_custom.xml
2013-02-11 13:47:31 +01:00
Danny Baumann
3807d2881d Fix warnings. 2013-02-11 09:19:29 +01:00
Jesse Vincent
ed90f3be44 MessageView quick contact badges 2013-02-10 19:02:17 -05:00
Jesse Vincent
fd19704fe5 show the date and time in a single view on a single line 2013-02-10 19:02:17 -05:00
Jesse Vincent
648a6eed86 move the To and Cc labels into their own Views; stop playing span games to style them 2013-02-10 19:02:17 -05:00
Jesse Vincent
82a8ac6278 There's no good reason to exclude the Subject from the "full headers" view, especicially since we now play games with it sometimes showing up in the header and sometimes in the titlebar 2013-02-10 19:02:17 -05:00
Jesse Vincent
c4b941b9b9 Switch our font sizes to have a "default", which is the size described in the XML.
Unify the text field size setting code. We should put it in a better place
2013-02-10 19:02:17 -05:00
Jesse Vincent
7714bc3cfa Move "show all headers" into the menu (and out of the UI) 2013-02-07 15:27:22 -05:00
cketti
ac9259a0e3 Restructure MessageHeader to avoid NPE when used by MessageTitleView 2013-02-05 23:55:21 +01:00
Danny Baumann
f51f675021 Simplify and improve message view header layout.
The star was displayed partially off-screen before.
2013-02-05 11:15:55 +01:00
Danny Baumann
275700e482 Fix a number of build warnings.
This gets rid of about 50 warnings. Deprecation warnings still remain,
though.
2013-02-04 11:18:49 +01:00
cketti
6b143d845a Set MessageList title in action bar depending on display mode 2013-02-01 02:50:00 +01:00
Andrew Chen
9fbb2b4836 Show the subject line in the MessageHeader if the ActionBar title was truncated. 2012-09-09 13:45:33 -07:00
Andrew Chen
4a416f7acd Hide subject line in MessageView since it's now displayed in the actionbar.
Now that the subject line is gone, the right side of the header is now the tallest part of the header.
Put date and time on the same line to keep the header compact.
2012-09-09 13:41:49 -07:00
Bernhard Redl
56105bcfe3 + add support for $Forwarded IMAP flag 2012-08-29 02:26:38 +02:00
cketti
482ae352c1 Reverted most of the recent message header changes
Clicking the additional headers area still allows to hide that view
again.
2012-03-18 04:51:29 +01:00
cketti
faf9dc6e02 Restored show/more less indicator in the message header 2012-03-06 04:38:08 +01:00
m0viefreak
8d12244a9c Message header changes
* remove expand/collapse arrows, instead use the background area of the header to toggle
* allow expanding of To: and Cc: texts when too long and cut off by clicking on them
2012-03-02 06:15:55 +01:00
m0viefreak
f1baa8f461 invalidate message content WebView when the message header changes
This fixes redraw issues where text appears doubled or is cut off
2012-03-02 05:16:58 +01:00
cketti
c1d663b084 Save/restore instance state for MessageHeader 2012-02-24 04:07:29 +01:00
cketti
80cb0cce35 Changed the layout to include a color chip again 2012-02-21 23:38:43 +01:00
cketti
ec6645bf6a Avoid creating new objects for handling click events 2012-02-21 16:21:47 +01:00
cketti
309eeb72ac Got rid of the ScrollView in MessageView
The ScrollView around the WebView caused all sorts of problems. This
change removes the ScrollView and uses the undocumented method
WebView.setEmbeddedTitleBar() to set the MessageHeader view as "title
bar" of the WebView. This allows MessageHeader to scroll away making
more room for the WebView.
All of the "magic title bar" code was originally implemented by Jesse
for Kaiten.

Because WebView doesn't support a scrolling footer we can no longer
support scrolling buttons or attachments at the end of the message. Now
users can switch from message view to attachment view via a button just
below the message headers.

I also copied some code for which I was too lazy to create a separate
commit. It allows to display attachments we didn't use to show by
clicking on a "More..." button in the attachment view. Those
attachments are mostly images referenced by the HTML part (e.g.
background images).

Fixes issue 3291
2012-02-21 05:07:01 +01:00
cketti
8e627834c1 Changed font size unit from DIP to SP
"Scale-independent Pixels - this is like the dp unit, but it is also
scaled by the user's font size preference. It is recommend you use this
unit when specifying font sizes, so they will be adjusted for both the
screen density and the user's preference." - Android Developer Docs
2012-01-12 02:18:41 +01:00
András Veres-Szentkirályi
1949067979 Removed unnecessary return statement 2011-12-26 02:28:30 +01:00
Jesse Vincent
a8ef6594ec Preserve header order (with the exception of duplicate headers like
"received" they all show up where the first one did
2011-11-15 00:00:42 -05:00
Jesse Vincent
12d1097a24 Big, scary massive "ant astyle" to get us back to something
approximating AOSP coding standards.
2011-02-06 17:09:48 -05:00
cketti
8279092070 Fixed lots of warnings (unused imports/variables, missing annotations, etc.) 2011-01-18 23:54:49 +00:00
Jesse Vincent
bd66315375 Visual cleanup of messageview. Clean up of icon display codepaths 2011-01-17 17:25:00 +00:00
Andrew Chen
a17c21f0cd Add null check in header view to prevent NPE. 2011-01-11 22:25:06 +00:00
Jesse Vincent
9d5704c0f5 Split the Header view out from the MessageView activity 2011-01-10 17:47:28 +00:00