我有以下代码来调用新活动
现在我想使用变量来调用新活动
String var1,var2,var3; VAR1 = "登录"; VAR2 = "注册"; VAR3 = "多";
Intent i;
i = new Intent(Favorites.this, Login.class); --> login.class with var
startActivity(i);
Run Code Online (Sandbox Code Playgroud)
任何人都可以指导我如何实现这个???
同时显示进度条我想禁用触摸屏来限制Android手机中的其他功能.
任何人都可以指导我如何实现这一目标吗?
任何帮助都会被批评.
如果我在TextView中添加字符串,例如,
this is my string
Run Code Online (Sandbox Code Playgroud)
和TextView最大长度为4
如果字符串大小大于最大长度,它应该看起来像在活动中this...或者t...意味着字符串在指定字符串的末尾继续符号.
任何人都可以指导我应该做什么,或者我必须通过编程在字符串末尾手动添加"...".
任何帮助,将不胜感激.
我正在使用android:imeOptions ="actionSearch"
在editText中我的问题是,如果用户在Softkeyboard上按下Searchbutton,我可以编写自己的事件吗?
我希望执行软键盘搜索按钮的功能类似于我们在android活动上使用的按钮.
任何帮助都会得到满足.
我创建了以下布局.
<TableLayout android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
>
<TableRow>
<TextView android:layout_width="fill_parent"
android:layout_height="wrap_content" android:text="Post As" />
<Spinner
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="@+id/ddlPostAs"
/>
</TableRow>
<TableRow>
<TextView android:layout_width="fill_parent"
android:layout_height="wrap_content" android:text="Expires In" />
<Spinner
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="@+id/ddlExpiryOn"
/>
</TableRow>
</TableLayout>
Run Code Online (Sandbox Code Playgroud)
其中android spinner根据数据更改其宽度.我想阻止它.
任何人都可以指导我如何实现这一目标吗?
任何帮助都会得到满足.
朋友们,
我正在使用跟随onDraw方法在屏幕上显示位图.
@Override
public void onDraw(Canvas canvas) {
Bitmap _scratch = BitmapFactory.decodeResource(getResources(), R.drawable.icon2);
//ImageView img= new ImageView(Tutorial2D.this);
//img.setImageBitmap(_scratch);
canvas.drawColor(Color.BLACK);
canvas.drawBitmap(_scratch, 0, 0, null);
}
Run Code Online (Sandbox Code Playgroud)
图像显示在屏幕上,但有些部分因为android屏幕很小我怎么能在整个Android屏幕上显示完整的图像?
我可以在画布中将图像的ScaleType设置为fitxy吗?
要么
我可以添加Android布局图像到这个画布,以便我可以设置fitxy属性或图像,因为我已经评论了代码?
任何帮助,将不胜感激.
朋友们,
我想使用java代码或动态设置layout_marginBottom
在列表视图或linearlayout中
任何人都指导我如何实现这一目标?
任何帮助,将不胜感激.
请指导我在这做什么错?任何帮助,将不胜感激.
private void LoopThroughEachATMToDisplayOnMap()
{
Drawable drawable = null;
for (int i = 0; i < atm.getAtmList().size(); i++) {
if(breakFlag)
break;
drawable = getAppropriatePin(i);
if(drawable == null)
drawable = getResources().getDrawable(R.drawable.marker);
itemizedOverlay = new MyItemizedOverlay(drawable, mapView);
ATM a = atm.getAtmList().get(i);
if (a != null) {
int[] coordinates = getIntCoordinates(a
.getCoordinates());
if (coordinates != null) {
GeoPoint point = new GeoPoint(coordinates[0],
coordinates[1]);
OverlayItem overlayItem = new OverlayItem(
point, a.getBankName(), a.getAddress()
+ "@@" + a.getPhone() + "@@"
+ a.getWebAddress() + "@@"
+ a.getCoordinates()); …Run Code Online (Sandbox Code Playgroud) 我试图在webview中显示html,但问题是它显示的是欧元符号而不是'
当我通过调试看html它显示一切正常但不在webview中.任何人都指导我这个问题的解决方案是什么?
我的代码

_webView.getSettings().setJavaScriptEnabled(true);
_webView.getSettings().setPluginsEnabled(true);
_webView.loadData(_urlfromSummarie, "text/html", "UTF-8");
Run Code Online (Sandbox Code Playgroud)
任何帮助,将不胜感激.
android ×10
eclipse ×1
google-maps ×1
layout ×1
listactivity ×1
spinner ×1
textview ×1
webview ×1