Freelancer App Design All Project Add In This Android App

In this tutorial, Post your project for free, Compare and select Freelancers Service Providers.Lets start working on the best projects in the IT Market World. freelancer. a person who works as a writer, designer, performer, or the like, selling work or services by the hour, day, job, etc., rather than working on a regular salary basis for one employer. We, at Freelancer Project have expert professionals in every field who deliver the best end-to-end solutions. Our domain experience is into software development, mobile applications, web applications, ecommerce development, technical support, enterprise mobility, data and analytic consulting solutions, testing, digital marketing and many more.

1. HomeActivity

package com.tutorialsee.freelancerproject;
import com.tutorialsee.freelancerproject.R;
import com.tutorialsee.freelancerproject.viewpager.CardFragmentPagerAdapter;
import com.tutorialsee.freelancerproject.viewpager.ShadowTransformer;
import android.app.Dialog;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.view.ViewPager;
import android.view.LayoutInflater;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.Toast;


public class HomeActivity extends Fragment {
Context context;
ImageView setting;
Button client;
Dialog dialog;
static int c = 1;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
MainActivity.lp = 1;
}

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View v = inflater.inflate(R.layout.home_activity, container, false);
//MainActivity.actionBar.hide();
context = container.getContext();

//MainActivity.mDrawerLayout.closeDrawer(MainActivity.mDrawerList);

//MainActivity.mDrawerList.setVisibility(View.GONE);
//MainActivity.mDrawerLayout.setVisibility(View.GONE);

//MainActivity.mDrawerToggle.onDrawerClosed(v);
client  = (Button) v.findViewById(R.id.client);
setting = (ImageView) v.findViewById(R.id.setting);

client.setOnClickListener(new OnClickListener() {

@Override
public void onClick(View arg0) {
Fragment newContent = new GetProjectDetails();
if (newContent != null) {
switchFragment(newContent);
}

}
});
setting.setOnClickListener(new OnClickListener() {

@Override
public void onClick(View arg0) {

String i = Long.toString(1);
Intent ii=new Intent(getActivity(),SettingActivity.class);
ii.putExtra("KEY", i);
ii.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(ii);
getActivity().overridePendingTransition(R.anim.abc_slide_in_top, R.anim.abc_slide_out_bottom);


}
});


ViewPager viewPager = (ViewPager) v.findViewById(R.id.viewPager);
CardFragmentPagerAdapter pagerAdapter = new CardFragmentPagerAdapter(getActivity().getSupportFragmentManager(), dpToPixels(2, this));
ShadowTransformer fragmentCardShadowTransformer = new ShadowTransformer(viewPager, pagerAdapter);
fragmentCardShadowTransformer.enableScaling(true);
viewPager.setAdapter(pagerAdapter);
viewPager.setPageTransformer(false, fragmentCardShadowTransformer);
viewPager.setOffscreenPageLimit(3);

//****
// including layout coding
View someLayoutView = v.findViewById(R.id.footer);
LinearLayout home = (LinearLayout) someLayoutView.findViewById(R.id.home);
LinearLayout services = (LinearLayout) someLayoutView.findViewById(R.id.services);
ImageView postproject = (ImageView) someLayoutView.findViewById(R.id.postproject);
LinearLayout contact = (LinearLayout) someLayoutView.findViewById(R.id.contact);
LinearLayout usersetting = (LinearLayout) someLayoutView.findViewById(R.id.usersetting);
final ImageView homeimage = (ImageView) someLayoutView.findViewById(R.id.homeimage);
homeimage.setBackgroundResource(R.drawable.homeselect);

home.setOnClickListener(new OnClickListener() {

@Override
public void onClick(View arg0) {
/*Intent ii=new Intent(getActivity(),HomeActivity.class);
ii.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(ii);
getActivity().overridePendingTransition(R.anim.abc_slide_in_bottom, R.anim.abc_slide_out_bottom);*/



}
});

services.setOnClickListener(new OnClickListener() {

@Override
public void onClick(View arg0) {
Intent ii=new Intent(getActivity(),Services.class);
ii.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(ii);
getActivity().overridePendingTransition(R.anim.abc_slide_in_bottom, R.anim.abc_slide_out_bottom);

}
});

postproject.setOnClickListener(new OnClickListener() {

@Override
public void onClick(View arg0) {
Intent ii=new Intent(getActivity(),PostActivity.class);
ii.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(ii);
getActivity().overridePendingTransition(R.anim.abc_slide_in_bottom, R.anim.abc_slide_out_bottom);

}
});

contact.setOnClickListener(new OnClickListener() {

@Override
public void onClick(View arg0) {
Intent ii=new Intent(getActivity(),ContactUs.class);
ii.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(ii);
getActivity().overridePendingTransition(R.anim.abc_slide_in_bottom, R.anim.abc_slide_out_bottom);


}
});

usersetting.setOnClickListener(new OnClickListener() {

@Override
public void onClick(View arg0) {
Intent ii=new Intent(getActivity(),ProfileActivity.class);
ii.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(ii);
getActivity().overridePendingTransition(R.anim.abc_slide_in_bottom, R.anim.abc_slide_out_bottom);


}
});

//***
return v;
}

public static float dpToPixels(int dp, HomeActivity homeactivity) {
return dp * (homeactivity.getResources().getDisplayMetrics().density);
}


public void onBackPressed() {
MainActivity.lp = 1;
}

@Override
public void onResume() {
MainActivity.lp = 1;
super.onResume();
}

// switching fragment
@SuppressWarnings("unused")
private void switchFragment(Fragment fragment) {

// mDrawerLayout.closeDrawer(mDrawerList);
getActivity().getSupportFragmentManager().beginTransaction()
.replace(R.id.content_frame, fragment)
.addToBackStack("my_fragment").commit();
}
}

2. HowItWorkGetProject

package com.tutorialsee.freelancerproject;
import com.tutorialsee.freelancerproject.R;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.graphics.Color;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;

public class HowItWorkGetProject extends Activity {
Context context;
ImageView back;
LinearLayout button1,button2,button3,bidding,contact;
TextView text1, text2, text3;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.how_it_work_get_project);
back  = (ImageView) findViewById(R.id.back);

button1  = (LinearLayout) findViewById(R.id.button1);
button2  = (LinearLayout) findViewById(R.id.button2);

bidding  = (LinearLayout) findViewById(R.id.bidding);
contact  = (LinearLayout) findViewById(R.id.contact);
text1  = (TextView) findViewById(R.id.text1);
text2  = (TextView) findViewById(R.id.text2);

button1.setOnClickListener(new OnClickListener() {

@Override
public void onClick(View arg0) {
contact.setVisibility(View.GONE);
bidding.setVisibility(View.VISIBLE);
text1.setBackgroundColor(Color.parseColor("#0084D0"));
text2.setBackgroundColor(Color.parseColor("#EDEDED"));
text1.setTextColor(getResources().getColor(R.color.white));
text2.setTextColor(getResources().getColor(R.color.black));

}
});
button2.setOnClickListener(new OnClickListener() {

@Override
public void onClick(View arg0) {
bidding.setVisibility(View.GONE);
contact.setVisibility(View.VISIBLE);
text1.setBackgroundColor(Color.parseColor("#EDEDED"));
text2.setBackgroundColor(Color.parseColor("#0084D0"));
text1.setTextColor(getResources().getColor(R.color.black));
text2.setTextColor(getResources().getColor(R.color.white));
}
});


back.setOnClickListener(new OnClickListener() {

@Override
public void onClick(View arg0) {
onBackPressed();

}
});

//******
// including layout coding
View someLayoutView = findViewById(R.id.footer);
LinearLayout home = (LinearLayout) someLayoutView.findViewById(R.id.home);
LinearLayout services = (LinearLayout) someLayoutView.findViewById(R.id.services);
ImageView postproject = (ImageView) someLayoutView.findViewById(R.id.postproject);
LinearLayout contact = (LinearLayout) someLayoutView.findViewById(R.id.contact);
LinearLayout usersetting = (LinearLayout) someLayoutView.findViewById(R.id.usersetting);

home.setOnClickListener(new OnClickListener() {

@Override
public void onClick(View arg0) {
Intent ii=new Intent(getApplicationContext(),HomeActivity.class);
ii.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(ii);
overridePendingTransition(R.anim.abc_slide_in_bottom, R.anim.abc_slide_out_bottom);


}
});

services.setOnClickListener(new OnClickListener() {

@Override
public void onClick(View arg0) {
Intent ii=new Intent(getApplicationContext(),Services.class);
ii.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(ii);
overridePendingTransition(R.anim.abc_slide_in_bottom, R.anim.abc_slide_out_bottom);

}
});

postproject.setOnClickListener(new OnClickListener() {

@Override
public void onClick(View arg0) {
Intent ii=new Intent(getApplicationContext(),PostActivity.class);
ii.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(ii);
overridePendingTransition(R.anim.abc_slide_in_bottom, R.anim.abc_slide_out_bottom);

}
});

contact.setOnClickListener(new OnClickListener() {

@Override
public void onClick(View arg0) {
Intent ii=new Intent(getApplicationContext(),ContactUs.class);
ii.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(ii);
overridePendingTransition(R.anim.abc_slide_in_bottom, R.anim.abc_slide_out_bottom);


}
});

usersetting.setOnClickListener(new OnClickListener() {

@Override
public void onClick(View arg0) {
Intent ii=new Intent(getApplicationContext(),ProfileActivity.class);
ii.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(ii);
overridePendingTransition(R.anim.abc_slide_in_bottom, R.anim.abc_slide_out_bottom);


}
});

//******
}

@Override
public void onBackPressed()
{
     super.onBackPressed();  // optional depending on your needs
}
}

3. HowItWorkPostProject

package com.tutorialsee.freelancerproject;
import com.tutorialsee.freelancerproject.R;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.graphics.Color;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;

public class HowItWorkPostProject extends Activity {
Context context;
ImageView back;
LinearLayout button1,button2,button3,post,service,complete;
TextView text1, text2, text3;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.how_it_work_post_project);
back  = (ImageView) findViewById(R.id.back);

button1  = (LinearLayout) findViewById(R.id.button1);
button2  = (LinearLayout) findViewById(R.id.button2);
button3  = (LinearLayout) findViewById(R.id.button3);
post  = (LinearLayout) findViewById(R.id.post);
service  = (LinearLayout) findViewById(R.id.service);
complete  = (LinearLayout) findViewById(R.id.complete);
text1  = (TextView) findViewById(R.id.text1);
text2  = (TextView) findViewById(R.id.text2);
text3  = (TextView) findViewById(R.id.text3);

button1.setOnClickListener(new OnClickListener() {

@Override
public void onClick(View arg0) {
service.setVisibility(View.GONE);
complete.setVisibility(View.GONE);
post.setVisibility(View.VISIBLE);
text1.setBackgroundColor(Color.parseColor("#0084D0"));
text2.setBackgroundColor(Color.parseColor("#EDEDED"));
text3.setBackgroundColor(Color.parseColor("#EDEDED"));
text1.setTextColor(getResources().getColor(R.color.white));
text2.setTextColor(getResources().getColor(R.color.black));
text3.setTextColor(getResources().getColor(R.color.black));

}
});
button2.setOnClickListener(new OnClickListener() {

@Override
public void onClick(View arg0) {
post.setVisibility(View.GONE);
complete.setVisibility(View.GONE);
service.setVisibility(View.VISIBLE);
text1.setBackgroundColor(Color.parseColor("#EDEDED"));
text2.setBackgroundColor(Color.parseColor("#0084D0"));
text3.setBackgroundColor(Color.parseColor("#EDEDED"));
text1.setTextColor(getResources().getColor(R.color.black));
text2.setTextColor(getResources().getColor(R.color.white));
text3.setTextColor(getResources().getColor(R.color.black));
}
});
button3.setOnClickListener(new OnClickListener() {

@Override
public void onClick(View arg0) {
post.setVisibility(View.GONE);
service.setVisibility(View.GONE);
complete.setVisibility(View.VISIBLE);
text1.setBackgroundColor(Color.parseColor("#EDEDED"));
text2.setBackgroundColor(Color.parseColor("#EDEDED"));
text3.setBackgroundColor(Color.parseColor("#0084D0"));
text1.setTextColor(getResources().getColor(R.color.black));
text2.setTextColor(getResources().getColor(R.color.black));
text3.setTextColor(getResources().getColor(R.color.white));
}
});

back.setOnClickListener(new OnClickListener() {

@Override
public void onClick(View arg0) {
onBackPressed();

}
});

//*********
// including layout coding
View someLayoutView = findViewById(R.id.footer);
LinearLayout home = (LinearLayout) someLayoutView.findViewById(R.id.home);
LinearLayout services = (LinearLayout) someLayoutView.findViewById(R.id.services);
ImageView postproject = (ImageView) someLayoutView.findViewById(R.id.postproject);
LinearLayout contact = (LinearLayout) someLayoutView.findViewById(R.id.contact);
LinearLayout usersetting = (LinearLayout) someLayoutView.findViewById(R.id.usersetting);

home.setOnClickListener(new OnClickListener() {

@Override
public void onClick(View arg0) {
Intent ii=new Intent(getApplicationContext(),HomeActivity.class);
ii.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(ii);
overridePendingTransition(R.anim.abc_slide_in_bottom, R.anim.abc_slide_out_bottom);
}
});

services.setOnClickListener(new OnClickListener() {

@Override
public void onClick(View arg0) {
Intent ii=new Intent(getApplicationContext(),Services.class);
ii.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(ii);
overridePendingTransition(R.anim.abc_slide_in_bottom, R.anim.abc_slide_out_bottom);

}
});

postproject.setOnClickListener(new OnClickListener() {

@Override
public void onClick(View arg0) {
Intent ii=new Intent(getApplicationContext(),PostActivity.class);
ii.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(ii);
overridePendingTransition(R.anim.abc_slide_in_bottom, R.anim.abc_slide_out_bottom);

}
});

contact.setOnClickListener(new OnClickListener() {

@Override
public void onClick(View arg0) {
Intent ii=new Intent(getApplicationContext(),ContactUs.class);
ii.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(ii);
overridePendingTransition(R.anim.abc_slide_in_bottom, R.anim.abc_slide_out_bottom);
}
});

usersetting.setOnClickListener(new OnClickListener() {

@Override
public void onClick(View arg0) {
Intent ii=new Intent(getApplicationContext(),ProfileActivity.class);
ii.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(ii);
overridePendingTransition(R.anim.abc_slide_in_bottom, R.anim.abc_slide_out_bottom);
}
});

//*******
}

@Override
public void onBackPressed()
{
     super.onBackPressed();  // optional depending on your needs
}
}