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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T21:28:35+00:00 2026-05-30T21:28:35+00:00

I am having an xml file like this to show an analog clock on

  • 0

I am having an xml file like this to show an analog clock on left and also display the date and time to right of that. But the problem is that i am not getting the clock aligned to left most though i tried in many ways. How can I get the clock to left most

     <?xml version="1.0" encoding="utf-8"?>
   <LinearLayout android:orientation="vertical"   android:id="@+id/base_layout"             android:layout_width="fill_parent" android:layout_height="fill_parent"  android:background="@drawable/bgclock"    android:gravity="left"        android:layout_gravity="left"
 xmlns:android="http://schemas.android.com/apk/res/android">

       <LinearLayout 
    android:orientation="horizontal"     android:layout_marginLeft="0dip"   
    android:layout_width="fill_parent"  android:gravity="left"          android:layout_gravity="left"    
    android:layout_height="wrap_content">
        <LinearLayout   
            android:layout_weight="1 " 
            android:layout_height="fill_parent"   android:layout_marginLeft="0dip"   
            android:layout_width="fill_parent"   android:gravity="left" android:paddingLeft="0dip"  android:layout_gravity="left"
            android:orientation="vertical">


     <LinearLayout  android:layout_marginTop="36.0dip"   android:id="@+id/clock_layout"           android:layout_width="fill_parent"     android:layout_marginLeft="0dip"   android:layout_gravity="left"     android:paddingLeft="0dip" android:layout_height="192.0dip" >
   <custom.analog.clock.AnalogClock1 android:id="@+id/clock"  style="@style/clock"     android:gravity="left"       android:layout_marginLeft="0dip"      android:paddingLeft="0dip"    
    xmlns:android="http://schemas.android.com/apk/res/android" />



 </LinearLayout>

   </LinearLayout>

 <LinearLayout   

                android:layout_weight="1.25"
                android:layout_height="fill_parent"
                android:layout_width="fill_parent"
                android:orientation="vertical">

     <!-- 1.25 -->


       <TextView 
    android:id="@+id/textView2" android:layout_marginTop="76.0dip"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="Digital Clock"
    android:maxLength="12"
    android:textAppearance="?android:attr/textAppearanceLarge" />

  <DigitalClock
    android:id="@+id/
    digitalClock1"
    android:layout_width="wrap_content"  
    android:layout_height="wrap_content"
    android:text="DigitalClock" /> </LinearLayout>
   </LinearLayout>






       <LinearLayout 
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content">
    <Spinner 
    android:id="@+id/spinner"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:prompt="@string/planet_prompt"
/>

<Button
     android:id="@+id/calculate7"
    android:layout_width="280dip"
    android:layout_height="68dip"
    android:clickable="true"

    android:layout_centerHorizontal="true"
    android:layout_marginBottom="12dp"
    android:background="@drawable/button_gettime" />


  </LinearLayout>


       </LinearLayout>
  • 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-05-30T21:28:36+00:00Added an answer on May 30, 2026 at 9:28 pm

    From what I see, for custom.analog.clock.AnalogClock1 you only set the gravity to the left, the Layoutgravity should be “left”. Or you could just set the gravity(not only Layoutgravity) of clock_layout to “left”, that should align all its children to the left.

    P.S please format you xml code before copying it here(ctrl + shift + F).

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

Sidebar

Related Questions

I am having Msbuild XML file like this. <?xml version=1.0 encoding=utf-8?> <Project xmlns=schemas.microsoft.com/developer/msbuild/2003> <ItemGroup>
I have a sample xml file that looks like this: <Books> <Category Genre=Fiction BookName=book_name
i am having a xml file like this <ward> <pods> <name>Pod A</name> <direction>North</direction> <beds>
I have an XML file that looks like this: xml = '''<?xml version=1.0?> <root>
I'm using lxml to create an XML file from scratch; having a code like
I'm having an xml file like <Root> <Child val1=1 Val2=0/> <Child val1=1 Val2=2/> <Child
The watered-down version of the problem I'm having is this. For an XML file
i'm having an xml file like <Root> <Child Name=A /> </Root> i need to
I'm having an xml file like <Root> <Child val1=1 val2=2/> <Child val1=1 val2=3/> <Child
I'm having trouble editing an XML file. I'm currently trying to use Nokogiri ,

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.