Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(251)

Side by Side Diff: platform_tools/android/app/src/com/skia/SkiaSampleActivity.java

Issue 61893008: Support linking skia statically on Android (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: rebase Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | platform_tools/android/bin/android_run_skia » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 25 matching lines...) Expand all
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("skia_android");
46 } catch (UnsatisfiedLinkError e) {
47 // This might be because skia was linked to SampleApp statically.
48 }
49
50 try {
46 System.loadLibrary("SampleApp"); 51 System.loadLibrary("SampleApp");
47 52
48 LinearLayout holder = (LinearLayout) findViewById(R.id.holder); 53 LinearLayout holder = (LinearLayout) findViewById(R.id.holder);
49 holder.addView(mSampleView, new LinearLayout.LayoutParams( 54 holder.addView(mSampleView, new LinearLayout.LayoutParams(
50 ViewGroup.LayoutParams.MATCH_PARENT, 55 ViewGroup.LayoutParams.MATCH_PARENT,
51 ViewGroup.LayoutParams.MATCH_PARENT)); 56 ViewGroup.LayoutParams.MATCH_PARENT));
52 57
53 setupActionBar(); 58 setupActionBar();
54 59
55 } catch (UnsatisfiedLinkError e) { 60 } catch (UnsatisfiedLinkError e) {
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 (DownloadManager) getSystemService(Context.DOWNLOAD_SERVICE); 197 (DownloadManager) getSystemService(Context.DOWNLOAD_SERVICE);
193 new Thread("Add PDF to downloads") { 198 new Thread("Add PDF to downloads") {
194 @Override 199 @Override
195 public void run() { 200 public void run() {
196 final String mimeType = "application/pdf"; 201 final String mimeType = "application/pdf";
197 manager.addCompletedDownload(title, desc, true, mimeType, path, length, true); 202 manager.addCompletedDownload(title, desc, true, mimeType, path, length, true);
198 } 203 }
199 }.start(); 204 }.start();
200 } 205 }
201 } 206 }
OLDNEW
« no previous file with comments | « no previous file | platform_tools/android/bin/android_run_skia » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698