All in One Social Media Android Native App
  • Initial page
  • Installation
  • How to Import Project
  • Customize Project
  • Admob Configuration
  • OneSignal integraton
Powered by GitBook
On this page
  • Project Structure
  • Within each Android app module, files are shown in the following groups:
  • Change App name
  • Change App colors
  • Change App icon
  • Change App Package Name
  • Add New Social Website

Customize Project

Project customizing

PreviousHow to Import ProjectNextAdmob Configuration

Last updated 7 years ago

Project Structure

After importing project successfully you will get project structure like below image

Within each Android app module, files are shown in the following groups:

manifest

java

Contains the Java source code files, separated by package names, including JUnit test code.

res

Change App name

To change project name follow below steps.

App > res > values > strings.xml

<string name="app_name">All in One</string>

Change App colors

App > res > values > colors.xml

<color name="colorPrimary">#3F51B5</color><color name="colorPrimaryDark">#303F9F</color><color name="colorAccent">#4cd964</color><color name="colorBlack">#000</color><color name="colorWhite">#fff</color><color name="colorSwitch">#4cd964</color><color name="colortranferant">#c3ecebeb</color><color name="material_blue_500">#009688</color><color name="material_blue_700">#00796B</color><color name="material_green_A200">#FD87A9</color>

Change App icon

Place your app icon inside mipmap folder -> app\src\main\res\mipmap\

Icon of the name should be "ic_launcher.png"

Change App Package Name

Open App level build.gradle and change ApplicationId variable inside android > defaultConfig

applicationId "com.itechnotion.allinone"

Add New Social Website

Boolean fbShow = sharedObjects.preferencesEditor.getBoolean(AppConstants.FACEBOOK);

socialListBeanList.add(new SocialListBean("Facebook", R.drawable.bg_fb, fbShow, R.drawable.ic_fbicon)); ditor.getBoolean(AppConstants.FACEBOOK);

In above line add your social website name image

Go to in layout file in activity_apps.xml

Add below code in this file

               
 <LinearLayout
                    android:id="@+id/lin_insta"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:orientation="horizontal">

                    <LinearLayout
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:orientation="horizontal">

                        <LinearLayout
                            android:layout_width="40dp"
                            android:layout_height="40dp"
                            android:layout_margin="@dimen/margin10"
                            android:alpha="1"
                            android:background="@drawable/bg_instaround"
                            android:gravity="center"
                            android:orientation="vertical">

                            <ImageView
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:layout_gravity="center"
                                android:background="@drawable/ic_instaicon"
                                android:padding="5dp" />
                        </LinearLayout>

                        <ImageView
                            android:id="@+id/arrow_apps"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:padding="@dimen/margin10"
                            android:visibility="gone" />

                    </LinearLayout>

                    <LinearLayout
                        android:layout_width="0dp"
                        android:layout_height="match_parent"
                        android:layout_weight="1"
                        android:gravity="center"
                        android:orientation="vertical">

                        <TextView
                            android:id="@+id/tv_insta"
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:fontFamily="@font/sfprodisplayregular"
                            android:text="@string/instagram"
                            android:textColor="@color/colorBlack"
                            android:textSize="@dimen/titletext" />

                    </LinearLayout>

                    <LinearLayout
                        android:layout_width="wrap_content"
                        android:layout_height="match_parent"
                        android:gravity="center"
                        android:orientation="vertical"
                        android:padding="5dp">

                        <Switch
                            android:id="@+id/instaSwitch"
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:checked="true" />
                    </LinearLayout>
                </LinearLayout>
  • Go to Setting page open AppsActivity

  • Boolean fbShow = sharedObjects.preferencesEditor.getBoolean(AppConstants.FACEBOOK);

  • mFbSwitch.setChecked(fbShow);

  • mFbSwitch.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { @Override public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { if (isChecked) { // do something when check is selected sharedObjects.preferencesEditor.setBoolean(AppConstants.FACEBOOK, true); } else { //do something when unchecked sharedObjects.preferencesEditor.setBoolean(AppConstants.FACEBOOK, false); } } });

  • case R.id.lin_fb: // TODO 18/04/30 if (mFbSwitch.isChecked()) { mFbSwitch.setChecked(false); } else { mFbSwitch.setChecked(true); } break;

Solved Gradle Error

Contains the file.

Contains all non-code resources, such as XML layouts, UI strings, and bitmap images, divided into corresponding sub-directories. For more information about all possible resource types, see .

To know more about project structure please go through this link

Follow this link for solved to gradle AAPT error.

AndroidManifest.xml
Providing Resources
Android Project Structure
https://www.youtube.com/watch?v=ckbBhs_Ppv4
Project Structure
string.xml
Homefragment.java