OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 package com.skia; | 8 package com.skia; |
9 | 9 |
10 import android.app.ActionBar; | 10 import android.app.ActionBar; |
(...skipping 24 matching lines...) Expand all Loading... |
35 @Override | 35 @Override |
36 public void onCreate(Bundle savedInstanceState) { | 36 public void onCreate(Bundle savedInstanceState) { |
37 super.onCreate(savedInstanceState); | 37 super.onCreate(savedInstanceState); |
38 | 38 |
39 setContentView(R.layout.layout); | 39 setContentView(R.layout.layout); |
40 mTitle = (TextView) findViewById(R.id.title_view); | 40 mTitle = (TextView) findViewById(R.id.title_view); |
41 mSampleView = new SkiaSampleView(this); | 41 mSampleView = new SkiaSampleView(this); |
42 mSlideList = new ArrayAdapter<String>(this, android.R.layout.simple_expa
ndable_list_item_1); | 42 mSlideList = new ArrayAdapter<String>(this, android.R.layout.simple_expa
ndable_list_item_1); |
43 | 43 |
44 try { | 44 try { |
| 45 System.loadLibrary("skia_android"); |
45 System.loadLibrary("SampleApp"); | 46 System.loadLibrary("SampleApp"); |
46 | 47 |
47 LinearLayout holder = (LinearLayout) findViewById(R.id.holder); | 48 LinearLayout holder = (LinearLayout) findViewById(R.id.holder); |
48 holder.addView(mSampleView, new LinearLayout.LayoutParams( | 49 holder.addView(mSampleView, new LinearLayout.LayoutParams( |
49 ViewGroup.LayoutParams.MATCH_PARENT, | 50 ViewGroup.LayoutParams.MATCH_PARENT, |
50 ViewGroup.LayoutParams.MATCH_PARENT)); | 51 ViewGroup.LayoutParams.MATCH_PARENT)); |
51 | 52 |
52 setupActionBar(); | 53 setupActionBar(); |
53 | 54 |
54 } catch (UnsatisfiedLinkError e) { | 55 } catch (UnsatisfiedLinkError e) { |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 (DownloadManager) getSystemService(Context.DOWNLOAD_SERVICE); | 192 (DownloadManager) getSystemService(Context.DOWNLOAD_SERVICE); |
192 new Thread("Add PDF to downloads") { | 193 new Thread("Add PDF to downloads") { |
193 @Override | 194 @Override |
194 public void run() { | 195 public void run() { |
195 final String mimeType = "application/pdf"; | 196 final String mimeType = "application/pdf"; |
196 manager.addCompletedDownload(title, desc, true, mimeType, path,
length, true); | 197 manager.addCompletedDownload(title, desc, true, mimeType, path,
length, true); |
197 } | 198 } |
198 }.start(); | 199 }.start(); |
199 } | 200 } |
200 } | 201 } |
OLD | NEW |