This file contains hidden or 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
<attr name="oppoPagerTabStripStyle" format="reference" /> | |
<declare-styleable name="OppoPagerTabStrip"> | |
<attr name="pagerTitle" format="reference" /> | |
<attr name="pagerTitleSize" format="reference|dimension" /> | |
<attr name="pagerTitleColor" format="reference|color" /> | |
<attr name="pagerTitleColorHighlight" format="reference|color" /> | |
<attr name="textPadding" format="reference|dimension" /> | |
<attr name="bottomLine" format="reference|color" /> | |
<attr name="focusLine" format="reference|color" /> |
This file contains hidden or 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
public static List<Track> getLocalSongs(Context context, int pageIndex, int pageSize) { | |
long[] audioId; | |
Playlist playlist; | |
List<Track> trackList = new ArrayList<Track>(); | |
String[] projection = new String[] { MediaStore.Audio.Media._ID, }; | |
Uri uri = MediaStore.Audio.Media.EXTERNAL_CONTENT_URI | |
.buildUpon() | |
.appendQueryParameter(QUERY_PARAMETER_LIMIT, String.valueOf(pageSize)) | |
.appendQueryParameter(QUERY_PARAMETER_OFFSET, | |
String.valueOf((pageIndex - 1) * pageSize)).build(); |
This file contains hidden or 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
/** | |
* Blur a bitmap by specified radius | |
* @param context | |
* @param src | |
* @param radius | |
* @return | |
*/ | |
public static Bitmap blurBitmap(Context context, Bitmap src, float radius) | |
throws RSIllegalArgumentException { | |
if (radius <= 0f) { |
This file contains hidden or 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
import android.graphics.*; | |
import com.squareup.picasso.Transformation; | |
/** | |
* Transforms an image into a circle representation. Such as a avatar. | |
*/ | |
public class CircularTransformation implements Transformation | |
{ | |
int radius = 10; |
This file contains hidden or 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
/* | |
* Copyright (C) 2011 The Android Open Source Project | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
This file contains hidden or 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
/* | |
* Copyright (C) 2011 The Android Open Source Project | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
This file contains hidden or 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
/* | |
* Copyright (C) 2011 The Android Open Source Project | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
This file contains hidden or 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.wits.dzwillpower; | |
import java.io.File; | |
public class DirectoryCreate { | |
public static void main(String[] args) { | |
deleteFile(new File("E:\\ProgrammeMaterial\\Android\\AndroidProgram\\3372\\1\\1")); | |
} | |
public static void deleteFile(File file) { |
This file contains hidden or 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 org.qii.weiciyuan.ui.login; | |
import org.qii.weiciyuan.R; | |
import org.qii.weiciyuan.bean.AccountBean; | |
import org.qii.weiciyuan.bean.UserBean; | |
import org.qii.weiciyuan.dao.URLHelper; | |
import org.qii.weiciyuan.dao.login.OAuthDao; | |
import org.qii.weiciyuan.support.database.AccountDBTask; | |
import org.qii.weiciyuan.support.debug.AppLogger; | |
import org.qii.weiciyuan.support.error.WeiboException; |
This file contains hidden or 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
AssetManager am = getAssets(); | |
InputStream inputStream = am.open(file:///android_asset/myfoldername/myfilename); | |
File file = createFileFromInputStream(inputStream); | |
private File createFileFromInputStream(InputStream inputStream) { | |
try{ | |
File f = new File(my_file_name); | |
OutputStream outputStream = new FileOutputStream(f); | |
byte buffer[] = new byte[1024]; |