Was able to solve my problem by doing this
protected void onCreate()
{
//some code
calendar = Calendar.getInstance();
mHandler.post(myRun);
}
private Runnable myRun = new Runnable(){
public void run(){
dClock.setText(formattedTime());
mHandler.postDelayed(this, 1000);
}
};
This method of getting time was somewhat wrong (I think its only getting the value from the calendar instance the time the Calendar instance was initialized), which in turn, even though the Runnable is working properly, the textview does not seem to update because the value was the same and never changes
public String formattedTime(){
return (new SimpleDateFormat("hh:mm:ss a").format(calendar.getTime()) + " ").toString();
}
While this one, does update with the postDelayed function (Getting a new calendar Instance everytime)
public String formattedTime(){
return (new SimpleDateFormat("hh:mm:ss a").format(Calendar.getInstance().getTime()) + " ").toString();
}
I know there is a Digital Clock Widget that can be added to the view, but I wanted something that I can personally manipulate at will (without adding additional Classes), Thanks for the Answers!