Android Open Source - Dhamaschool Contact_fragment






From Project

Back to project page Dhamaschool.

License

The source code is released under:

Apache License

If you think the Android project Dhamaschool listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package group.ripple.dhamaschool;
//from ww w . j a v a2  s . com
import android.app.Fragment;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import butterknife.ButterKnife;
import butterknife.InjectView;

/**
 * Created by WaiLynnZaw on 12/14/14.
 */
public class Contact_fragment extends Fragment implements View.OnClickListener {
    @InjectView(R.id.contact_add)
    TextView tvAddress;
    @InjectView(R.id.contact_title)
    TextView tvTitle;
    @InjectView(R.id.ph1)
    TextView ph1;
    @InjectView(R.id.ph2)
    TextView ph2;
    @InjectView(R.id.ph3)
    TextView ph3;
    @InjectView(R.id.ph4)
    TextView ph4;
    @InjectView(R.id.ph5)
    TextView ph5;
    @InjectView(R.id.ph6)
    TextView ph6;
    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
       // return super.onCreateView(inflater, container, savedInstanceState);
        View v = inflater.inflate(R.layout.fragment_contact,container,false);
        ButterKnife.inject(this,v);
        tvTitle.setTypeface(Utils.mm(getActivity()));
        tvAddress.setTypeface(Utils.mm(getActivity()));
        tvTitle.setText("????????????????");
        tvAddress.setText("???????????????????? ???????????????????? ??????????????? ???????????????");
        ph1.setClickable(true);
        ph2.setClickable(true);
        ph3.setClickable(true);
        ph4.setClickable(true);
        ph5.setClickable(true);
        ph6.setClickable(true);

        ph1.setTypeface(Utils.mm(getActivity()));
        ph2.setTypeface(Utils.mm(getActivity()));
        ph3.setTypeface(Utils.mm(getActivity()));
        ph4.setTypeface(Utils.mm(getActivity()));
        ph5.setTypeface(Utils.mm(getActivity()));
        ph6.setTypeface(Utils.mm(getActivity()));

        ph1.setOnClickListener(this);
        ph2.setOnClickListener(this);
        ph3.setOnClickListener(this);
        ph4.setOnClickListener(this);
        ph5.setOnClickListener(this);
        ph6.setOnClickListener(this);

        ph1.setText("??????-??????????????????");
        ph2.setText("??????-?????????????????????");
        ph3.setText("??????-???????????????????????????");
        ph4.setText("??????-???????????????????????????");
        ph5.setText("??????-???????????????????????????");
        ph6.setText("??????-?????????????????????");

        return v;
    }

    @Override
    public void onClick(View v) {
        String number=null;
        switch(v.getId()){
            case R.id.ph1:
                number = "01377267";
                break;
            case R.id.ph2:
                number = "095098464";
                        break;
            case R.id.ph3:
                number = "09250166984";
                break;
            case R.id.ph4:
                number = "09448027619";
                break;
            case R.id.ph5:
                number = "09420008901";
                break;
            case R.id.ph6:
                number = "098578437";
                break;
        }
        Utils.PhoneCall(getActivity(),number);
    }
}




Java Source Code List

group.ripple.dhamaschool.About_Us_Fragment.java
group.ripple.dhamaschool.ApplicationTest.java
group.ripple.dhamaschool.BaseDAO.java
group.ripple.dhamaschool.Constant.java
group.ripple.dhamaschool.Contact_fragment.java
group.ripple.dhamaschool.DatabaseManager.java
group.ripple.dhamaschool.DetailActivity.java
group.ripple.dhamaschool.DetailPagerFB.java
group.ripple.dhamaschool.FacebookPage.java
group.ripple.dhamaschool.Home.java
group.ripple.dhamaschool.MainActivity.java
group.ripple.dhamaschool.NetworkListener.java
group.ripple.dhamaschool.NewsDao.java
group.ripple.dhamaschool.NewsObjAdapter.java
group.ripple.dhamaschool.NewsObj.java
group.ripple.dhamaschool.SplashActivity.java
group.ripple.dhamaschool.Utils.java
group.ripple.dhamaschool.WebViewActivity.java