Social Share Android Template

Start your social Android app here

Love Instagram? Like Fancy? Got a similar app idea, but want to put your own twist on it? Get started on it now with the social share Android app template. Our original social share template was one of our most popular, and now we’ve added the Android Lollipop optimized version. Get beautiful, custom artwork designed by our talented UI app designers, put together in a sample project file that compiles straight away in emulator or on your device.

What’s included in this download

  • Working, Sample .apk Project Download
  • Native Java code that builds in Android Studio View Code
  • Original layered Adobe Photoshop .psd files you can edit
  • 25+ Sliced .png files
  • Extensive Documentation Download
myapptemplates Social Share Android Template

Start your social Android app here Love Instagram? Like Fancy? Got a similar app idea, but want to put your own twist on it? Get started on it now with the social share Android app template. Our original social share template was one of our most popular, and now we’ve added the Android Lollipop optimized […]

  • License Details
  • Android Sample Project
  • .PNG Artwork
  • .PSD files
  • Android 7 Nougat Optimized
  • XHDPI Support
Our iOS and Android app templates are a perfect place to start building awesome apps. Get a functional native code base, eye-catching beautiful artwork with excellent UX, icon artwork and documentation. Make your app so beautiful it can't be ignored

Activity feed

Profile View – with intricate design features

Upload View

Explore Grid view – horizontal scrolling image sections

Photo detail screen – with Comment and Like buttons

UI Elements view – with heaps of sleek UI controls

Code Snippet

package com.socialshare;

import java.util.ArrayList;

import android.content.res.Configuration;
import android.os.Bundle;
import android.support.v4.app.ActionBarDrawerToggle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager.OnBackStackChangedListener;
import android.support.v4.view.GravityCompat;
import android.support.v4.widget.DrawerLayout;
import android.view.KeyEvent;
import android.view.MenuItem;
import android.view.View;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.ListView;

import com.socialshare.custom.CustomActivity;
import com.socialshare.model.Data;
import com.socialshare.ui.ActivityList;
import com.socialshare.ui.Elements;
import com.socialshare.ui.Explore;
import com.socialshare.ui.LeftNavAdapter;
import com.socialshare.ui.Photo;
import com.socialshare.ui.Profile;
import com.socialshare.ui.Upload;

/**
 * The Class MainActivity is the base activity class of the application. This
 * activity is launched after the Splash and it holds all the Fragments used in
 * the app. It also creates the Navigation Drawer on left side.
 */
public class MainActivity extends CustomActivity
{

	/** The drawer layout. */
	private DrawerLayout drawerLayout;

	/** ListView for left side drawer. */
	private ListView drawerLeft;

	/** The drawer toggle. */
	private ActionBarDrawerToggle drawerToggle;

	/* (non-Javadoc)
	 * @see com.newsfeeder.custom.CustomActivity#onCreate(android.os.Bundle)
	 */
	@Override
	protected void onCreate(Bundle savedInstanceState)
	{
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);

		setupContainer();
		setupDrawer();
	}

	/**
	 * Setup the drawer layout. This method also includes the method calls for
	 * setting up the Left side drawer.
	 */
	private void setupDrawer()
	{
		drawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout);
		drawerLayout.setDrawerShadow(R.drawable.drawer_shadow,
				GravityCompat.START);
		drawerToggle = new ActionBarDrawerToggle(this, drawerLayout,
				R.drawable.ic_drawer, R.string.drawer_open,
				R.string.drawer_close) {
			@Override
			public void onDrawerClosed(View view)
			{
				setActionBarTitle();
			}

			@Override
			public void onDrawerOpened(View drawerView)
			{
				getActionBar().setTitle(R.string.menu1);
			}
		};
		drawerLayout.setDrawerListener(drawerToggle);
		drawerLayout.closeDrawers();

		setupLeftNavDrawer();
	}

	/**
	 * Setup the left navigation drawer/slider. You can add your logic to load
	 * the contents to be displayed on the left side drawer. You can also setup
	 * the Header and Footer contents of left drawer if you need them.
	 */
	private void setupLeftNavDrawer()
	{
		drawerLeft = (ListView) findViewById(R.id.left_drawer);

		drawerLeft.setAdapter(new LeftNavAdapter(this, getDummyLeftNavItems()));
		drawerLeft.setOnItemClickListener(new OnItemClickListener() {

			@Override
			public void onItemClick(AdapterView<?> arg0, View arg1, int pos,
					long arg3)
			{
				drawerLayout.closeDrawers();
				launchFragment(pos);
			}
		});
		drawerLayout.openDrawer(drawerLeft);
	}

	/**
	 * This method returns a list of dummy items for left navigation slider. You
	 * can write or replace this method with the actual implementation for list
	 * items.
	 * 
	 * @return the dummy items
	 */
	private ArrayList<Data> getDummyLeftNavItems()
	{
		ArrayList<Data> al = new ArrayList<Data>();
		al.add(new Data("News Feed", null, R.drawable.ic_news));
		al.add(new Data("Activity", null, R.drawable.ic_activity));
		al.add(new Data("Explore", null, R.drawable.ic_explore));
		al.add(new Data("Profile", null, R.drawable.ic_profile));
		al.add(new Data("Upload", null, R.drawable.ic_upload));
		al.add(new Data("Elements", null, R.drawable.icon));
		return al;
	}

	/**
	 * This method can be used to attach Fragment on activity view for a
	 * particular tab position. You can customize this method as per your need.
	 * 
	 * @param pos
	 *            the position of tab selected.
	 */
	private void launchFragment(int pos)
	{
		Fragment f = null;
		String title = null;
		if (pos == 0)
		{
			title = "Photo";
			f = new Photo();
		}
		else if (pos == 1)
		{
			title = "Activity";
			f = new ActivityList();
		}
		else if (pos == 2)
		{
			title = "Explore Video";
			f = new Explore();
		}
		else if (pos == 3)
		{
			title = "Profile";
			f = new Profile();
		}
		else if (pos == 4)
		{
			title = "Upload new file";
			f = new Upload();
		}
		else if (pos == 5)
		{
			title = "Elements";
			f = new Elements();
		}
		if (f != null)
		{
			while (getSupportFragmentManager().getBackStackEntryCount() > 0)
			{
				getSupportFragmentManager().popBackStackImmediate();
			}
			getSupportFragmentManager().beginTransaction()
					.replace(R.id.content_frame, f).addToBackStack(title)
					.commit();
		}
	}

	/**
	 * Setup the container fragment for drawer layout. The current
	 * implementation of this method simply calls launchFragment method for tab
	 * position 0. You can customize this method as per your need to display
	 * specific content.
	 */
	private void setupContainer()
	{
		getSupportFragmentManager().addOnBackStackChangedListener(
				new OnBackStackChangedListener() {

					@Override
					public void onBackStackChanged()
					{
						setActionBarTitle();
					}
				});
		launchFragment(0);
	}

	/**
	 * Set the action bar title text.
	 */
	private void setActionBarTitle()
	{
		if (drawerLayout.isDrawerOpen(drawerLeft))
		{
			getActionBar().setTitle(R.string.menu1);
			return;
		}
		if (getSupportFragmentManager().getBackStackEntryCount() == 0)
			return;
		String title = getSupportFragmentManager().getBackStackEntryAt(
				getSupportFragmentManager().getBackStackEntryCount() - 1)
				.getName();
		getActionBar().setTitle(title);
	}

	/* (non-Javadoc)
	 * @see android.app.Activity#onPostCreate(android.os.Bundle)
	 */
	@Override
	protected void onPostCreate(Bundle savedInstanceState)
	{
		super.onPostCreate(savedInstanceState);
		// Sync the toggle state after onRestoreInstanceState has occurred.
		drawerToggle.syncState();
	}

	/* (non-Javadoc)
	 * @see android.app.Activity#onConfigurationChanged(android.content.res.Configuration)
	 */
	@Override
	public void onConfigurationChanged(Configuration newConfig)
	{
		super.onConfigurationChanged(newConfig);
		// Pass any configuration change to the drawer toggle
		drawerToggle.onConfigurationChanged(newConfig);
	}

	/* (non-Javadoc)
	 * @see com.newsfeeder.custom.CustomActivity#onOptionsItemSelected(android.view.MenuItem)
	 */
	@Override
	public boolean onOptionsItemSelected(MenuItem item)
	{
		if (drawerToggle.onOptionsItemSelected(item))
		{
			return true;
		}

		return super.onOptionsItemSelected(item);
	}

	/* (non-Javadoc)
	 * @see android.support.v4.app.FragmentActivity#onKeyDown(int, android.view.KeyEvent)
	 */
	@Override
	public boolean onKeyDown(int keyCode, KeyEvent event)
	{
		if (keyCode == KeyEvent.KEYCODE_BACK)
		{
			if (getSupportFragmentManager().getBackStackEntryCount() > 1)
			{
				getSupportFragmentManager().popBackStackImmediate();
			}
			else
				finish();
			return true;
		}
		return super.onKeyDown(keyCode, event);
	}
}

Template Benefits

  • Android 7 Nougat ready
  • Beautiful, minimal design with excellent UX flow
  • Ready to build and customise right away in Android Studio
  • Prebuilt functionality saves you hundreds of hours of designing, programming, and testing
  • Adheres to Android Design Guidelines for easier app approval
  • The easiest way to create your own app!