Android studio 0.2.6 Default Activity Not Found

Updated Android Studio to 0.2.6 you can run into this error: “Error: Default activity not found”, almost every line was red and some other irrelevant error. Nothing was changed in the project, only did the update from 0.2.5 to 0.2.6. Do the following to fix the problem: Build -> Rebuild Project and then restart Android

Read More

Android Create Intent In Fragment

When working with Fragment if you have any links which forward the user to another Activity you have to change the source parameter to “fa”. For further information on fa take a look at this. This will look like this: Intent explicitIntent = new Intent(fa, AuthorInformation.class); startActivity(explicitIntent); Previous step.

Android Convert onCreate() to Fragment

onCreate() is mandatory for both an Activity and Fragment. They differ a bit. To see how to change your Activity to a Fragment take a look at the previous step. Before: protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.outer_layout); } After: private LinearLayout ll; private FragmentActivity fa; public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { fa

Read More