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 8588845
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T22:54:12+00:00 2026-06-11T22:54:12+00:00

I am using following layout: <?xml version=1.0 encoding=utf-8?> <RelativeLayout xmlns:android=http://schemas.android.com/apk/res/android android:layout_width=match_parent android:layout_height=match_parent android:layout_gravity=center_horizontal android:gravity=center_horizontal

  • 0

I am using following layout:

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:layout_gravity="center_horizontal"
    android:gravity="center_horizontal"
    android:orientation="vertical" >
<DatePicker
        android:id="@+id/datePicker"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerHorizontal="true"
        android:layout_gravity="center_horizontal"
        android:layout_marginBottom="2dp"
        android:layout_marginTop="2dp"
        android:nextFocusRight="@+id/timePicker"
        android:nextFocusDown="@+id/timePicker" />
 <TimePicker
        android:id="@+id/timePicker"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_below="@id/datePicker"
        android:layout_centerHorizontal="true"
        android:layout_centerVertical="true"
        android:layout_gravity="center_horizontal"
        android:layout_marginBottom="2dp"
        android:layout_marginTop="2dp"
        android:nextFocusLeft="@+id/datePicker"
        android:nextFocusUp="@+id/datePicker" />
 <Button
        android:id="@+id/button1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_below="@id/timePicker"
        android:layout_centerHorizontal="true"
        android:layout_gravity="center_horizontal"
        android:layout_marginBottom="0dp"
        android:layout_marginTop="2dp"
        android:text="@string/button1" />
</RelativeLayout>

I am trying to get to the next view with

android:nextFocusRight="@+id/timePicker"
android:nextFocusDown="@+id/timePicker"

But this doesn’t work. When I start in the DatePicker and click next, I get a wrong view, with a normal keyboad layout.

Can anybody help?

  • 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-11T22:54:13+00:00Added an answer on June 11, 2026 at 10:54 pm

    I believe all you need to do is add the following to all views you want to take focus:

    android:focusable="true"
    

    Per Documentation:

    Focus Handling

    The framework will handle routine focus movement in response to user
    input. This includes changing the focus as views are removed or
    hidden, or as new views become available. Views indicate their
    willingness to take focus through the isFocusable() method
    .


    isFocusable()

    Returns whether this View is able to take focus.

    Related XML Attributes
    android:focusable

    Returns
    True if this view can take focus, or false otherwise.

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

Sidebar

Related Questions

I am dynamically inflating following xml <?xml version=1.0 encoding=utf-8?> <RelativeLayout xmlns:android=http://schemas.android.com/apk/res/android android:layout_width=wrap_content android:layout_height=wrap_content android:layout_margin=10dip
I have the following the layout file <?xml version=1.0 encoding=utf-8?> <RelativeLayout xmlns:android=http://schemas.android.com/apk/res/android xmlns:app=http://schemas.android.com/apk/res/com.company android:layout_width=fill_parent
I have the following layout for my ImageView : <?xml version=1.0 encoding=utf-8?> <LinearLayout xmlns:android=http://schemas.android.com/apk/res/android
Hi all I have created layout using following code <?xml version=1.0 encoding=utf-8?> <LinearLayout xmlns:android=http://schemas.android.com/apk/res/android
I am using the following xml layout for my custom adapter. <?xml version=1.0 encoding=utf-8?>
I am using following layout for my list view items. <?xml version=1.0 encoding=utf-8?> <TextView
I have the following XML layout in my android application, using ScrollView: <?xml version=1.0
I am using the following layout in my Activity which extends MapActivity: <?xml version=1.0
All, I have the following in my string resource xml file. <?xml version=1.0 encoding=utf-8?>
I'm using a TextView element with following layout settings <TextView android:layout_width=fill_parent android:layout_height=wrap_content android:maxLines=1 android:lines=1

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.