{"action":"created","issue":{"url":"https://api.github.com/repos/47deg/macroid-extras/issues/33","labels_url":"https://api.github.com/repos/47deg/macroid-extras/issues/33/labels{/name}","comments_url":"https://api.github.com/repos/47deg/macroid-extras/issues/33/comments","events_url":"https://api.github.com/repos/47deg/macroid-extras/issues/33/events","html_url":"https://github.com/47deg/macroid-extras/issues/33","id":96455030,"number":33,"title":"How do we set attribute with question mark?","user":{"login":"wpoosanguansit","id":90733,"avatar_url":"https://avatars.githubusercontent.com/u/90733?v=3","gravatar_id":"","url":"https://api.github.com/users/wpoosanguansit","html_url":"https://github.com/wpoosanguansit","followers_url":"https://api.github.com/users/wpoosanguansit/followers","following_url":"https://api.github.com/users/wpoosanguansit/following{/other_user}","gists_url":"https://api.github.com/users/wpoosanguansit/gists{/gist_id}","starred_url":"https://api.github.com/users/wpoosanguansit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wpoosanguansit/subscriptions","organizations_url":"https://api.github.com/users/wpoosanguansit/orgs","repos_url":"https://api.github.com/users/wpoosanguansit/repos","events_url":"https://api.github.com/users/wpoosanguansit/events{/privacy}","received_events_url":"https://api.github.com/users/wpoosanguansit/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-07-22T01:54:55Z","updated_at":"2015-08-21T11:23:09Z","closed_at":null,"body":"Hi,\r\n\r\nI am looking through the code for example and I would appreciate if you can point me to any for setting the values as below:\r\n\r\n  //        android:layout_height=\"?attr/actionBarSize\"\r\n  //        android:background=\"?attr/colorPrimary\"\r\n  //        app:popupTheme=\"@style/ThemeOverlay.AppCompat.Light\"\r\n  //        app:layout_scrollFlags=\"scroll | enterAlways\" />\r\n\r\nSpecifically for ? and |.  Thanks for your help."},"comment":{"url":"https://api.github.com/repos/47deg/macroid-extras/issues/comments/133376407","html_url":"https://github.com/47deg/macroid-extras/issues/33#issuecomment-133376407","issue_url":"https://api.github.com/repos/47deg/macroid-extras/issues/33","id":133376407,"user":{"login":"wpoosanguansit","id":90733,"avatar_url":"https://avatars.githubusercontent.com/u/90733?v=3","gravatar_id":"","url":"https://api.github.com/users/wpoosanguansit","html_url":"https://github.com/wpoosanguansit","followers_url":"https://api.github.com/users/wpoosanguansit/followers","following_url":"https://api.github.com/users/wpoosanguansit/following{/other_user}","gists_url":"https://api.github.com/users/wpoosanguansit/gists{/gist_id}","starred_url":"https://api.github.com/users/wpoosanguansit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wpoosanguansit/subscriptions","organizations_url":"https://api.github.com/users/wpoosanguansit/orgs","repos_url":"https://api.github.com/users/wpoosanguansit/repos","events_url":"https://api.github.com/users/wpoosanguansit/events{/privacy}","received_events_url":"https://api.github.com/users/wpoosanguansit/received_events","type":"User","site_admin":false},"created_at":"2015-08-21T11:23:09Z","updated_at":"2015-08-21T11:23:09Z","body":"Thank you.\n\n\n> On Aug 21, 2015, at 4:32 AM, Javi Pacheco <notifications@github.com> wrote:\n> \n> @wpoosanguansit Sorry for delay\n> \n> I think that you want to change the ToolBar. We made the similar thing in Scala Days App, you can see the code here\n> \n> If you want to get the resourceId from an attribute you can use the next function:\n> \n> def attrId() = {\n>     val tv: TypedValue = new TypedValue\n>     contextWrapper.application.getTheme.resolveAttribute(android.R.attr.actionBarSize, tv, true)\n>     tv.resourceId\n>   }\n> It's very important the theme that you are using to find the appropriate resource. If you are using a different theme in your Activity, for example, you should use activityContextWrapper.getOriginal.getTheme. Remember, you are looking for an attribute in the selected theme\n> \n> I think that we can add this methods in ResourcesUtils in the next version of macroid-extras\n> \n> The last question about scroll and |, you can create a new Tweak like:\n> \n>   def scrollFlag(flags: Int) = Tweak[AppBarLayout] {\n>     view =>\n>       view.getLayoutParams match {\n>         case lp: AppBarLayout.LayoutParams =>\n>           lp.setScrollFlags(flags)\n>       }\n>   }\n> \n>   ....\n> \n>   toolbar <~ scrollFlag(AppBarLayout.LayoutParams.SCROLL_FLAG_SCROLL | AppBarLayout.LayoutParams.SCROLL_FLAG_ENTER_ALWAYS)\n> \n> I hope that this comment can help you. Please let me know if you have any questions\n> \n> —\n> Reply to this email directly or view it on GitHub.\n> \n"}}