2

I have created two href's which act like buttons, in a comic game. I am following this tutorial . The issue i have is the links are not clickable. They dont respond to touch, nothing happens when clicked.

Here is the project structure:

enter image description here

here is my styles.css:

  * {
    font-family: Verdana, Lucida Sans, Arial, Helvetica, sans-serif;
}

body {
    margin: 0px auto;
    background-color:#0a3003;
}

img {
    margin:0px;
    padding:0px;
    border:0px;
    width:100%;
    height:auto;
    display:block;
    float:left;

}

.btn {
  display: inline-block;
  padding: 15px 4% 15px 4%;
  margin-left: 1%;
  margin-right: 1%;
  margin-top: 5px;
  margin-bottom: 5px;
  font-size: 30px;
  text-align: center;
  vertical-align: middle;
  border: 0;
  color: #ffffff;
  background-color: #4b4237;
  width: 40%;
  height: 80px;
  text-decoration: none;
}

and now i'll show you the index.html where the button is not clickable from :

    <!DOCTYPE html>
<html>
<head>
    <meta name="viewport" content="width=device-width,user-scalable=no">
    <title>2nd Race</title>
    <link rel="stylesheet" href="lib/tau/wearable/theme/default/tau.min.css">
    <link rel="stylesheet" media="all and (-tizen-geometric-shape: circle)" href="lib/tau/wearable/theme/default/tau.circle.min.css">
    <!-- load theme file for your application -->
    <link rel="stylesheet" href="css/style.css">
</head>
<body>
    <div>
        <div>
        <img src="images/coverpage.png" alt="Cover Page"/>
        </div>
        <div>
            <a href="#" class="btn" >&lt;&lt;</a>
            <a href="comic/page1.html" class="btn" >&gt;&gt;</a>
        </div>

    </div>
    <script type="text/javascript" src="lib/tau/wearable/js/tau.min.js"></script>
    <script type="text/javascript" src="js/circle-helper.js"></script>
    <script src="app.js"></script>
    <script src="lowBatteryCheck.js"></script>
</body>
</html>

When i load the program onto the tizen wearable emulator it looks like this but nothing is clickable:

enter image description here

j2emanue
  • 60,549
  • 65
  • 286
  • 456

1 Answers1

0

In my opinion, if you want to move between pages with tau.js library, you need to follow their rule. Here is some reference guide.
https://developer.tizen.org/development/ui-practices/web-application/tau/hello-world#fill_content

Maybe this issue was appeared because you didn't define "page" of TAU.
It is very simple. Just insert class="ui-page" in root <div> tag.
I tested on my desktop with Tizen IDE. In your index.html,

<!DOCTYPE html>
<html>
  <head>
    <meta name="viewport" content="width=device-width,user-scalable=no">
    <title>2nd Race</title>
    <link rel="stylesheet" href="lib/tau/wearable/theme/default/tau.min.css">
    <link rel="stylesheet" media="all and (-tizen-geometric-shape: circle)" href="lib/tau/wearable/theme/default/tau.circle.min.css">
    <!-- load theme file for your application -->
    <link rel="stylesheet" href="css/style.css">
  </head>
  <body>
    <div class="ui-page">
      <div class="ui-content">
        <img src="images/coverpage.png" alt="Cover Page"/>
        <div>
          <a href="#" class="btn">&lt;&lt;</a>
          <a href="comic/page1.html" class="btn">&gt;&gt;</a>
        </div>
      </div>
    </div>
    <script type="text/javascript" src="lib/tau/wearable/js/tau.min.js"></script>
    <script type="text/javascript" src="js/circle-helper.js"></script>
    <script src="app.js"></script>
    <script src="lowBatteryCheck.js"></script>
  </body>
</html>

And on every other pages(comic/page1.html, page2.html... etc)

<!DOCTYPE html>
<html>
  <body>
    <div class="ui-page">
      <div class="ui-content">
        <img src="../images/page1.png" alt="Page 1" />
        <div>
          <a href="../index.html" class="btn" >&lt;&lt;</a>
          <a href="page2.html" class="btn" >&gt;&gt;</a>
        </div>
      </div>
    </div>
    <script type="text/javascript" src="../../lib/tau/wearable/js/tau.min.js"></script>
  </body>
</html>

Please try again with above my example.
I checked that project runs well now :)

Lucy
  • 1
  • 2