Customize Project
Project customizing
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
Contains the AndroidManifest.xml
file.
java
Contains the Java source code files, separated by package names, including JUnit test code.
res
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 Providing Resources.
To know more about project structure please go through this link Android Project Structure
Change App name
To change project name follow below steps.
App > res > values > strings.xml
Change App colors
App > res > values > colors.xml
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
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
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
Follow this link https://www.youtube.com/watch?v=ckbBhs_Ppv4 for solved to gradle AAPT error.
Last updated