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 { | |
..... | |
buildTypes { | |
debug { | |
applicationIdSuffix ".debug" | |
.... | |
} | |
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"?> | |
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:tools="http://schemas.android.com/tools" | |
package="......."> | |
<application | |
android:allowBackup="false" | |
android:icon="@mipmap/ic_launcher" | |
android:label="@string/app_name"> |
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
#pragma mark Collection Layout Delegate | |
-(CGSize)collectionView:(UICollectionView *)collectionView | |
layout:(UICollectionViewLayout *)collectionViewLayout | |
sizeForItemAtIndexPath:(NSIndexPath *)indexPath | |
{ | |
NSUInteger item = indexPath.item; | |
if (item < [self.pageResult.results count] && indexPath.section == 0) { | |
//------------ 重點 ------------ |
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
// savedlocation_x <- 原 List | |
List<Integer> copy2=new ArrayList<>(savedlocation_x); // 將 savedlocation_x copy 至新的 list | |
//改成下列寫法 | |
int i = 0; | |
int breakIndex = 4; | |
for(Integer in : savedlocation_x){ | |
if(i > breakIndex){ | |
break; | |
} |
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
public class PersonalData extends Activity { | |
public static class ContactList extends BaseAdapter implements Filterable { | |
} | |
} |
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
public class MainPagerAdapter extends PagerAdapter { | |
// This holds all the currently displayable views, in order from left to right. | |
private ArrayList<View> views = new ArrayList<View>(); | |
//----------------------------------------------------------------------------- | |
// Used by ViewPager. "Object" represents the page; tell the ViewPager where the | |
// page should be displayed, from left-to-right. If the page no longer exists, | |
// return POSITION_NONE. | |
@Override | |
public int getItemPosition (Object object){ |
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
public static String getImagePath(Context context, Uri uri){ | |
Cursor cursor = context.getContentResolver().query(uri, null, null, null, null); | |
cursor.moveToFirst(); | |
String document_id = cursor.getString(0); | |
document_id = document_id.substring(document_id.lastIndexOf(":")+1); | |
cursor.close(); | |
cursor = context.getContentResolver().query( | |
android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI, | |
null, MediaStore.Images.Media._ID + " = ? ", new String[]{document_id}, null); |
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"?> | |
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
package="tw.com.arnold_lin.customlistview" > | |
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> | |
<uses-permission android:name="android.permission.INTERNET" /> | |
<application | |
android:allowBackup="true" | |
android:icon="@mipmap/ic_launcher" |
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 lib.arnold.com.tw.sample; | |
import android.app.Activity; | |
import android.os.Bundle; | |
import android.view.ViewGroup; | |
import android.widget.LinearLayout; | |
import android.widget.ListView; | |
import android.widget.Toast; | |
import java.util.ArrayList; |
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 tw.com.akdg.helloandroidstudio; | |
import android.app.Activity; | |
import android.graphics.Bitmap; | |
import android.os.Bundle; | |
import android.util.DisplayMetrics; | |
import android.util.Log; | |
import android.widget.ImageView; | |
import com.baoyz.widget.PullRefreshLayout; |
NewerOlder