Android - Bitmap 處理 取得連結 Facebook X Pinterest 以電子郵件傳送 其他應用程式 7月 06, 2017 等比縮放 Bitmap bitmap = Bitmap.createScaledBitmap(bitmap , 500 , 500 , true ); 設定X、Y裁切 Bitmap bitmap = Bitmap.createBitmap(bitmap , 0 , 0 , cropWidth // 寬度 , cropWidth // 高度 , vMatrix , true ); 取得連結 Facebook X Pinterest 以電子郵件傳送 其他應用程式 留言
Android - wechat share 微信分享 3月 08, 2017 Intent: Intent intent = new Intent(); //選擇好友分享頁面 ComponentName comp = new ComponentName("com.tencent.mm", "com.tencent.mm.ui.tools.ShareToTimeLineUI"); intent.setComponent(comp); intent.setAction(Intent.ACTION_SEND_MULTIPLE); intent.putExtra("Kdescription", "我在測試"); intent.setType("image/*"); //添加Uri圖片 ArrayList<Uri> imageUris = new ArrayList<Uri>(); imageUris.add(getScreenShotTop()); ntent.putParcelableArrayListExtra(Intent.EXTRA_STREAM, imageUris); startActivity(intent); SDK: (compile 'com.tencent.mm.opensdk:wechat-sdk-android-with-mta:1.1.2') //分享 String text = "測試分享文字"; // 初始化一个WXTextObject对象 WXTextObject textObj = new WXTextObject(); textObj.text = text; // 用WXTextObject对象初始化... 閱讀完整內容
Android Studio - :app:processDebugManifest 宣告集中不允許內容 8月 11, 2017 錯誤訊息 Error:Execution failed for task ':app:processDebugManifest'. > com.android.manifmerger.ManifestMerger2$MergeFailureException: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; 宣告集中不允許內容。 解決方法 build.gradle內的classpath 'com.android.tools.build:gradle:2.3.0'改為classpath 'com.android.tools.build:gradle:2.2.3' 閱讀完整內容
Android - drawable圓角框線 7月 28, 2017 1.在drawable資料夾下新增xml <?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="oval" > <!-- shape的類型含有: 1.rectangle - 長方形、矩形 2.oval - 橢圓形、卵形 3.line - 線 4.ring - 環形 --> <!-- 圓角,Layout佈局圓角幅度設定值 --> <corners android:radius="15dp" /> <!-- 框內底部顏色 --> <solid android:color="@color/dialog_button_dark" /> <!-- padding內縮距離 --> <padding android:left="5dp" android:right="5dp" android:top="1dp" android:bottom="1dp" ... 閱讀完整內容
留言
張貼留言