在下面显示的图中,我有3个模块(作为android库)扩展了基础"通用组件模块",所有这3个模块将被添加到单个Android应用程序中.所有3个模块都是独立的模块,但当它作为一个应用程序时,它需要共享一些数据,启动其他模块并需要更多的相互通信.
那么有谁能让我知道如何在这种架构中实现"数据共享层"和"导航控制器"?
示例:Module1 - > Login,Module2 - > Profile Management等,根据应用需要可能有"n"个模块.
我一直试图通过电子邮件链接或某些社交网站上的帖子启动应用程序.问题是在android上的某些设备或某些gmail应用程序中没有显示我指定的锚标签或链接.
在intent-filter下面,我设置为我的行为是:
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="myappname" />
Run Code Online (Sandbox Code Playgroud)
我正在发送带有此锚标记的电子邮件
myappname://processtobedone/?id=1
Run Code Online (Sandbox Code Playgroud)
它适用于我在华为设备上的电子邮件应用程序,但在设备的默认gmail应用程序中,它没有显示它有链接,并且在某些设备中默认情况下它附加https:作为标签的后缀并启动浏览器.
我想在Circle Shape中设计xml页面(如Google Chrome徽标).它应该包含外圈中的按钮以及内部cirlce中的按钮.请给我建议克服这个问题.我尝试过绝对布局,但我无法做到.

我需要这样的布局.希望有更好的回应.提前致谢.
我一直在寻找在单个shapes.xml中定义不同形状的可能性,并在某些特定事件中引用每个形状.
最后我找到了解决问题的方法.答案是使用级别列表.
<?xml version="1.0" encoding="utf-8"?>
<level-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:maxLevel="0">
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<gradient android:startColor="#aaa"
android:endColor="#eee" android:angle="270" />
<corners android:bottomRightRadius="7dp"
android:bottomLeftRadius="7dp" android:topLeftRadius="7dp"
android:topRightRadius="7dp" />
</shape>
</item>
<item android:maxLevel="1">
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">
<gradient android:startColor="#eee" android:centerColor="#ddd"
android:endColor="#00fff2" android:angle="270" />
<corners android:bottomRightRadius="7dp"
android:bottomLeftRadius="7dp" android:topLeftRadius="7dp"
android:topRightRadius="7dp" />
</shape>
</item>
</level-list>
Run Code Online (Sandbox Code Playgroud)
将其应用于样式中的background属性.通过将级别设置为该元素,可以实现不同形状的交换.
例如: findViewById(R.id.mybutton).getBackground().setLevel(1);
在上面的代码中,我将第二个形状设置为id为mybutton的按钮.
我想知道在双 SIM 卡安卓设备上通过选定的 SIM 卡从安卓拨打电话的可能性。是否可以通过编程选择特定的 SIM 卡进行呼叫?
嗨,大家好我试图在显示相机预览时切换设备的前后相机.我正在关注普通商品提供的样品.下面是我正在使用的代码,每当我点击翻转按钮时,表面视图变黑,我不知道我哪里出错了.请帮我解决这个问题.我搜索了这个,我没有得到任何合适的答案,因为有些人试图重新启动当前活动,但我不想那样.希望有更好的回应.提前致谢.
package com.commonsware.android.camera;
import android.app.Activity;
import android.hardware.Camera;
import android.os.Bundle;
import android.util.Log;
import android.view.SurfaceHolder;
import android.view.SurfaceView;
import android.widget.CompoundButton;
import android.widget.CompoundButton.OnCheckedChangeListener;
import android.widget.Toast;
import android.widget.ToggleButton;
public class PreviewDemo extends Activity {
private SurfaceView preview = null;
private SurfaceHolder previewHolder = null;
private Camera camera = null;
private boolean inPreview = false;
private boolean cameraConfigured = false;
private ToggleButton flipCamera;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
flipCamera = (ToggleButton) findViewById(R.id.flip);
preview = (SurfaceView) findViewById(R.id.preview);
previewHolder = preview.getHolder();
previewHolder.addCallback(surfaceCallback);
previewHolder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);
flipCamera.setOnCheckedChangeListener(new OnCheckedChangeListener() …Run Code Online (Sandbox Code Playgroud) 这个问题可能看起来很简单,但我不知道答案.在登录页面中,我有两个edittext,当第一个edittext聚焦时,键盘出现并隐藏第二个edittext,这对我来说是个问题.我需要的是,当键盘出现时,它不应该隐藏第二个edittext,而应该显示它们.等待有价值的评论和回应.
编辑:#1
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_height="fill_parent">
<RelativeLayout android:orientation="vertical"
android:layout_width="fill_parent" android:layout_height="fill_parent"
android:background="@drawable/login_bg">
<!-- <ScrollView android:layout_width="fill_parent" android:layout_height="fill_parent"
android:id="@+id/loginScrollView" android:layout_above="@+id/footer" android:scrollbars="vertical"
android:fadingEdge="none"> -->
<LinearLayout android:orientation="vertical"
android:layout_width="fill_parent" android:layout_height="fill_parent"
android:id="@+id/loginMainLayout" android:layout_above="@+id/footer">
<ImageView android:layout_width="fill_parent" android:id="@+id/logo_image_login"
android:layout_height="0dip" android:layout_weight="27"
android:src="@drawable/video_date_logo_a" android:scaleType="fitCenter"
android:layout_marginTop="20dip" android:layout_marginBottom="0dip"></ImageView>
<TableLayout android:layout_width="fill_parent"
android:layout_height="0dip" android:layout_weight="23"
android:paddingLeft="5dip" android:paddingRight="5dip">
<TableRow android:layout_marginLeft="10dip"
android:layout_height="0dip" android:layout_weight="1"
android:layout_marginRight="5dip" android:layout_marginTop="10dip"
android:layout_marginBottom="5dip" android:gravity="center_vertical">
<TextView android:layout_width="0dip"
style="@style/ivideodate.blue.small" android:layout_weight="0.35"
android:layout_height="wrap_content" android:text="@string/login_email"></TextView>
<EditText android:layout_width="0dip" android:id="@+id/login_emailid"
android:layout_weight="0.80" android:layout_height="wrap_content"
android:maxLength="40" android:singleLine="true" android:text=""
style="@style/ivideodate.black.input" android:background="@drawable/tagline_bg_a"
android:focusableInTouchMode="true" android:layout_marginRight="5dip"
android:inputType="textEmailAddress"></EditText>
</TableRow>
<TableRow android:layout_marginLeft="10dip"
android:layout_marginRight="5dip" android:layout_marginTop="10dip"
android:layout_marginBottom="5dip" android:layout_height="0dip"
android:layout_weight="1" android:gravity="center_vertical"> …Run Code Online (Sandbox Code Playgroud) 我在某些设备上遇到了我的应用程序的奇怪行为.每次我的应用程序最小化并重新打开时,我的应用程序从一开始就重新启动.这只发生在一些设备上,我不知道为什么会发生这种情况.有没有人遇到过这种问题?请让我知道解决方案.