How do i make a widget?

Discussion in 'iOS Themes and Customization' started by Pablojrz, Aug 20, 2009.

  1. Pablojrz

    Pablojrz New Member

    Joined:
    Jul 26, 2009
    Messages:
    206
    Likes Received:
    0
    Device:
    2G iPod touch
    I need to make a clock widget to go in the corner of the screen for my new theme.

    im having trouble even finding how to make a widget.

    any help?
  2. Tommm

    Tommm Member

    Joined:
    Jul 14, 2009
    Messages:
    752
    Likes Received:
    0
    Device:
    4G iPod touch
    There done in HTML and JavaScript.

    Make a file called background.html and add your current background.png to it. Something like this
    Code:
    <html>
     <head>
     </head>
     <body style="background: url('background.png'); margin: 0px;">
      
     </body>
    </html>
    
    Then inside the body tags you need to add a clock widget.
    You can get the source for a JavaScript clock here.
  3. Axis

    Axis Super Moderator Staff Member

    Joined:
    Dec 2, 2007
    Messages:
    6,288
    Likes Received:
    133
    Device:
    iPhone 4S (White)
    I don't know much about making Widgets specifically, but better HTML practice (short of linking an external CSS file) would be:

    Code:
    <html>
     <head>
     <style>
      body {
       background-image: url('background.png');
       margin: 0px;
    }
    
     </style>
     </head>
    
     <body>
    
     </body>
    
    </html>
    
    I don't know if there are even different elements in the HTML of widgets, so that may be completely unnecessary.
  4. iKeablr

    iKeablr Active Member

    Joined:
    Mar 18, 2008
    Messages:
    1,535
    Likes Received:
    1
    Device:
    iPhone 4 (Black)
    Well making a widget takes more time for somebody who has no experience with HTML or javascript. First you would have to know the language and then you would have to make the codes yourself. That may take some time (Long time if you have troubles understanding the language). I would highly suggest you use a previous widget and modify to your liking instead of making a new one. Though it seems like you have no idea what to do. So modifying it on your own without no help would also take some time. So, all I can say is either try and figure it out on your own, or have someone who knows the language to either help you or do it for you. I myself can't help you just for the plain fact that, I have helped people before and well they just relied on me to do everything for them.

Share This Page