- 博客(9)
- 资源 (10)
- 收藏
- 关注
原创 JNI开发的常见错误&&Android.mk文件说明&& jni开发的简便流程
jni开发的常见错误[1]Your APP_BUILD_SCRIPT points to an unknown file: ./jni/Android.mk 说明你的jni目录下需要一个Android.mk文件 [2]11-21 02:26:39.995: E/AndroidRuntime(434): Caused by: java.lang.UnsatisfiedLinkError:
2016-02-27 14:25:16 1043
原创 JNI用javah命令生成头文件
以下代码在Android中JNI的使用之HelloWorld的基础上操作Android中JNI的使用之HelloWorld2.4在工程的src目录下,在dos窗口使用javah命令 后面跟 MainActivity全路径(eg:com.example.jnitojavah.MainActivity),会在src目录下生成一个头文件(eg:com_example_jnitojavah_MainA
2016-02-27 14:07:02 18081
原创 Android中JNI的使用之HelloWorld
1.配置JNI环境下载ndk版本 配置环境变量–>将ndk-build.cmd文件所在路径配置到path中2.创建一个android工程2.1 在MainActivity中创建一个本地方法package com.example.jni;import android.app.Activity;import android.os.Bundle;import android.view.View;i
2016-02-27 11:56:07 1100
原创 shape
<?xml version="1.0" encoding="utf-8"?><shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> <!--shape命名空间 类型--> <!--android:shape="rectangle" 表示矩形-->
2016-02-21 10:58:22 655
原创 xml布局方式播放帧动画
audio_wave_anim.xml文件写入图片资源,和每帧执行的时间<?xml version="1.0" encoding="utf-8"?><animation-list xmlns:android="http://schemas.android.com/apk/res/android"> <item android:drawable="@drawable/audio_anim_0
2016-02-20 23:04:55 1577
原创 Notification&&自定义Notification
MainActivity的布局<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"xmlns:tools="http://schemas.android.com/tools"android:layout_width="match
2016-02-20 23:02:47 384
转载 Android View中getViewTreeObserver().addOnGlobalLayoutListener()
我们知道在oncreate中View.getWidth和View.getHeight无法获得一个view的高度和宽度,这是因为View组件布局要在onResume回调后完成。所以现在需要使用getViewTreeObserver().addOnGlobalLayoutListener()来获得宽度或者高度。这是获得一个view的宽度和高度的方法之一。OnGlobalLayoutListener 是V
2016-02-18 16:28:53 856
原创 BatteryManager--获取电量
public class BatteryActivity extends AppCompatActivity implements View.OnClickListener { private Button btn_battery; private BatteryBoastcaseReceiver receiver; @Override protected void on
2016-02-18 13:21:32 1626
原创 自定义SeekBar
SeekBar的样式修改<SeekBarandroid:layout_width="0dp"android:layout_height="wrap_content"android:layout_weight="1"android:maxHeight="6dp"android:minHeight="6dp"android:progress="40"android:progressDraw
2016-02-18 10:42:16 644
Gradle for Android
2016-11-15
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人