Android Open Source - Android_Yellow_Pages_App_TDD Detail Fragment






From Project

Back to project page Android_Yellow_Pages_App_TDD.

License

The source code is released under:

Apache License

If you think the Android project Android_Yellow_Pages_App_TDD 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 com.tddrampup.fragments;
/*from  w  w w. ja  v  a 2 s.  c  o m*/
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.tddrampup.R;
import com.tddrampup.models.Listing;

import roboguice.fragment.RoboFragment;

/**
 * Created by WX009-PC on 2/21/14.
 */
public class DetailFragment extends RoboFragment {

    private Listing mListing;
    private TextView nameTextView;
    private TextView locationTextView;
    private TextView websiteTextView;

    public DetailFragment(Listing listing) {
        mListing = listing;
    }

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {

        View rootView = inflater.inflate(R.layout.detail_fragment, container, false);
        nameTextView = (TextView) rootView.findViewById(R.id.name_detail_fragment);
        locationTextView = (TextView) rootView.findViewById(R.id.location_detail_fragment);
        websiteTextView = (TextView) rootView.findViewById(R.id.website_detail_fragment);
        populateTextViews();
        return rootView;
    }

    public void populateTextViews() {
        nameTextView.setText(mListing.getName());
        locationTextView.setText(mListing.getAddress().getStreet() + ", " + mListing.getAddress().getCity() + ", " + mListing.getAddress().getProv() + ", " + mListing.getAddress().getPcode());
        websiteTextView.setText(mListing.getMerchantUrl());
    }
}




Java Source Code List

android.UnusedStub.java
com.tddrampup.ApplicationModule.java
com.tddrampup.YellowApplication.java
com.tddrampup.activities.MainActivity.java
com.tddrampup.adapters.ListingAdapter.java
com.tddrampup.factories.CameraUpdateFactoryWrapperInterface.java
com.tddrampup.factories.CameraUpdateFactoryWrapper.java
com.tddrampup.factories.MarkerOptionsFactoryWrapperInterface.java
com.tddrampup.factories.MarkerOptionsFactoryWrapper.java
com.tddrampup.fragments.DetailFragment.java
com.tddrampup.fragments.GoogleMapFragment.java
com.tddrampup.fragments.HomeFragment.java
com.tddrampup.fragments.ListFragment.java
com.tddrampup.models.Address.java
com.tddrampup.models.GeoCode.java
com.tddrampup.models.Keywords.java
com.tddrampup.models.Listing.java
com.tddrampup.models.Phone.java
com.tddrampup.models.Products.java
com.tddrampup.models.Profile.java
com.tddrampup.models.Summary.java
com.tddrampup.models.YellowResponse.java
com.tddrampup.serviceLayers.VolleyServiceLayerCallback.java
com.tddrampup.serviceLayers.VolleyServiceLayer.java
com.tddrampup.singletons.ListingsInterface.java
com.tddrampup.singletons.Listings.java
com.tddrampup.views.MapView.java