From 99fd8f1e69843005f60e16af25595c08484c73fa Mon Sep 17 00:00:00 2001 From: Mygod Date: Fri, 1 Jul 2016 12:56:42 +0800 Subject: [PATCH] Fix accessibility issue for title view --- src/main/scala/com/github/shadowsocks/Shadowsocks.scala | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/scala/com/github/shadowsocks/Shadowsocks.scala b/src/main/scala/com/github/shadowsocks/Shadowsocks.scala index f90b1212..f5f9725f 100644 --- a/src/main/scala/com/github/shadowsocks/Shadowsocks.scala +++ b/src/main/scala/com/github/shadowsocks/Shadowsocks.scala @@ -363,6 +363,8 @@ class Shadowsocks extends AppCompatActivity with ServiceBoundContext { field.setAccessible(true) val title = field.get(toolbar).asInstanceOf[TextView] title.setFocusable(true) + title.setGravity(0x10) + title.getLayoutParams.height = ViewGroup.LayoutParams.MATCH_PARENT; title.setOnClickListener(_ => startActivity(new Intent(this, classOf[ProfileManagerActivity]))) val typedArray = obtainStyledAttributes(Array(R.attr.selectableItemBackgroundBorderless)) title.setBackgroundResource(typedArray.getResourceId(0, 0))