Recent Updates Page 2 Toggle Comment Threads | Keyboard Shortcuts

  • marcozehe 10:41 pm on March 24, 2013 Permalink |  

    Hi there! I recently started using the Android app and notice some accessibility issues in the current 2.2.7 release. However, looking at the Trunk code, I found that this seems to be old news by now. The problems are mainly that there are missing contentDescription attributes on ImageButton elements. I created Ticket#454 and attached a first patch to give an idea. I noticed that some of the ImageButtons had a text attribute instead of contentDescription, which, if it was made for accessibility, does not yield the desired effect usually. Any hints or other feedback would be welcome!

    • Dan 3:18 pm on March 25, 2013 Permalink | Log in to Reply

      Hi! Looks like @willnorris answered your question in the ticket you created. Let us know if you need any more assistance. I do see some build warnings where we are missing a contentDescription still. I think it does it for every ImageView.

  • Dan 12:53 pm on March 15, 2013 Permalink |
    Tags: menu-drawer, orientation, tablet   

    @willnorris I may be doing this wrong, but I started looking at attaching a static menu drawer for x-large screen tablets when in landscape orientation. From what I could tell from the menu-drawer library, you have to reattach it in order to make it static or not.

    So I ended up adding this code when the orientation changes:

        public void onConfigurationChanged(Configuration newConfig) {
            if ((getResources().getConfiguration().screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK) == 4) {
                // on a x-large screen device
                View content = mMenuDrawer.getContentContainer().getChildAt(0);
                if (newConfig.orientation == Configuration.ORIENTATION_LANDSCAPE) {
                    mMenuDrawer = MenuDrawer.attach(this, MenuDrawer.MENU_DRAG_CONTENT, Position.LEFT, true);
                } else {
                    mMenuDrawer = MenuDrawer.attach(this, MenuDrawer.MENU_DRAG_CONTENT);

    Any ideas for a cleaner solution?

    • Will Norris 1:26 pm on March 15, 2013 Permalink | Log in to Reply

      how about add a check for screensize inside of createMenuDrawer(), and use that to determine if menu should be attached statically? Or is there something else I’m missing?

      • Dan 1:38 pm on March 15, 2013 Permalink | Log in to Reply

        Yeah, I have similar code in createMenuDrawer() as well but it will keep the drawer state after rotating. What I was trying to do was to mimic how the YouTube app will permanently show the menu drawer when the tablet is in landscape, but then hide it again if the device is rotated back to portrait.

      • Dan 3:29 pm on March 26, 2013 Permalink | Log in to Reply

        I went ahead and committed this in r1001.

  • Will Norris 2:59 pm on March 11, 2013 Permalink |  

    @danroundhill: I apologize for not asking you about this before I submitted r958, but I wanted to get your thoughts on moving activities (and related UI code) under a ‘ui’ package. My thinking was to put general purpose and base classes directly in the ui package, and then have sub packages under there for the main logical parts of the app… accounts, posts, prefs, reader, etc. r958 and r959 demonstrate the beginning of that.

    I know that a lot of these activities have more than just UI code in them, but that’s actually kind of the point. I’d like to eventually pull a lot of that network and business logic out of the activities so that it is more reusable (similar to what was very briefly started in #363).

    Since this involves moving a lot of code around, I wanted to double check with you before heading down this road.

    • Dan 8:58 am on March 12, 2013 Permalink | Log in to Reply

      No worries, I reviewed the commit and it all looks good. I tried to get better organization of the code going in 2.0 by adding the util and model packages, but even after that there’s still quite a bit left in the root.

      I also feel like we should rename some of the Classes so that you can better understand what it does by reading just the name. For example, we could put the type after the name so ‘Posts’ would become ‘PostsActivity’.

      • Will Norris 9:00 am on March 12, 2013 Permalink | Log in to Reply

        yep, completely agree about adding “Activity” suffix to class name where appropriate. I’ve done that on the new classes I created, and planned to do the same when I migrate others over to the new package.

        • Dan 10:17 am on March 12, 2013 Permalink | Log in to Reply

          And probably the fragments should be renamed to match up as well, e.g. ‘PostsListFragment’

      • Eric 11:39 am on March 12, 2013 Permalink | Log in to Reply

        +1 to this. I remember some of the comment class naming was a bit confusing.

  • Bhaktiratna Sadhu Maharaja 6:29 am on March 9, 2013 Permalink |
    Tags: notifications   

    When will be there be a Notification center in the Android app like the iOS app? I receive instant notifications on the iOS app for all new comments and posts but not on the Android app. Also iOS users can notifications of comments and posts of the blogs they follow. Will the Android app support than soon. Thanks.

  • Will Norris 8:04 pm on March 6, 2013 Permalink |  

    this afternoon, @danroundhill and I chatted briefly about a coding style guide for wp-android, and agreed to just use (or at least start with) the basic android style guide. For future code, I’ve gone ahead and added a project-specific java formatter based on that guide. For existing code, much of the changes can be pretty easily scripted. The one real downside is that doing mass changes to code like this tends to make tools like `svn blame` somewhat useless until other significant changes are made to the file. I’m personally okay with that (I figure the sooner the better), but wanted to check with others before I do any large commits of this type. Also, any changes people are working that haven’t yet checked in yet may be slightly disrupted; you’ll have to merge in these changes, since most every java file will be touched.

    • Dan 10:07 am on March 7, 2013 Permalink | Log in to Reply

      You can pretty much just blame me for most of the nasty code 🙂

      • Will Norris 10:11 am on March 7, 2013 Permalink | Log in to Reply

        actually `svn blame` is really useful for seeing when a particular line of code was last touched. I’ve been using it a lot as I read through code. It won’t be entirely useless though… you can always run blame on a previous version of the file.

        So does that mean you’re okay with going ahead with a mass style update?

  • Fathallah Wael 10:43 am on February 28, 2013 Permalink |  

    Hi figure out that WordPress android app it’s not supporting Arabic language so i download the code and i add the Arabic language but the problem that i don’t know how to contact the wordpress team to send my work

  • Will Norris 10:58 am on February 16, 2013 Permalink |  

    So I’ve just submitted the initial implementation of the menu drawer. It’s fully functional (with just a couple of minor exceptions), though will need lots of UI work. You’ll need to add android-menudrawer in order to build it (follow the same steps as you used for ActionBarSherlock).

    I haven’t touched the existing Dashboard menu yet, though I suspect I’ll remove that entirely and default to the Posts screen on initial launch (the same way the iOS app does). I also suspect that I’ll move the Quick Photo and Video buttons to the bottom, also similar to iOS. Anyway, give it spin and see what you think.

    • Dan 2:27 pm on February 17, 2013 Permalink | Log in to Reply

      This is sweet! I think this will work well. I noticed a few things:

      • The back history gets a little weird, I wonder if we should add an activity flag to clear the current activity after selecting a new one in the menu. This seems to be what the YouTube app does.
      • There’s a slight UI delay when you select a new activity from the sidebar. Maybe the new activity should be loaded before the menu animation slides it back in? I’ve seen that the Rdio app slides the current activity completely out of view before it slides the new one in (which looks really odd to me)
  • Will Norris 4:38 pm on February 15, 2013 Permalink |  

    I asked about it in chat earlier this week, but @ievolver wasn’t entirely sure… can we get rid of the GPL screen that is displayed on first launch? It’s meaningless to have an end user agree to the GPL, since it doesn’t apply to them at all (it’s not a EULA)… it applies to developers. And it’s not the best first experience for users to see a full screen of legal jargon.

    Besides, I think Android is the only app that does this (well, at least iOS doesn’t do it).

    @danroundhill: any objections?

    • Dan 4:44 pm on February 15, 2013 Permalink | Log in to Reply

      No objections, I think I added that way back based on Google’s guidelines to have some sort of EULA in there. But yeah it doesn’t really work to use the GPL for that.

  • Dan 8:55 am on February 15, 2013 Permalink |
    Tags: , json   

    While testing @kokejb‘s preview patch this week I came across an issue when parsing the blog options JSON that we are using in the app. After a bit of debugging, I think that the org.JSON library isn’t going to cut the mustard for our JSON needs. It doesn’t appear to be able to correctly parse objects within other objects. Using JSONObject.toString() for the map returned in the wp.getOptions call returns what should be an object as a string:

    {"software_version":"{value=3.6-alpha-23334, readonly=true, desc=Software Version}","blog_public":"{value=1, readonly=true, desc=Privacy access}","post_thumbnail":"{value=true, readonly=true, desc=Post Thumbnail}"}

    I discovered Gson this week which gives you the expected results:

    {"software_version":{"value":"3.6-alpha-23334","readonly":true,"desc":"Software Version"},"post_thumbnail":{"value":true,"readonly":true,"desc":"Post Thumbnail"},"blog_public":{"value":"1","readonly":true,"desc":"Privacy access"}}

    I think I will add the Gson library since it fixes the issue and will set us up for better JSON support in case we start using the Jetpack REST API in the app more in the future.

  • Alex Leonard 2:14 am on February 13, 2013 Permalink |
    Tags: , , instant upload   

    I’m in the process of moving out and took a photo of the chaos. A little while later I sat down at my laptop on a tea break. I checked Google+ and had a notification that I had an instant upload photo. I shared it (being that it’s nearly friction-less).

    I instantly thought, again, how wonderful it would be if it was my blog that was notifying me that there was a photo to share. I’d honestly much rather blog that stuff than G+ it but I keep on using the ‘easier’ option because, well, it’s easier!

    I did mention this before and I know it’s definitely not so simple to implement, but I think for both self-hosted and (consider that people may end up purchasing additional storage) it would be worth it.

    Obviously there’d be caution needed with privacy (strong obfuscation of instant upload img locations/filenames), and for self-hosted presumably there’d be a wide-range of issues.

    Does it sound even remotely feasible. Obviously this is beyond the bounds of just Android Dev, but I guess I’ve been on here the most so it seemed a good place to start the conversation.

    Now, back to packing!

    • Espen Klem 2:51 am on February 13, 2013 Permalink | Log in to Reply

      Great observation Alex!

    • Will Norris 9:11 am on February 13, 2013 Permalink | Log in to Reply

      yeah, I’ve actually had the same thought about having instant upload to my personal site. Both Dropbox and Facebook have added that to their Android apps in recent months, so it’s certainly technically doable.

      Though, for me, I’m not sure that I’d want every mobile photo I’ve ever taken living on my blog (whether I actually attach it to a post or not). I like the convenience of it, but would probably want a simple way to “clean up” all the random photos that I never blogged about. Interestingly, I don’t feel the same way about Dropbox… I can treat it as a dumping ground and not really worry about cleaning it up.

    • Dan 7:21 am on February 14, 2013 Permalink | Log in to Reply

      I’d use this feature, maybe after the UI update and notifications we can add this?

Compose new post
Next post/Next comment
Previous post/Previous comment
Show/Hide comments
Go to top
Go to login
Show/Hide help
shift + esc