This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //Some exmaple view imports | |
| import android.view.Menu; | |
| import android.view.MenuItem; | |
| import android.view.View; | |
| import android.view.View.OnClickListener; | |
| import android.widget.ListView; | |
| import android.widget.TextView; | |
| //Creating textview fields | |
| private static TextView dateView; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @Override | |
| public void onCreate(Bundle savedInstanceState) { | |
| super.onCreate(savedInstanceState); | |
| //Creating an adapter to populate the listview | |
| mAdapter = new ToDoListAdapter(getApplicationContext()); | |
| // Put divider between ToDoItems and FooterView |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import android.app.FragmentManager; | |
| import android.app.FragmentTransaction | |
| private FragmentManager mFragmentManager; | |
| private FriendsFragment mFriendsFragment; | |
| //onCreate | |
| mFragmentManager = getFragmentManager(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| private String[] mRawFeeds = new String[3]; | |
| private String[] mProcessedFeeds = new String[3]; | |
| private static final int NUM_FRIENDS = 3; | |
| ======================= | |
| // Called when new Tweets have been downloaded | |
| public void setRefreshed(String[] feeds) { | |
| mRawFeeds[0] = feeds[0]; | |
| mRawFeeds[1] = feeds[1]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package course.labs.notificationslab; | |
| public interface SelectionListener { | |
| public void onItemSelected(int position); | |
| } | |
| //Supporting Fragment class1 | |
| //field | |
| private SelectionListener mCallback; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package <<packageName>>; | |
| import android.app.Activity; | |
| import android.os.Bundle; | |
| import android.widget.ImageView; | |
| import android.widget.RelativeLayout; | |
| import course.examples.Graphics.Bubble.R; | |
| public class <<activityName>> extends Activity { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package course.examples.Graphics.ShapeDrawXML; | |
| import android.app.Activity; | |
| import android.os.Bundle; | |
| public class ShapeDrawActivity extends Activity { | |
| @Override | |
| public void onCreate(Bundle savedInstanceState) { | |
| super.onCreate(savedInstanceState); | |
| setContentView(R.layout.main); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //ShapeDrawACtivity.java | |
| package course.examples.Graphics.ShapeDraw; | |
| //1. Imports | |
| import android.app.Activity; | |
| import android.graphics.Color; | |
| import android.graphics.drawable.ShapeDrawable; | |
| import android.graphics.drawable.shapes.OvalShape; | |
| import android.os.Bundle; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //main.xml contains the textviews whose drawable reference SQ shape xml files. | |
| <?xml version="1.0" encoding="utf-8"?> | |
| <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
| android:layout_width="match_parent" | |
| android:layout_height="match_parent" | |
| android:background="#FFCCCCCC" | |
| android:orientation="vertical" > | |
| <TextView | |
| android:id="@+id/textView1" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //1. The xml layout file | |
| <WebView | |
| android:layout_width="wrap_content" | |
| android:layout_height="wrap_content" | |
| xmlns:android="http://schemas.android.com/apk/res/android" | |
| android:id="@+id/<<webView>>"> | |
| </WebView> | |
| =================== |