Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <LinearLayout
- android:id="@+id/figura"
- android:text="COLOR"
- android:textColor="@android:color/black"
- android:textSize="20dp"
- android:orientation="vertical"
- android:layout_width="match_parent"
- android:layout_height="150dp"
- android:visibility="visible"
- android:background="@android:color/holo_green_dark">
- </LinearLayout
- <texview
- android:id="@+id/reloj"
- android:text="i"
- android:layout_width="match_parent"
- android:layout_height="200dp"/>
- @Override
- public int onStartCommand(Intent intent, int flags, int startId) {
- super.onStartCommand(intent, flags, startId);
- if(workerThread == null || !workerThread.isAlive()){
- workerThread = new Thread(new Runnable() {
- public void run() {
- for (int i = 1; i>0; i++){
- try{
- Thread.sleep( 30000 );
- }catch (Exception e){
- e.printStackTrace();
- }
- // layout.figura.background=(FF00FF00FF)
- // layout.setVisibility(figura.INVISIBLE);
- }
- });
- workerThread.start();
- }
- return START_STICKY;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement