def init_widget(self):
        """ Initialize the underlying widget.

        """
        super(AndroidRatingBar, self).init_widget()
        d = self.declaration
        self.set_rating(d.rating)
        w = self.widget
        w.setOnRatingBarChangeListener(w.getId())
        w.onRatingChanged.connect(self.on_rating_changed)