clock

এই পর্বে আমরা দেখবো কিভাবে আমাদের অ্যাপের ভিতর এনালগ এবং ডিজিটাল ঘড়ি দেখাতে পারি । ঠিক এরকম -

তো চলুন লেআউট ডিজাইন করে ফেলি 😊😊😊

activity_main.xml -

 <?xml version="1.0" encoding="utf-8"?>  
 <LinearLayout  
   xmlns:android="http://schemas.android.com/apk/res/android"  
   xmlns:app="http://schemas.android.com/apk/res-auto"  
   xmlns:tools="http://schemas.android.com/tools"  
   android:layout_width="match_parent"  
   android:layout_height="match_parent"  
   android:orientation="vertical"  
   tools:context="com.example.user.learnfromyoutube.MainActivity">  
   <TextClock  
     android:id="@+id/textClock"  
     android:layout_width="match_parent"  
     android:layout_height="wrap_content"  
     android:textSize="40sp"  
     android:textColor="@color/colorAccent"  
     android:textStyle="bold"/>  
   <AnalogClock  
     android:layout_width="wrap_content"  
     android:layout_height="wrap_content" />  
 </LinearLayout>  

২টি ঘড়ির ভিউই নিয়ে নিলাম ।

এবার অ্যাপটি রান করলেই ঘড়ি ২টি দেখতে পাবেন । আর কিছু করতে হবে নাহ 😊

মন্তব্যসমূহ

এই ব্লগটি থেকে জনপ্রিয় পোস্টগুলি

Toggle Button - 10 ( Android Bangla Tutorial)

Spinner View - 11 ( Android Bangla Tutorial)

ImageView ( Android Bangla Tutorial - )