Google pre-launch report - Multiple items have the same description - android

Google now provides a 'Pre-Launch Report' when a new Beta version of an app is uploaded to the Play Store. My last Pre-Launch reports contained a complete dialog full of 'Multiple items have the same description'. I have now found out what, in my case, caused the problem and my solution. A simplified layout for my dialog that still showed the problem is the following:
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="fill_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:id="#+id/displayHeightLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:id="#+id/displayHeightLbl"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ems="#string/displayInfoEms"
android:labelFor="#id/displayHeight"
android:text="#string/displayHeightLbl" />
<TextView
android:id="#+id/displayHeight"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ems="#string/displayInfoEms" />
</LinearLayout>
<Button
android:id="#+id/displayInfoOkBtn"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:onClick="dismissDisplayInfos"
android:text="#string/btnOk" />
</LinearLayout>
</ScrollView>
Google documentation suggested installing TalkBack and Accessibility Scanner, which enabled me to test and reproduce the problem. The solution is documented below.

The solution lay in adding
android:importantForAccessibility="no"
to the definition of the second TextView, as follows:
<TextView
android:id="#+id/displayHeight"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:importantForAccessibility="no"
android:ems="#string/displayInfoEms" />
I assume that the reason for the report is that the first TextView contains an android:labelFor attribute, referring to the second TextView, and that the Accessibility Scanner looks at both and thinks that the descriptions are the same. Is this a bug in the Accessibility Scanner?

Related

ExpandableCardView Text Not Fully Visible

I am using this library to achieve expandable cards and it works fine except for two major concerns viz:
It requires the min api level to be 21 and previously my min api level was 16. Will this work well on lower devices. There's an option to override this in the library's manifest file but I don't think it's a good idea.
I have layout like below which contains another layout with a textview but the text is not showing fully, only the first line is visible. Here's the layout:
<com.alespero.expandablecardview.ExpandableCardView
android:id="#+id/focusCardLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/metaCard"
android:layout_marginBottom="10dp"
app:expandOnClick="true"
app:inner_view="#layout/session_inner_card_focus_pts_layout"
app:title="Focus Points" />
and the inner_view layout:
<?xml version="1.0" encoding="utf-8"?>
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
xmlns:tools="http://schemas.android.com/tools"
android:id="#+id/focusPointsTV"
android:layout_margin="5dp"
android:layout_marginBottom="10dp"
android:text="You cannot win matches without scoring points so it's important your players can shoot accurately."
android:textSize="18sp"
android:padding="10dp">
</TextView>
Is this a fault in my layout or the library. I have set input_type to short/long message, still no effect.
Is there other means of expanding-collapsing cardviews android? Thanks.
I tried your code, and I think your issue come from the library.
I know a lib that resolve your issue as well, that is this library
<!-- sample xml -->
<com.ms.square.android.expandabletextview.ExpandableTextView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:expandableTextView="http://schemas.android.com/apk/res-auto"
android:id="#+id/expand_text_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
expandableTextView:maxCollapsedLines="4"
expandableTextView:animDuration="200">
<TextView
android:id="#id/expandable_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:textSize="16sp"
android:textColor="#666666" />
<ImageButton
android:id="#id/expand_collapse"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="16dp"
android:layout_gravity="right|bottom"
android:background="#android:color/transparent"/>
</com.ms.square.android.expandabletextview.ExpandableTextView>
It's work for me and I hope it will help you too.

Why is my android app only show up in playstore when using quotation marks "titleOfApp"?

Hello my favorite community.
Maybe someone has the answer out there
I recently put my first app to the play store market and after a couple of hours it appears there. But the thing is the first days i did not recognized that it was already on the market caused by the problem i cant find it. So i taught i need to update it to another version by adding some language support stuff.
After found a hint on this lovely board that some apps will only appear in search query by put the app name into quotation marks. But why is that and do somebody know how i should change the name of the app to get a better search result.
i already changed from Camel Case Notation "myAppTitle" to "my app title" but this was not really a solution for my problem.
moreover i had the same issue like many others with some android devices. my app seems to run on almost 70% of the devices (since android v14) but on some devices that exception raises:
viewrootimpl senduseractionevent() mview == null
some people have same problems almost with samsung devices...an answer i found was that samsung has an special android layer for touch wizard. but how to work arround that problem?
Thanks in advanced.
here an excerpt from the layout which causes this problem..
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="#+id/TableLayout1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="horizontal" >
<!-- ROW -->
<TableRow
android:id="#+id/tableRow1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="0.15" >
<TextView
android:id="#+id/textView__game_title"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="#color/black"
android:gravity="center"
android:text="anyText"
android:textColor="#ffffff"
android:textSize="20sp" />
</TableRow>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="0.5"
android:orientation="vertical" >
<TextView
android:id="#+id/textView__game_word1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1"
android:background="#color/yellow"
android:gravity="center"
android:onClick="onClick"
android:text="anyText?"
android:textSize="35sp" />
<TextView
android:id="#+id/textView__game_word2"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1"
android:background="#color/red"
android:gravity="center"
android:onClick="onClick"
android:text="anyText?"
android:textSize="35sp" />
<TextView
android:id="#+id/textView__game_word3"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1"
android:background="#color/blue"
android:gravity="center"
android:onClick="onClick"
android:text="anytext?"
android:textSize="35sp" />
</LinearLayout>
<TableRow
android:id="#+id/tableRow3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="0.15" >
<TextView
android:id="#+id/textView__game_score"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1"
android:background="#android:color/black"
android:gravity="center|left"
android:paddingLeft="15dp"
android:text="Score:\n0"
android:textColor="#ffffff"
android:textSize="20sp" />
<TextView
android:id="#+id/textView__game_round"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1"
android:background="#android:color/black"
android:gravity="center|right"
android:paddingRight="15dp"
android:text="Round:\n 0 of 100"
android:textColor="#ffffff"
android:textSize="20sp" />
</TableRow>
</TableLayout>
Since you app is new, Google Play will only show top results, that's why you have trouble finding your app. If your app download count have raised to thousand or more, it will more easy to be search by others.
I found a solution for my above explained problems.
First, the layout problem and the message:
"viewrootimpl senduseractionevent() mview == null"
is easily solved by changing the layout to a Linear Layout. Moreover I changed from TextViews to Buttons that solved the issue why my app did not funtcion correctly on 30% of all android devices like samsung galaxy s3 and so on.
These devices had a problem with onClicks on Textviews and therefore by using Buttons the problem was fixed.
The viewrootimpl... is still null but do not have any influence to the behaviour of my app...like in many other post u can just ignore this log output.
Second, the reason why my app is not visible by using the search funtcion in google play market without the use of "myapp title" is the internal ranking of apps made by google.
The ranking of apps in play store depends on different factors. One is the ratings made by users. But one crucial factor is the ranking by keywords used in app title.
If you use frequent used keywords in your app title then your app would be easily found, but if you use an app title which do not contains any keyword, your app will only be found by using quoation marks.
So I changed my app title by adding some keywords at the end and after updating it to the play store, i immediately found my app by using the search function of the market.
Hopefully, this post will help others which struggle with the same problems.
Good Luck

Possible reason for listview not displaying on Android 4.0.3 (API 15) but works fine on 4.1.2 (API 16)?

I am tasked with determining why a 5 year old app (worked on by a few teams) that supports API 8 through API 19 only has this particular issue with API 15.
The issue is the app is not displaying any data in it's 2 ListViews.
A few details:
There are no errors reported in logcat. I run the app on both API 15 and API 16 emulators and their logcats look almost identical.
Calling listview.getAdapter().getCount() does return an expected value greater than 0.
(UPDATE)
3. listview.getItem() and listview.getView() are NOT being called.
listview.getVisibility() does return View.VISIBLE
Oddly, backing out of the app and restarting it, allows the data to display(!)
I have searched for several days now on what could be the cause of this working fine on API 16, as in "what was fixed" between 15 and 16, but nothing that makes sense showed up. I have been shy to ask here due to this making me sound crazy :-)
I'm hoping someone has encountered this with 4.0.3 and can give me my next path to solve this. Posting code will be very difficult, but any reasonable requests will be happily complied with. Thanks!
No one is going to believe me ;-), but the fix was to remove:
android:animateLayoutChanges="true"
...from a LinearLayout in the app's main layout file (which contains a support ViewPager and whose root was a TabHost, not that those necessarily matter).
I couldn't believe this myself, so I replaced and removed it a couple of times and it would alternate between "breaking" and "working".
I have no idea why this worked, but I've listed the .xml file here
<?xml version="1.0" encoding="utf-8"?>
<TabHost xmlns:android="http://schemas.android.com/apk/res/android"
android:id="#android:id/tabhost"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#color/aim_light_grey" >
<!-- android:animateLayoutChanges below was the problem!!! -->
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:baselineAligned="false"
android:animateLayoutChanges="true"
android:orientation="vertical">
<LinearLayout
android:id="#+id/no_network_indicator"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center" >
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#drawable/warn_gray" />
<TextView
android:id="#+id/tv_not_connected"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:background="#color/light_grey"
android:paddingBottom="3dp"
android:paddingTop="3dp"
android:text="#string/not_connected"
android:textSize="14sp" />
</LinearLayout>
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="44dip"
android:layout_weight="0"
android:background="#color/blue"
android:visibility="gone" >
<ImageView
android:id="#+id/logo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:contentDescription="#string/image_logo_accessibility_description"
android:src="#drawable/action_1" />
<TabWidget
android:id="#android:id/tabs"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true" />
</RelativeLayout>
<FrameLayout
android:id="#android:id/tabcontent"
android:layout_width="fill_parent"
android:layout_height="0dp"
android:layout_weight="1" >
<android.support.v4.view.ViewPager
android:id="#+id/viewpager"
android:layout_width="fill_parent"
android:layout_height="fill_parent" />
</FrameLayout>
</LinearLayout>
</TabHost>

Cannot get custom notification to work Android 2.3.3

I am trying to get a custom notification to work and although I have no issues with android 4.0 and upwards, I cannot get it to work correctly in 2.3.3 (API v10). Below is the result that I have:
As you can see the text is not visible, neither is the progress bar.
Below is the XML used for the RemoteView:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="#+id/ongoing_notif_layout"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:padding="10dp" >
<ImageView android:id="#+id/ongoing_notif_image"
android:contentDescription="#string/notif_contentDesc"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:layout_alignParentLeft="true"
android:layout_marginRight="10dp"
android:textAppearance = "#android:style/TextAppearance.StatusBar.EventContent" />/>
<TextView android:id="#+id/ongoing_notif_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="#id/ongoing_notif_image"
android:textAppearance = "#android:style/TextAppearance.StatusBar.EventContent" />
<TextView android:id="#+id/ongoing_notif_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="#id/ongoing_notif_image"
android:layout_below="#id/ongoing_notif_title"
android:textAppearance = "#android:style/TextAppearance.StatusBar.EventContent" />
<ProgressBar
android:id="#+id/ongoing_notif_pgStatus"
style="?android:attr/progressBarStyleHorizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="#id/ongoing_notif_text"
android:layout_toRightOf="#id/ongoing_notif_image"
android:textAppearance = "#android:style/TextAppearance.StatusBar.EventContent" /> />
</RelativeLayout>
I have added the 'android:textApprearance' after following this suggestion stackoverflow item
Still no success though. Please note that this works fine on Android 4.0 upwards.
After spending many hours searching for it, I found the solution in another stackoverflow question and I though that I will post it here in case someone else comes across this question. The answer is here and is caused by a bug in the support library as shown here.

Android TextView top image not rendering properly on 2.3

When I run my android application in Android version >=4 I got this out put(I didn't tested in android version 3):
When run the same application in android version 2.3 I got a bit different output:
You can see in second screenshot the image for about button is not visible. But when I try run the same application several times on 2.3 some times I got about image visible.Here is my code :
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<include layout="#layout/actionbar_with_right_button" />
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:scrollbars="none" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center"
android:orientation="vertical" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clickable="true"
android:drawablePadding="#dimen/settings_text_view_drawable_padding"
android:drawableTop="#drawable/snooze_button"
android:gravity="center"
android:onClick="showRemainderSnoozeSettings"
android:padding="#dimen/settings_text_view_padding"
android:text="#string/snooze" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clickable="true"
android:drawablePadding="#dimen/settings_text_view_drawable_padding"
android:drawableTop="#drawable/help_button"
android:gravity="center"
android:onClick="showFaq"
android:padding="#dimen/settings_text_view_padding"
android:text="#string/help" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clickable="true"
android:drawablePadding="#dimen/settings_text_view_drawable_padding"
android:drawableTop="#drawable/about_button"
android:gravity="center"
android:onClick="showAbout"
android:padding="#dimen/settings_text_view_padding"
android:text="#string/about" />
</LinearLayout>
</ScrollView>
I didn't understand why this is happening.
Can anyone help me to solve this issue.
Edit :
One more important thing I forgot to mention when I changed android:drawableTop="#drawable/about_button" to android:drawableTop="#drawable/help_button" of about TextView. It worked perfectly. So it can be an issue of my about_button image. So I recreated the about image again and put in all drawable folder. Even after that also I didn't get any +ve result. This issue only in 2.3 or less.
Thanks
May this help you:
Seems like this is a bug with android, where sometimes the first image in the drawable folder doesn't get displayed.....
I had a similar bug - a particular drawable was not being displayed, no matter in what ImageView. So I Added a dummy image called aaaa.png to the drawable folder and problem was solved....

Categories

Resources