Tag Archives: fragment
21,085 views
Convert Activity to Fragment Step by Step
public class Main extends Activity { private TextView mTextView; private Activity mAct; private Intent mIntent; protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main_layout); mTextView = findViewById(R.id.mTextView); mAct = getActivity(); mIntent = getIntent(); } } to: public class Main … Continue reading
Android Fragment Examples
Code look up at the Api Demos android_fragments arguments attributes – three fragments on screen android_fragments_alert_dialog android_fragments_context_menu android_fragments_custom_animation android_fragments_dialog android_fragments_dialog_or_activity fragment_hide_show fragment_layout fragments_list_array fragment_menu android_fragments_get_result_from_fragment and tabs in two rows android_fragments_recive_result android_fragments_stack fragment_tabs
6. Fragments Tutorial Summary – Czech language
6. Fragments Tutorial Summary – Czech language Dil 6. shrnutí V 1. dílu jsme se něco dozvěděli od XML souborech a typu procesoru pro správný běh Android Studia a emulátoru různých typů zařizení s Androidem. – FrameLayout: můžeme měnit obsah … Continue reading
5. Fragments Tutorial Ipsum.java – Czech language
5. Fragments Tutorial Ipsum.java – Czech language Dil 5. Ipsum.java V 1. dílu jsme se něco dozvěděli od XML souborech a typu procesoru pro správný běh Android Studia a emulátoru různých typů zařizení s Androidem. V 2. dílu jsme rozebrali … Continue reading
4. Fragments Tutorial ArticleFragment.java – Czech language
Dil 4. ArticleFragment.java V 1. dílu jsme se něco dozvěděli od XML souborech a typu procesoru pro správný běh Android Studia a emulátoru různých typů zařizení s Androidem. V 2. dílu jsme rozebrali MainActivity.java V 3. dílu jsme se zabývali … Continue reading
3. Fragments Tutorial HeadlinesFragment – Czech language
Dil 3. HeadlinesFragment.java V 1. dílu jsme se něco dozvěděli od XML souborech V 2. dílu jsme rozebrali MainActivity.java V tomto dílu si rozebereme záludnosti v HeadlinesFragment.java souboru. Používáme příklad i zip porojekt z https://developer.android.com/training/basics/fragments/creating.html Pozorně si jej nastudujte. package … Continue reading
2. Fragments Tutorial MainActivity – Czech language
Díl 2. V prvním dile jsme se něco dozvěděli od XML souborech a taky jaké označení procesoru pro rok 2016 – Intel® VT-x, Intel® EM64T – musí mít PC pro programování v Android Studiu, tedy hlavně pro spuštění emulátoru – … Continue reading
How to test dual panels – panes fragments on small device screen Android
If You have old PC (Android in emulator with high screen resolution uses a lot of memory) or your testing phone have small screen, You can try this trick. Rename layout folder for small device screen f.g. from layout into … Continue reading
fragment Binary XML file line Must specify unique android:id, android:tag, or have a parent with an id for
FrameLayou, fragment have to unique id android:id=”@+id/your_id_unique” <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" > <fragment android:id="@+id/your_id_unique" android:layout_width="match_parent" android:layout_height="match_parent" class="cz.okhelp.notepad.AddNoteFragment" tools:layout="@layout/add_note" /> </FrameLayout>