Hi, can someone help me in my small project, please, I am following this tutorial and I got to the part where I insert 1 minute into EditText. The progress bar works fine 1 Progress per second, but when I add more than 1 minute to the EditText the Progress indicator does not work. This is not coming, please help?
main.xml
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/LinearLayout1" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" android:background="#086A87"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:gravity="center" android:orientation="horizontal" android:padding="10dp" > <EditText android:id="@+id/edtTimerValue" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" android:ems="10" android:hint="minutes" android:inputType="phone" /> <Button android:id="@+id/btnStartTime" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_margin="5dp" android:layout_weight="2" android:gravity="center" android:text="Start Timer" android:background="@drawable/custombuttongreen" android:textColor="#fff"/> <Button android:id="@+id/btnStopTime" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_margin="5dp" android:layout_weight="2" android:gravity="center" android:text="Stop Timer" android:visibility="gone" android:background="@drawable/custombuttongreen" android:textColor="#fff"/> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:gravity="center" android:orientation="vertical" > </LinearLayout> <RelativeLayout android:layout_width="wrap_content" android:layout_height="wrap_content" > <ProgressBar android:id="@+id/progressbar" android:layout_width="350dip" android:layout_height="350dip" android:indeterminate="false" android:progressDrawable="@drawable/circle" android:background="@drawable/circle_shape" style="?android:attr/progressBarStyleHorizontal" android:max="60" android:progress="0" /> <TextView android:id="@+id/tvTimeCount" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerHorizontal="true" android:layout_centerVertical="true" android:text="00:00" android:textColor="#fff" android:textSize="60dip"/> </RelativeLayout>
MainActivity.java
package com.tag.countdowntimer; import com.tag.countdowntimer.R.drawable; import android.R.color; import android.app.Activity; import android.content.Context; import android.os.Bundle; import android.os.CountDownTimer; import android.view.View; import android.view.View.OnClickListener; import android.view.inputmethod.InputMethodManager; import android.widget.Button; import android.widget.EditText; import android.widget.ProgressBar; import android.widget.TextView; import android.widget.Toast; public class MainActivity extends Activity implements OnClickListener { int i=-1; ProgressBar mProgressBar; private Button buttonStartTime, buttonStopTime; private EditText edtTimerValue; private TextView textViewShowTime;
Normal timer status

At the entrance in 1 minute

When I entered 3 minutes

Progress bar not counting
android timer progress countdown
Nazmul Hasan
source share