Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8384019
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T17:18:31+00:00 2026-06-09T17:18:31+00:00

I have a view which include another one with the include component (see http://android-developers.blogspot.com/2009/02/android-layout-tricks-2-reusing-layouts.html

  • 0

I have a view which include another one with the “include” component (see http://android-developers.blogspot.com/2009/02/android-layout-tricks-2-reusing-layouts.html)
There is some EditText inside the included view.

There is some problems with these EditText :

  • I have to tap them 2 times in order to have the keyboard to appear
  • if I long press one of the EditText the app freeze and crash (only on my phone – Samsung galaxy S, not on the emulator)

It does not happen if the Edittext are NOT in a <include> tag …
Do you have any ideas on this problem ??

regards,
Christophe

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T17:18:32+00:00Added an answer on June 9, 2026 at 5:18 pm

    I have the same problem about long click EditText or TextView crash on Samsung device with Android 4.0 up.

    The crash log in here

    java.lang.ArithmeticException: divide by zero
    at android.widget.TextView$SelectionActionModeCallback.onCreateActionMode(TextView.java:10647)
    at com.android.internal.policy.impl.PhoneWindow$DecorView.startActionMode(PhoneWindow.java:2382)
    at com.android.internal.policy.impl.PhoneWindow$DecorView.startActionModeForChild(PhoneWindow.java:2322)
    at android.view.ViewGroup.startActionModeForChild(ViewGroup.java:571)
    at android.view.ViewGroup.startActionModeForChild(ViewGroup.java:571)
    at android.view.ViewGroup.startActionModeForChild(ViewGroup.java:571)
    at android.view.ViewGroup.startActionModeForChild(ViewGroup.java:571)
    at android.view.ViewGroup.startActionModeForChild(ViewGroup.java:571)
    at android.view.ViewGroup.startActionModeForChild(ViewGroup.java:571)
    at android.view.ViewGroup.startActionModeForChild(ViewGroup.java:571)
    at android.view.View.startActionMode(View.java:3687)
    at android.widget.TextView.startSelectionActionMode(TextView.java:10451)
    at android.widget.TextView.performLongClick(TextView.java:9570)
    at android.view.View$CheckForLongPress.run(View.java:14241)
    at android.os.Handler.handleCallback(Handler.java:605)
    at android.os.Handler.dispatchMessage(Handler.java:92)
    at android.os.Looper.loop(Looper.java:137)
    at android.app.ActivityThread.main(ActivityThread.java:4507)
    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:790)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:557)
    at dalvik.system.NativeStart.main(Native Method)
    @Dumpstate > dumpstate -k -t -n -z -d -o /data/log/dumpstate_app_error
    

    It’s because when you long click on text, samsung system will select text to highlight
    and use onCreateActionMode() to show cut, copy, paste etc button.

    If you are in Android 4.0 up,
    it will show on ActionBar and use the ActionBar theme style in your app’s style.xml.
    And I found my

    "@android:style/Widget.Holo.ActionButton"
    

    set minWidth to zero,
    cause samsung system calculate action button position resulted

    java.lang.ArithmeticException: divide by zero
    

    Finally set minWidth to not zero, the problem solved.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two activities one displaying map view and another listview, the main objective
In my CodeIgniter application have a common header and footer view, which I include
I have a JSF/RichFaces setup with an index.jsp which a4j:include s another piece of
I have one button in the main.xml which will link to another xml which
I have a main view with a menu which helps me display another view.
I have a detail view that includes three UIButtons, each of which pushes a
I have view on which I defined a custom tagName. I need to be
i have view controller which contains a button which show the image library ,if
I have a view which I would like to fill up the entire screen
I have a view which has two labels. When I swipe left I fill

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.