This file contains 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 . Modify your MainActivity section in AndroidManifest.xml, delete from it, line with MAIN category in intent-//filter section | |
<activity android:name="ru.quickmessage.pa.MainActivity" | |
android:configChanges="keyboardHidden|orientation" | |
android:screenOrientation="portrait" | |
android:label="@string/app_name" | |
android:theme="@style/CustomTheme" | |
android:launchMode="singleTask"> | |
<intent-filter> | |
<action android:name="android.intent.action.MAIN" /> |
This file contains 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 OnClickListener mUploadClickListener = new OnClickListener() { | |
public void onClick(View v) { | |
// 调用相机 | |
Intent mIntent = new Intent("android.media.action.IMAGE_CAPTURE"); |
This file contains 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
//android获取一个用于打开文本文件的intent | |
public static Intent getTextFileIntent( String param, boolean paramBoolean) | |
{ | |
Intent intent = new Intent("android.intent.action.VIEW"); | |
intent.addCategory("android.intent.category.DEFAULT"); | |
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); | |
if (paramBoolean) | |
{ | |
Uri uri1 = Uri.parse(param ); | |
intent.setDataAndType(uri1, "text/plain"); |
This file contains 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 com.zq.testviewpager; | |
import android.support.annotation.Nullable; | |
import android.support.design.widget.TabLayout; | |
import android.support.design.widget.FloatingActionButton; | |
import android.support.design.widget.Snackbar; | |
import android.support.v7.app.AppCompatActivity; | |
import android.support.v7.widget.Toolbar; | |
import android.support.v4.app.Fragment; |
This file contains 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
sudo apt-get install libc6-i386 lib32stdc++6 lib32gcc1 lib32ncurses5 | |
sudo apt-get install lib32z1 | |
sudo apt-get install ia32-libs |
This file contains 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
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
<title>Test Lisp Web</title> | |
</head> | |
<body> | |
<h1>Lisp web开发实例</h1> | |
hi, <!-- TMPL_VAR name --> | |
</body> |
This file contains 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
<?xml version="1.0" encoding="utf-8"?> | |
<rotate xmlns:android="http://schemas.android.com/apk/res/android" | |
android:pivotX="50%" android:pivotY="50%" android:fromDegrees="0" | |
android:toDegrees="360"> | |
<shape android:shape="ring" android:innerRadiusRatio="3" | |
android:thicknessRatio="8" android:useLevel="false"> | |
<size android:width="48dip" android:height="48dip" /> |
This file contains 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
Android developer: make your text views selectable | |
September 02, 2012 | |
Historically, support for text selection and copy/paste on Android has been limited to text input fields only. (Some specific applications like the Browser and Gmail have also included their own implementations of text selection from other areas). Fortunately, starting with Android 3.0 the TextView component has built-in support for a consistent, system-wide selection & copying system. | |
However, this feature is not enabled by default for text views. Very few developers choose to enable it when appropriate: many probably don't even know of its existence. Enabling it is simple and only takes one extra attribute: | |
<TextView android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
android:textIsSelectable="true" /> | |
(Or programmatically:) |
This file contains 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
Uri uri = Uri.parse("mailto:"); | |
Intent intent = new Intent(Intent.ACTION_SENDTO, uri); | |
intent.putExtra(Intent.EXTRA_SUBJECT, " 云盘分享文件:" + emailSubject); // 主题 | |
intent.putExtra(Intent.EXTRA_TEXT, emailBody); // 正文 | |
startActivity(Intent.createChooser(intent, | |
"Select the mail application")); |
This file contains 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
http://stackoverflow.com/questions/8895677/work-around-canvas-clippath-that-is-not-supported-in-android-any-more | |
http://developer.android.com/guide/topics/graphics/hardware-accel.html | |
硬件加速不支持的操作 | |
When hardware accelerated, the 2D rendering pipeline supports the most commonly used Canvas drawing operations as well as many less-used operations. All of the drawing operations that are used to render applications that ship with Android, default widgets and layouts, and common advanced visual effects such as reflections and tiled textures are supported. The following list describes known operations that are not supported with hardware acceleration: | |
Canvas | |
clipPath() |
NewerOlder