久々にAOSP mirrorを作ってみました。
(備考:ローカルにAOSPのミラーを作成)
容量80GB超えたよ
上記の画像を見ていただければ、お分かり頂けると思いますが、容量が81.25GBと良い勢いで増えています。いまSSD 128GB上に作成していますが、Android Mがリリースされると100GBまで行くんじゃないかと心配です。
とはいえ、頻繁にAOSPのソースを取得する現場ですと、mirrorがある方が効率的ですので導入を推奨いたします。
info: A new version of repo is available object 5ea32d135963da5542b78895f95332c6a17bbe11 type commit tag v1.12.31 tagger Dan Willemsen1441912006 -0700 repo v1.12.31 error: cannot run gpg: No such file or directory error: could not run gpg. error: could not verify the tag 'v1.12.31' warning: Skipped upgrade to unverified version
self.tableView.rowHeight = UITableViewAutomaticDimension
var cellHeight:Dictionary = ["":0]
override func tableView(tableView: UITableView, willDisplayCell cell: UITableViewCell, forRowAtIndexPath indexPath: NSIndexPath) {
cell.contentView.updateConstraints()
self.cellHeight[String(indexPath.item )] = Float(cell.frame.size.height)
}
override func tableView(tableView: UITableView, estimatedHeightForRowAtIndexPath indexPath: NSIndexPath) -> CGFloat {
if(self.cellHeight[String(indexPath.item )] != nil){
return CGFloat(self.cellHeight[String(indexPath.item )]!)
}
return self.tableView.estimatedRowHeight
}
<android.support.design.widget.TextInputLayout
android:id="@+id/textInputLayout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:hintTextAppearance="@style/TextInputLayoutHintAppearance">
<EditText
android:id="@+id/editText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:inputType="textEmailAddress"
android:hint="HintText"
android:ems="10"/>
</android.support.design.widget.TextInputLayout>
compile 'com.android.support:design:22.2.0'
<android.support.design.widget.FloatingActionButton
android:id="@+id/floating_action_button"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:src="@drawable/XXXX"
android.support.design:backgroundTint="@color/fab_bg"
android:contentDescription="@string/XXXX"/>
FABのカラーはデフォルト:colorAccentです。もしカラーを変更する場合はandroid.support.design:backgroundTint属性でカラーを指定します。
androidTestCompile 'com.android.support.test.espresso:espresso-intents:2.1'
@RunWith(AndroidJUnit4.class)
@LargeTest
public class MainActivityIntentTest {
@Rule
public IntentsTestRule<MainActivity> mActivityRule = new IntentsTestRule<>(
MainActivity.class);
@Before
public void stubAllExternalIntents() {
// By default Espresso Intents does not stub any Intents. Stubbing needs to be setup before
// every test run. In this case all external Intents will be blocked.
intending(not(isInternal()))
.respondWith(new Instrumentation.ActivityResult(Activity.RESULT_OK, null));
}
@Test
public void callPhone() {
// call action
onView(withId(R.id.callButton)).perform(click());
// test
intended(allOf(
hasAction(Intent.ACTION_CALL),
hasData("tel:0123456789"),
toPackage("com.android.server.telecom")));
}
}
テストクラスは次のように作成します。
@Rule
public IntentsTestRule<MainActivity> mActivityRule = new IntentsTestRule<>(MainActivity.class) {
/**
* Activity起動用Intent
*/
@Override
protected Intent getActivityIntent() {
Intent intent = new Intent();
// Activity起動用のパラメータをセット
intent.putExtra(KEY_DATA,data);
return intent;
}
};