-> This Code will cover various requirements that are need to implement in Project,those are:
a) Dont show devider lines between Child and Parent .
b) All Parent rows must be devided with a devider..
c) Some of the Widgets on Paren that are Hide when user selects(clicks) any Parent row.
d) It resolves touch light Problem(i.e when u click any row a flash light will appears to represent that row is clicked)
I solved this by just addding a line "android:listSelector="@color/transprent_editbox" in ExpandableListView layout like:
<ExpandableListView
android:id="@+id/expandableListView1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:listSelector="@color/transprent_editbox"
android:childDivider="@android:color/transparent"
/>
e) Most important one will be ,only one row will expand at a time,means if user clicks a row and try to select other row
then previously selected row will colapse and recently selected row will expand.
f) Colapse expanded row afetr pressing any place( top-parent / bottom->child ) of the expanded row..(Means generally Expandable list having a default behaviour
of row will be expanded only clicks on top of row(i.e clicks only parent of row).
Note : i implemented it in SnailMail(Latterly) Project..
Refer links for any Extra Stuff:
http://qtcstation.com/2011/03/working-with-the-expandablelistview-part-1/
http://stackoverflow.com/questions/11613064/android-divider-in-expandablelistview
http://stackoverflow.com/questions/12145226/android-expandablelistview-divider-is-invisible
http://about-android.blogspot.in/2010/04/steps-to-implement-expandablelistview.html
http://stackoverflow.com/questions/3245234/android-hide-child-dividers-in-expandablelistview
http://stackoverflow.com/questions/3416829/how-to-create-on-click-event-for-children-in-expandable-list
JobDetailsScreenFragment.java:-
package com.dharani.android.snailmail.PL.Tablet;
import java.text.DecimalFormat;
import java.util.List;
import java.util.StringTokenizer;
import android.app.Activity;
import android.content.Context;
import android.graphics.Typeface;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseExpandableListAdapter;
import android.widget.ExpandableListView;
import android.widget.ExpandableListView.OnChildClickListener;
import android.widget.ExpandableListView.OnGroupExpandListener;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.dharani.android.snailmail.R;
import com.dharani.android.snailmail.SharedVariables;
import com.dharani.android.snailmail.BL.BLJobList;
import com.dharani.android.snailmail.DL.Jobs.clsPLBillDetails;
import com.dharani.android.snailmail.DL.Jobs.clsPLJob;
import com.dharani.android.snailmail.PL.Tablet.JobDetailsScreenFragment.ExpAdapter.ViewHolder_Child;
import com.dharani.android.snailmail.PL.Tablet.JobDetailsScreenFragment.ExpAdapter.ViewHolder_Parent;
public class JobDetailsScreenFragment extends Fragment{
ExpAdapter objExpAdapter=null;
ExpandableListView expList;
List<clsPLJob> ObjclsPlJobList=null;
Activity activityContext;
ViewHolder_Child holder_child = null;
ViewHolder_Parent holder_parent = null;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
activityContext=getActivity();
objExpAdapter=new ExpAdapter(activityContext,expList);
BLJobList ObjBLJobList=new BLJobList();
ObjclsPlJobList= ObjBLJobList.getJobsToDisplay();
ObjBLJobList=null;
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View rootOfDetailsFragment=inflater.inflate(R.layout.exp_list_row, container,false);
getAllIds(rootOfDetailsFragment);
return rootOfDetailsFragment;
//return container;
}
private void getAllIds(View view) {
// TODO Auto-generated method stub
expList = (ExpandableListView) view.findViewById(R.id.expandableListView1);
expList.setGroupIndicator(null);
//deviderView=expList.getDivider();
expList.setDivider(null);
///expList.setDivider(R.drawable.toolbarx);
//Code to expand only one row at a time, i.e. when you click and expand an item, all other items are collapsed automatically.
expList.setOnGroupExpandListener(new OnGroupExpandListener() {
public void onGroupExpand(int groupPosition) {
try {
for(int i=0; i<ObjclsPlJobList.size(); i++) {
if(i != groupPosition) {
expList.collapseGroup(i);
}
}
} catch (Exception e) {
e.printStackTrace();
}
}
});
expList.setOnChildClickListener(new OnChildClickListener()
{
@Override
public boolean onChildClick(ExpandableListView parent, View v, int group_position, int child_position, long id)
{
System.out.println("--------child clicked-------");
expList.setAdapter(objExpAdapter);
return true;
}
});
}
@Override
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
expList.setAdapter(objExpAdapter);
}
class ExpAdapter extends BaseExpandableListAdapter {
// ExpandableListView _list;
private Context myContext;
//clsPLJob ObjclsPLJob=null;
clsPLBillDetails ObjclsPLBillDetails=null;
LinearLayout jobfromaddresslayout,jobtoaddresslayout;
public class ViewHolder_Child {
TextView /*jobdate,jobfromaddress,jobtoaddress,*/jobnoofpages,jobfirstpageprice,jobadditionalpageprice,jobtaxprice,jobtotalprice,
/*jobfromaddresstxtview,jobtoaddresstxtview,*/jobnoofpagestxtview,jobfirstpagepricetxtview,jobadditionalpagepricetxtview,jobtaxpricetxtview,jobtotalpricetxtview;
RelativeLayout childReltiveLayout;
ImageView deviderView;
}
public class ViewHolder_Parent {
TextView moreTxt,date,fromTxt,toTxt,fromTxtview,toTxtview,statusTxt,pricingTxt;
LinearLayout toTxtviewlayout,fromTxtviewlayout,parentLinearLayout;
ImageView deviderParentView;
RelativeLayout jobStatusReltiveLayout;
}
public ExpAdapter(Context context,ExpandableListView list) {
myContext = context;
// _list=list;
}
@Override
public Object getChild(int groupPosition, int childPosition) {
return null;
}
@Override
public long getChildId(int groupPosition, int childPosition) {
return 0;
}
@Override
public int getChildrenCount(int groupPosition) {
try {
return 1;
} catch (Exception e) {
e.printStackTrace();
}
return 0;
}
@Override
public View getChildView(final int groupPosition, final int childPosition,
boolean isLastChild, View convertView, ViewGroup parent) {
if (convertView == null) {
System.out.println("---getChildView --convertView == null");
LayoutInflater inflater = (LayoutInflater) myContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
convertView = inflater.inflate(R.layout.job_details_screen, null);
holder_child = new ViewHolder_Child();
holder_child.deviderView=(ImageView) convertView.findViewById(R.id.deviderView);
holder_child.childReltiveLayout=(RelativeLayout)convertView.findViewById(R.id.childReltiveLayout);
// holder_child.jobdate=(TextView) convertView.findViewById(R.id.jobdate);
// holder_child.jobfromaddress=(TextView) convertView.findViewById(R.id.jobfromaddress);
// holder_child.jobtoaddress=(TextView) convertView.findViewById(R.id.jobtoaddress);
holder_child.jobnoofpages=(TextView) convertView.findViewById(R.id.jobnoofpages);
holder_child.jobfirstpageprice=(TextView) convertView.findViewById(R.id.jobfirstpageprice);
holder_child.jobadditionalpageprice=(TextView) convertView.findViewById(R.id.jobadditionalpageprice);
holder_child.jobtaxprice=(TextView) convertView.findViewById(R.id.jobtaxprice);
holder_child.jobtotalprice=(TextView) convertView.findViewById(R.id.jobtotalprice);
// holder_child.jobdate.setTypeface(SharedVariables.robotoThinFont,Typeface.BOLD);
// holder_child.jobfromaddress.setTypeface(SharedVariables.robotoThinFont);
//holder_child.jobtoaddress.setTypeface(SharedVariables.robotoThinFont);
holder_child.jobnoofpages.setTypeface(SharedVariables.robotoThinFont);
holder_child.jobfirstpageprice.setTypeface(SharedVariables.robotoThinFont);
holder_child.jobadditionalpageprice.setTypeface(SharedVariables.robotoThinFont);
holder_child.jobtaxprice.setTypeface(SharedVariables.robotoThinFont);
holder_child.jobtotalprice.setTypeface(SharedVariables.robotoThinFont);
// holder_child.jobfromaddresstxtview=(TextView)convertView. findViewById(R.id.jobfromaddresstxtview);
// holder_child.jobtoaddresstxtview=(TextView) convertView.findViewById(R.id.jobtoaddresstxtview);
holder_child.jobnoofpagestxtview=(TextView)convertView. findViewById(R.id.jobnoofpagestxtview);
holder_child.jobfirstpagepricetxtview=(TextView) convertView.findViewById(R.id.jobfirstpagepricetxtview);
holder_child.jobadditionalpagepricetxtview=(TextView) convertView.findViewById(R.id.jobadditionalpagepricetxtview);
holder_child.jobtaxpricetxtview=(TextView) convertView.findViewById(R.id.jobtaxpricetxtview);
holder_child.jobtotalpricetxtview=(TextView) convertView.findViewById(R.id.jobtotalpricetxtview);
// holder_child.jobfromaddresstxtview.setTypeface(SharedVariables.robotoThinFont,Typeface.BOLD);
// holder_child.jobtoaddresstxtview.setTypeface(SharedVariables.robotoThinFont,Typeface.BOLD);
holder_child.jobnoofpagestxtview.setTypeface(SharedVariables.robotoThinFont,Typeface.BOLD);
holder_child.jobfirstpagepricetxtview.setTypeface(SharedVariables.robotoThinFont,Typeface.BOLD);
holder_child.jobadditionalpagepricetxtview.setTypeface(SharedVariables.robotoThinFont,Typeface.BOLD);
holder_child.jobtaxpricetxtview.setTypeface(SharedVariables.robotoThinFont,Typeface.BOLD);
holder_child.jobtotalpricetxtview.setTypeface(SharedVariables.robotoThinFont,Typeface.BOLD);
convertView.setTag(holder_child);
}
else
{
holder_child = (ViewHolder_Child) convertView.getTag();
}
if(ObjclsPlJobList!=null)
{
//holder_child.jobdate.setText(ObjclsPlJobList.get(groupPosition).getJobCreatedDateTime());
if(ObjclsPlJobList.get(groupPosition).getFromAddress()!=null)
{
if(ObjclsPlJobList.get(groupPosition).getFromAddress().trim().length()>0)
{
//holder_child.jobfromaddress.setText(ObjclsPlJobList.get(groupPosition).getFromAddress());
}
else{
jobfromaddresslayout.setVisibility(View.GONE);
}
}
else
{
jobfromaddresslayout.setVisibility(View.GONE);
}
if(ObjclsPlJobList.get(groupPosition).getToAddress()!=null)
{
if(ObjclsPlJobList.get(groupPosition).getToAddress().trim().length()>0)
{
//holder_child.jobtoaddress.setText(ObjclsPlJobList.get(groupPosition).getToAddress());
}else
{
jobtoaddresslayout.setVisibility(View.GONE);
}
}
else
{
jobtoaddresslayout.setVisibility(View.GONE);
}
holder_child.jobnoofpages.setText(""+ObjclsPlJobList.get(groupPosition).getNoOfPages());
BLJobList ObjBLJobList=new BLJobList();
ObjclsPLBillDetails=ObjBLJobList.getBillDetailsForJob(ObjclsPlJobList.get(groupPosition));
ObjBLJobList=null;
if(ObjclsPLBillDetails!=null)
{
holder_child.jobfirstpageprice.setText(ObjclsPLBillDetails.getChargeForFirstPage());
holder_child.jobadditionalpageprice.setText(ObjclsPLBillDetails.getChargeForAdditionalPages());
holder_child.jobtaxprice.setText(ObjclsPLBillDetails.getTax());
StringTokenizer jobfirstpagepricetoken = new StringTokenizer(ObjclsPLBillDetails.getChargeForFirstPage(), "$");
StringTokenizer jobadditionalpagepricetoken = new StringTokenizer(ObjclsPLBillDetails.getChargeForAdditionalPages().replace(",",""), "$");
StringTokenizer jobtaxpricetoken = new StringTokenizer(ObjclsPLBillDetails.getTax(), "$");
System.out.println("cc??"+ObjclsPLBillDetails.getChargeForAdditionalPages());
float firstpageprice=Float.parseFloat(jobfirstpagepricetoken.nextToken());
float additionalpageprice=Float.parseFloat(jobadditionalpagepricetoken.nextToken());
float taxprice=Float.parseFloat(jobtaxpricetoken.nextToken());
float totalprice=firstpageprice+additionalpageprice+taxprice;
DecimalFormat df = new DecimalFormat();
df.setMaximumFractionDigits(2);
holder_child.jobtotalprice.setText("$ "+df.format(totalprice));
}
}
return convertView;
}
@Override
public Object getGroup(int groupPosition) {
return null;
}
@Override
public int getGroupCount() {
try {
return ObjclsPlJobList.size();
} catch (Exception e) {
e.printStackTrace();
}
return 0;
}
@Override
public long getGroupId(int groupPosition) {
return 0;
}
// Return a group view. You can load your custom layout here.
@Override
public View getGroupView(int groupPosition, boolean isExpanded, View rowView,
ViewGroup parent) {
System.out.println("---getGroupView --");
System.out.println("------isExpanded------"+isExpanded);
//String group = (String) getGroup(groupPosition);
if (rowView == null) {
LayoutInflater infalInflater = (LayoutInflater) myContext
.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
rowView = infalInflater.inflate(R.layout.job_row, null);
holder_parent = new ViewHolder_Parent();
holder_parent.deviderParentView=(ImageView) rowView.findViewById(R.id.deviderParentView);
holder_parent.parentLinearLayout=(LinearLayout) rowView.findViewById(R.id.parentLinearLayout);
holder_parent.jobStatusReltiveLayout=(RelativeLayout) rowView.findViewById(R.id.jobStatusReltiveLayout);
holder_parent.toTxtviewlayout=(LinearLayout) rowView.findViewById(R.id.toTxtviewlayout);
holder_parent.fromTxtviewlayout=(LinearLayout) rowView.findViewById(R.id.fromTxtviewlayout);
holder_parent.date=(TextView) rowView.findViewById(R.id.date);
holder_parent.fromTxt=(TextView) rowView.findViewById(R.id.fromTxt);
holder_parent.toTxt=(TextView) rowView.findViewById(R.id.toTxt);
holder_parent.statusTxt=(TextView) rowView.findViewById(R.id.statusTxt);
holder_parent.pricingTxt=(TextView) rowView.findViewById(R.id.pricingTxt);
holder_parent.moreTxt=(TextView) rowView.findViewById(R.id.moreTxt);
holder_parent.fromTxtview=(TextView) rowView.findViewById(R.id.fromTxtview);
holder_parent.toTxtview=(TextView) rowView.findViewById(R.id.toTxtview);
holder_parent.fromTxtview.setTypeface(SharedVariables.robotoThinFont,Typeface.BOLD);
holder_parent.toTxtview.setTypeface(SharedVariables.robotoThinFont,Typeface.BOLD);
holder_parent.date.setTypeface(SharedVariables.robotoThinFont,Typeface.BOLD);
holder_parent.fromTxt.setTypeface(SharedVariables.robotoThinFont);
holder_parent.toTxt.setTypeface(SharedVariables.robotoThinFont);
holder_parent.statusTxt.setTypeface(SharedVariables.robotoThinFont,Typeface.BOLD);
holder_parent.pricingTxt.setTypeface(SharedVariables.robotoThinFont,Typeface.BOLD);
holder_parent.moreTxt.setTypeface(SharedVariables.robotoThinFont);
rowView.setTag(holder_parent);
}
else
{
holder_parent = (ViewHolder_Parent) rowView.getTag();
}
if(ObjclsPlJobList.get(groupPosition).getFromAddress()!=null)
{
if(ObjclsPlJobList.get(groupPosition).getFromAddress().trim().length()>0)
{
holder_parent.fromTxtviewlayout.setVisibility(View.VISIBLE);
}
else
{
holder_parent.fromTxtviewlayout.setVisibility(View.GONE);
}
}
else
{
holder_parent.fromTxtviewlayout.setVisibility(View.GONE);
}
if(ObjclsPlJobList.get(groupPosition).getToAddress()!=null)
{
if(ObjclsPlJobList.get(groupPosition).getToAddress().trim().length()>0)
{
holder_parent.toTxtviewlayout.setVisibility(View.VISIBLE);
}
else
{
holder_parent.toTxtviewlayout.setVisibility(View.GONE);
}
}
else
{
holder_parent.toTxtviewlayout.setVisibility(View.GONE);
}
holder_parent.date.setText(ObjclsPlJobList.get(groupPosition).getJobCreatedDateTime());
holder_parent.fromTxt.setText(ObjclsPlJobList.get(groupPosition).getFromAddress());
holder_parent.toTxt.setText(ObjclsPlJobList.get(groupPosition).getToAddress());
holder_parent.statusTxt.setText(ObjclsPlJobList.get(groupPosition).getStatus());
holder_parent.pricingTxt.setText(ObjclsPlJobList.get(groupPosition).getTotalAmountCharged());
if(isExpanded){
//holder_parent.moreTxt.setVisibility(View.GONE);
//holder_parent.moreTxt.setBackgroundResource(R.drawable.arrow_collapse30);
holder_parent.jobStatusReltiveLayout.setVisibility(View.GONE);
holder_parent.statusTxt.setVisibility(View.GONE);
holder_parent.pricingTxt.setVisibility(View.GONE);
holder_parent.deviderParentView.setVisibility(View.GONE);
}else{
//holder_parent.moreTxt.setBackgroundResource(R.drawable.arrow_expand30);
holder_parent.jobStatusReltiveLayout.setVisibility(View.VISIBLE);
holder_parent.statusTxt.setVisibility(View.VISIBLE);
holder_parent.pricingTxt.setVisibility(View.VISIBLE);
holder_parent.deviderParentView.setVisibility(View.VISIBLE);
}
return rowView;
}
@Override
public boolean hasStableIds() {
return false;
}
@Override
public boolean isChildSelectable(int groupPosition, int childPosition) {
return true;
}
}
}
exp_list_row.xml:-
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<TextView
android:id="@+id/joblistheader"
android:layout_width="fill_parent"
android:layout_height="50dip"
android:textStyle="bold"
android:gravity="center"
android:textSize="20dip"
android:textColor="@color/white"
android:background="@drawable/toolbarx"
android:text="JOB List" />
<ExpandableListView
android:id="@+id/expandableListView1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:listSelector="@color/transprent_editbox"
android:childDivider="@android:color/transparent"
/>
</LinearLayout>
job_details_screen.xml:-
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_gravity="center"
android:layout_height="wrap_content"
android:id="@+id/childReltiveLayout"
>
<!-- <TextView
android:id="@+id/jobdetailsheader"
android:layout_width="fill_parent"
android:layout_height="50dip"
android:gravity="center"
android:background="@drawable/toolbarx"
android:text="JOB Details"
android:textSize="20sp"
android:textColor="@color/white"
android:textStyle="bold" /> -->
<!-- <ScrollView
android:id="@+id/scrollView1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
> -->
<!-- <RelativeLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content" > -->
<!-- <TextView
android:id="@+id/jobdate"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="2dip"
android:layout_marginLeft="10dip"
android:text="Date"
android:textColor="@color/dark_grey"
android:textSize="15dip" />
<LinearLayout
android:layout_width="fill_parent"
android:orientation="horizontal"
android:layout_marginTop="5dip"
android:layout_marginLeft="10dip"
android:layout_below="@+id/jobdate"
android:id="@+id/jobfromaddresslayout"
android:layout_height="wrap_content" >
<TextView
android:id="@+id/jobfromaddresstxtview"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textStyle="bold"
android:textColor="@color/dark_grey"
android:text="From : " />
<TextView
android:id="@+id/jobfromaddress"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/dark_grey"
android:text="address " />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:orientation="horizontal"
android:layout_marginTop="5dip"
android:layout_marginLeft="10dip"
android:layout_below="@+id/jobfromaddresslayout"
android:id="@+id/jobtoaddresslayout"
android:layout_height="wrap_content" >
<TextView
android:id="@+id/jobtoaddresstxtview"
android:layout_width="wrap_content"
android:textColor="@color/dark_grey"
android:layout_height="wrap_content"
android:textStyle="bold"
android:text="To : " />
<TextView
android:id="@+id/jobtoaddress"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/dark_grey"
android:text="Address" />
</LinearLayout> -->
<RelativeLayout android:id="@+id/jobnoofpagesreltiveLayout"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
>
<LinearLayout
android:layout_width="fill_parent"
android:orientation="horizontal"
android:layout_marginLeft="10dip"
android:id="@+id/jobnoofpageslayout"
android:layout_centerVertical="true"
android:layout_height="wrap_content" >
<TextView
android:id="@+id/jobnoofpagestxtview"
android:layout_width="wrap_content"
android:textColor="@color/dark_gray"
android:layout_height="wrap_content"
android:text="No of pages : "
android:textStyle="bold"/>
<TextView
android:id="@+id/jobnoofpages"
android:layout_width="wrap_content"
android:textColor="@color/grey"
android:layout_height="wrap_content"
android:text="10" />
</LinearLayout>
<TextView
android:id="@+id/moreTxt"
android:layout_width="30dip"
android:layout_height="30dip"
android:layout_alignParentRight="true"
android:layout_marginRight="10dip"
android:background="@drawable/arrow_collapse30"
android:textColor="@color/blueColor" />
</RelativeLayout>
<TextView
android:id="@+id/jobpricing"
android:layout_width="wrap_content"
android:textColor="@color/dark_gray"
android:layout_height="wrap_content"
android:textStyle="bold"
android:textSize="15sp"
android:layout_marginLeft="10dip"
android:layout_below="@+id/jobnoofpagesreltiveLayout"
android:text="Bill details : " />
<LinearLayout
android:layout_width="fill_parent"
android:orientation="horizontal"
android:layout_marginTop="5dip"
android:layout_marginLeft="10dip"
android:layout_below="@+id/jobpricing"
android:id="@+id/jobfirstpagepricelayout"
android:layout_height="wrap_content" >
<TextView
android:id="@+id/jobfirstpagepricetxtview"
android:layout_width="wrap_content"
android:textColor="@color/dark_gray"
android:layout_height="wrap_content"
android:text="First Page : "
android:textStyle="bold" />
<TextView
android:id="@+id/jobfirstpageprice"
android:layout_width="wrap_content"
android:textColor="@color/grey"
android:layout_height="wrap_content"
android:text="$45.02" />
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:orientation="horizontal"
android:layout_marginTop="5dip"
android:layout_marginLeft="10dip"
android:layout_below="@+id/jobfirstpagepricelayout"
android:id="@+id/jobadditionalpagepricelayout"
android:layout_height="wrap_content" >
<TextView
android:id="@+id/jobadditionalpagepricetxtview"
android:textColor="@color/dark_gray"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textStyle="bold"
android:text="Additional Page : " />
<TextView
android:id="@+id/jobadditionalpageprice"
android:layout_width="wrap_content"
android:textColor="@color/grey"
android:layout_height="wrap_content"
android:text="$152.25" />
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:orientation="horizontal"
android:layout_marginTop="5dip"
android:layout_marginLeft="10dip"
android:layout_below="@+id/jobadditionalpagepricelayout"
android:id="@+id/jobtaxpricelayout"
android:layout_height="wrap_content" >
<TextView
android:id="@+id/jobtaxpricetxtview"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textStyle="bold"
android:textColor="@color/dark_gray"
android:text="Tax : " />
<TextView
android:id="@+id/jobtaxprice"
android:layout_width="wrap_content"
android:textColor="@color/grey"
android:layout_height="wrap_content"
android:text="$5" />
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:orientation="horizontal"
android:layout_marginTop="5dip"
android:layout_marginLeft="10dip"
android:layout_marginBottom="10dip"
android:layout_below="@+id/jobtaxpricelayout"
android:id="@+id/jobtotalpricelayout"
android:layout_height="wrap_content" >
<TextView
android:id="@+id/jobtotalpricetxtview"
android:layout_width="wrap_content"
android:textColor="@color/dark_gray"
android:layout_height="wrap_content"
android:text="Total : "
android:textStyle="bold" />
<TextView
android:id="@+id/jobtotalprice"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/grey"
android:text="$1025.02" />
</LinearLayout>
<ImageView
android:id="@+id/deviderView"
android:layout_below="@+id/jobtotalpricelayout"
android:layout_width="fill_parent"
android:layout_height="1dip"
android:layout_marginLeft="10dip"
android:layout_marginRight="10dip"
android:background="@color/grey"/>
<!-- </RelativeLayout> -->
<!-- </ScrollView> -->
</RelativeLayout>
job_row.xml:-
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="@+id/parentLinearLayout"
android:paddingLeft="5dip"
android:paddingRight="5dip"
android:paddingTop="5dip" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1"
android:layout_margin="5dip"
android:orientation="vertical" >
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
>
<TextView
android:id="@+id/date"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:textColor="@color/dark_gray"
android:textStyle="bold"
android:text="Date" />
<TextView
android:id="@+id/pricingTxt"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:text="$1025.0"
android:gravity="right"
android:textColor="@color/blueColor" />
</RelativeLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="@+id/fromTxtviewlayout"
android:layout_marginTop="5dip"
android:orientation="horizontal" >
<TextView
android:id="@+id/fromTxtview"
android:layout_width="wrap_content"
android:singleLine="true"
android:textStyle="bold"
android:textColor="@color/dark_gray"
android:layout_height="wrap_content"
android:text="From : " />
<TextView
android:id="@+id/fromTxt"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/grey"
android:text="From lsdjf dsjf ldsl fldsfdsjflds jlf jlds jfldsl jflds jlf jlds jlf jlds jfldjslfjlsjfklslfjslfjlslfjslfjs jlj ldsfjfldsj jf" />
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:id="@+id/toTxtviewlayout"
android:layout_height="wrap_content"
android:layout_marginTop="5dip"
android:orientation="horizontal" >
<TextView
android:id="@+id/toTxtview"
android:singleLine="true"
android:textStyle="bold"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/dark_gray"
android:text="To : " />
<TextView
android:id="@+id/toTxt"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/grey"
android:text="To" />
</LinearLayout>
<RelativeLayout android:id="@+id/jobStatusReltiveLayout"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="5dip"
>
<TextView
android:id="@+id/statusTxt"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textStyle="bold"
android:layout_centerVertical="true"
android:textColor="@color/dark_gray"
android:text="Status" />
<TextView
android:id="@+id/moreTxt"
android:layout_width="30dip"
android:layout_height="30dip"
android:layout_alignParentRight="true"
android:background="@drawable/arrow_expand30"
android:gravity="right"
android:textColor="@color/blueColor" />
</RelativeLayout>
<ImageView
android:id="@+id/deviderParentView"
android:layout_width="fill_parent"
android:layout_height="1dip"
android:background="@color/grey"
/>
</LinearLayout>
<!-- <LinearLayout
android:layout_width="60dip"
android:layout_height="fill_parent"
android:layout_margin="5dip"
android:orientation="vertical" >
<TextView
android:id="@+id/pricingTxt"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:textStyle="bold"
android:gravity="right"
android:text="$1025.0" />
</LinearLayout> -->
</LinearLayout>
Great job!!!
ReplyDeletebut there are missing files (clsPLBillDetails, BLJobList, clsPLJob).
Can you please post them?
Can you post the /res directory for colors and images?
It would be great if you provide a git or zip file for the project.
Thanks a lot!
src code pls
ReplyDeleteHi
ReplyDeleteAll files start with cls(clsPLBillDetails,clsPLJob) will be only java classes that are having getter and setter methods of existing parameters.
and BLJobList is the java class that will get list of jobs from server and return that list. you can add any dummy list in that class .and u get it.
Thanking you,
@Pavan Tilak.
@PAVAN TILAK CAN U MAIL ME FULL SOURCE CODE FOR ABOVE PROJECT EX. saurabh.kalani.ildc@gmail.com my email id plz its urgent
ReplyDeleteHi Saurabh,
ReplyDeleteIts not possible to provide full source code for this proj.
Because its a huge project contains around thousend files.
Sorry for the inconvenience and ask me any other help which can able to do.
Thanks,
PavanTilak.
Hi, could you please explain what a devider is?
ReplyDelete