-
-
Save pacificregmi/592f0f45601a0d62f490 to your computer and use it in GitHub Desktop.
Dashboard UI Design for Android App - DashboardForAndroidApp.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Dashboard/FrontPage XML UI Design For Android App and Game with Source Code | |
package viralandroid.com.androidxmluserinterfacetutorial; | |
import android.os.Bundle; | |
import android.os.Handler; | |
import android.support.v7.app.AppCompatActivity; | |
import android.widget.ProgressBar; | |
import android.widget.TextView; | |
public class DashboardForAndroidApp extends AppCompatActivity { | |
ProgressBar myprogressBar; | |
TextView progressingTextView; | |
Handler progressHandler = new Handler(); | |
int i = 0; | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.dashboard_xml_ui_design); | |
myprogressBar = (ProgressBar) findViewById(R.id.progressBar); | |
progressingTextView = (TextView) findViewById(R.id.progress_circle_text); | |
new Thread(new Runnable() { | |
public void run() { | |
while (i < 100) { | |
i += 2; | |
progressHandler.post(new Runnable() { | |
public void run() { | |
myprogressBar.setProgress(i); | |
progressingTextView.setText("" + i + " %"); | |
} | |
}); | |
try { | |
Thread.sleep(300); | |
} catch (InterruptedException e) { | |
e.printStackTrace(); | |
} | |
} | |
} | |
}).start(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment