summaryrefslogtreecommitdiffstats
path: root/docs/html/guide/topics/ui
diff options
context:
space:
mode:
authorAndrew Solovay <asolovay@google.com>2015-03-19 01:42:48 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-03-19 01:42:48 +0000
commit118915706ea9f52e503bc82bf616da438eaad65e (patch)
tree9fabdec77b0f9b7d571c0d802937c803e1e437e4 /docs/html/guide/topics/ui
parent8bc23e82af040334af4f2af1dae9898cc8c66df8 (diff)
parent006d751215ca601952a1b52f9b54c3750f4903da (diff)
downloadframeworks_base-118915706ea9f52e503bc82bf616da438eaad65e.zip
frameworks_base-118915706ea9f52e503bc82bf616da438eaad65e.tar.gz
frameworks_base-118915706ea9f52e503bc82bf616da438eaad65e.tar.bz2
am 006d7512: am a0141748: am 42f966c9: am dbec5ae6: am 0aef0abf: Merge "docs: Fixed broken image link, and broke long lines in code samples" into lmp-docs
* commit '006d751215ca601952a1b52f9b54c3750f4903da': docs: Fixed broken image link, and broke long lines in code samples
Diffstat (limited to 'docs/html/guide/topics/ui')
-rw-r--r--docs/html/guide/topics/ui/layout/grid.jd2
-rw-r--r--docs/html/guide/topics/ui/layout/gridview.jd9
2 files changed, 7 insertions, 4 deletions
diff --git a/docs/html/guide/topics/ui/layout/grid.jd b/docs/html/guide/topics/ui/layout/grid.jd
index c2f1321..3474f48 100644
--- a/docs/html/guide/topics/ui/layout/grid.jd
+++ b/docs/html/guide/topics/ui/layout/grid.jd
@@ -181,7 +181,7 @@ file.</p>
<li>Run the application.</li>
</ol>
<p>You should see the following:</p>
-<img src="images/hello-tablelayout.png" width="150px" />
+<img src="{@docRoot}guide/topics/ui/images/hello-tablelayout.png" width="150px" />
diff --git a/docs/html/guide/topics/ui/layout/gridview.jd b/docs/html/guide/topics/ui/layout/gridview.jd
index a4bf224..13467ae 100644
--- a/docs/html/guide/topics/ui/layout/gridview.jd
+++ b/docs/html/guide/topics/ui/layout/gridview.jd
@@ -70,8 +70,10 @@ public void onCreate(Bundle savedInstanceState) {
gridview.setAdapter(new ImageAdapter(this));
gridview.setOnItemClickListener(new OnItemClickListener() {
- public void onItemClick(AdapterView&lt;?> parent, View v, int position, long id) {
- Toast.makeText(HelloGridView.this, "" + position, Toast.LENGTH_SHORT).show();
+ public void onItemClick(AdapterView&lt;?> parent, View v,
+ int position, long id) {
+ Toast.makeText(HelloGridView.this, "" + position,
+ Toast.LENGTH_SHORT).show();
}
});
}
@@ -118,7 +120,8 @@ public class ImageAdapter extends BaseAdapter {
// create a new ImageView for each item referenced by the Adapter
public View getView(int position, View convertView, ViewGroup parent) {
ImageView imageView;
- if (convertView == null) { // if it's not recycled, initialize some attributes
+ if (convertView == null) {
+ // if it's not recycled, initialize some attributes
imageView = new ImageView(mContext);
imageView.setLayoutParams(new GridView.LayoutParams(85, 85));
imageView.setScaleType(ImageView.ScaleType.CENTER_CROP);