我试过这个指南
https://github.com/ashqal/ChromeLikeSwipeLayout
package com.psiphon3.statusactivity;
import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Toast;
import com.asha.ChromeLikeSwipeLayout;
import static com.asha.ChromeLikeSwipeLayout.dp2px;
public class StatusActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.nameless);
ChromeLikeSwipeLayout chromeLikeSwipeLayout = (ChromeLikeSwipeLayout) findViewById(R.id.chrome_like_swipe_layout);
ChromeLikeSwipeLayout.makeConfig()
.addIcon(R.drawable.selector_icon_add)
.radius(dp2px(35))
.gap(dp2px(5))
.circleColor(0xFF11CCFF)
.gummyDuration(1000)
.rippleDuration(1000)
.collapseDuration(1000)
.listenItemSelected(new ChromeLikeSwipeLayout.IOnItemSelectedListener() {
@Override
public void onItemSelected(int position) {
}
})
.setTo(chromeLikeSwipeLayout);
}
}
这是我的问题: 我可以使用哪些代码在此代码中启动新活动?
public void onItemSelected(int position) {
}
答案 0 :(得分:0)
Intent intent = new Intent(StatusActivity.this, NewActivity.class);
StatusActivity.this.startActivity(intent);