如何显示3级以上的可扩展列表视图,我只获得3级可扩展的示例.
参考:三级可扩展列表
在这个例子中,他在getChildViewParentLevel的方法中 添加了一个可扩展列表 BaseExpandableListAdapter:
CustExpListview SecondLevelexplv = new CustExpListview(Home.this);
SecondLevelexplv.setAdapter(new SecondLevelAdapter());
SecondLevelexplv.setGroupIndicator(null);
return SecondLevelexplv;
Run Code Online (Sandbox Code Playgroud)
所以我同样在getChildView方法中添加一个可扩展列表SecondLevelAdapter.
它的工作但是View不像3级可扩展列表视图那样正常.我读过这个:
请指导或分享我在android中的多级可扩展显示的合适示例.
谢谢,
我的应用程序想要在Google Plus上共享图像我已经阅读了关于Google Plus和API的信息,我们可以使用PlusShare.Builder发布媒体文件.我也搜索了stackoverflow但是没有得到任何正确的答案.我试过这些代码是:
case R.id.Share:
if (mPlusClient.isConnected()) {
Intent shareIntent = new PlusShare.Builder(this,mPlusClient)
.setType("image/*")
.setText("Risk Score")
.addStream(Uri.fromFile(new File(Path)))
.getIntent();
startActivityForResult(shareIntent, REQ_START_SHARE);
}
break;
Run Code Online (Sandbox Code Playgroud)
和
case R.id.Share:
Intent shareIntent = ShareCompat.IntentBuilder.from(PlusActivity.this)
.setText("This site has lots of great information about Android! http://www.android.com")
.setType("image/*").addStream(Uri.fromFile(new File(Path)))
.getIntent().setPackage("com.google.android.apps.plus");
startActivityForResult(shareIntent, REQ_START_SHARE);
break;
Run Code Online (Sandbox Code Playgroud)
和
case R.id.Share:
Intent shareIntent = new PlusShare.Builder(this,mPlusClient)
.setType("image/*")
.setText("Risk Score")
.addStream(Uri.fromFile(new File(Path)))
.getIntent();
startActivityForResult(shareIntent, REQ_START_SHARE);
break;
Run Code Online (Sandbox Code Playgroud)
每次我遇到同样的问题.
12-05 12:19:57.316: E/AndroidRuntime(4688): FATAL EXCEPTION: main
12-05 12:19:57.316: E/AndroidRuntime(4688): android.content.ActivityNotFoundException: No Activity …Run Code Online (Sandbox Code Playgroud) 我试图在谷歌+上传媒体文件,我已经在谷歌控制台创建了客户端ID.我上传方法表格
附加媒体
在运行应用程序时,我遇到异常
Media result = null;
try {
result = insertRequest.execute();
} catch (IOException e1) {
// TODO Auto-generated catch block
// e1.printStackTrace();
Log.e("result exception", "" + e1);
}
Run Code Online (Sandbox Code Playgroud)
例外是:
12-09 18:49:20.983: E/result exception(26301):com.google.api.client.googleapis.json.GoogleJsonResponseException: 403 Forbidden
12-09 18:49:20.983: E/result exception(26301): {
12-09 18:49:20.983: E/result exception(26301): "code" : 403,
12-09 18:49:20.983: E/result exception(26301): "errors" : [ {
12-09 18:49:20.983: E/result exception(26301): "domain" : "global",
12-09 18:49:20.983: E/result exception(26301): "message" : "Forbidden",
12-09 18:49:20.983: E/result exception(26301): "reason" : "forbidden"
12-09 …Run Code Online (Sandbox Code Playgroud) 我的要求是添加联系人到我的自定义帐户,这是相应的.
该Settings -> + Add account屏幕显示,提供账户管理所有应用程序的列表; 即,我的应用程序名称也显示在那里.但是,我的要求是不在该列表上显示我的应用程序.
AccountManagerActivity.java
public class AccountManagerActivity extends AccountAuthenticatorActivity {
EditText etName, etPhone;
Button btnSave;
String strName, strPhone;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
etName = (EditText) findViewById(R.id.etName);
etPhone = (EditText) findViewById(R.id.etPhone);
btnSave = (Button) findViewById(R.id.btnSave);
btnSave.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
if (etName.getText().toString() == null|| etName.getText().toString().equalsIgnoreCase("")|| etPhone.getText().toString() == null|| etPhone.getText().toString().equalsIgnoreCase(""))
{
Toast.makeText(getApplicationContext(),"Enter Name And Phone", Toast.LENGTH_LONG).show();
}
else
{
strName = etName.getText().toString();
strPhone = etPhone.getText().toString(); …Run Code Online (Sandbox Code Playgroud)