Monday, November 7, 2016

Activity Intent(1)

မႂ်ႇသုင်ၶႃႈ တေႁူဝ်ႁႅၵ်ႈမၼ်း မိူဝ်ႈၼႆႉၶႃႈႁဝ်း Upload ပၼ် Clip Video ၼိူဝ် Youtube တွၼ်ႈတႃႇတေတႅမ်ႈ Application ဢၼ်ပဵၼ် Activity လႄႈ Intent ၶႃႈ ၶႂ်ႈယၢဝ်းဢိတ်းၼိုင်ႈ တေတၢင်ႇဝႆႉပဵၼ်သွင်တွၼ်ႈ ပဵၼ်လၢႆးပိုၼ်ႉၶၢမ်ႇၼၼ်ႉၵူၺ်း ၵွပ်ႈပိူဝ်ႈဝႃႈၶႃႈႁဝ်းၵေႃႈပဵၼ်ၽူႈလဵပ်ႈႁဵၼ်းၵေႃႉၼိုင်ႈၵူၺ်းၼင်ႇၵဝ်ႇ ယိူင်းဢၢၼ်းတေႉၶႂ်ႈႁႂ်ႈဢွၼ်ၵၼ်မႃးလဵၼ်ႈမႃးၶူင် Application မႂ်ႇမႂ်ႇ လၢႆးမၼ်းတေပဵၼ်ၸိူင်ႉႁိုဝ်ၼႆၵေႃႈ သိုပ်ႇတူၺ်းလႆႈတီႈ Youtube ဢၼ်ၶႃႈႁဝ်းတၢင်ႇဝႆႉၼၼ်ႉၶႃႈ။

Activity Intent(1) ၼႆႉပဵၼ်လွင်ႈၵၢၼ်တႅမ်ႈၶူတ်ႉမေးႁၢင်ႈလူင်းၼႂ်း xml file ၼိူဝ်ၼႃႈ layout ၼၼ်ႉၶႃႈ ၸိူင်ႉၼင်ႇ TextView Button လွင်ႈဢၢင်ႈဢိင် String ၸိူဝ်းၼၼ်ႉၶႃႈ။

ၼႆႉပဵၼ် files res /layout/activity_main.xml
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingBottom="@dimen/activity_vertical_margin"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    android:background="#ff0000"
    tools:context="com.kamjing.newintent.MainActivity" >

    <TextView
        android:id="@+id/textView1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentTop="true"
        android:layout_centerHorizontal="true"
        android:layout_marginTop="128dp"
        android:text="Activity One"
        android:textColor="#ffffff"
        android:textSize="30sp" />

    <Button
        android:id="@+id/btnClick"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerHorizontal="true"
        android:layout_centerVertical="true"
        android:text="@string/text_btn" />

</RelativeLayout>
*****

ၼႆႉပဵၼ် files res/layout/activity_two_layout.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="#ffcc00"
    android:orientation="vertical" >

    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent" >

        <TextView
            android:id="@+id/textView1"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentTop="true"
            android:layout_centerHorizontal="true"
            android:layout_marginTop="186dp"
            android:textSize="30sp"
            android:textColor="#009900"
            android:text="Activity Two" />

    </RelativeLayout>

</LinearLayout>
*****

တွၼ်ႈတႃႇလွင်ႈတႅမ်ႈၶူတ်ႉ Java မၼ်းၼၼ်ႉ ၶႃႈႁဝ်းတေ Up ပၼ်ၼႂ်းတွၼ်ႈသွင် Activity Intent(2) ပႂ်ႉသိုပ်ႇတၢမ်တူၺ်းထႅင်ႈၶႃႈ။

No comments:

Post a Comment