我尝试了几件事,没有任何工作......我正在尝试在Android上的ImageView上更改BackgroundColor,但没有任何反应......
这是我的xml:
<ImageView
android:id="@+id/imageView1"
android:layout_width="350dp"
android:layout_height="550dp"
android:layout_above="@+id/btnInfo"
android:layout_alignLeft="@+id/fundo"
android:layout_alignRight="@+id/btnInfo"
android:layout_alignTop="@+id/fundo"
android:layout_centerHorizontal="true"
android:contentDescription="@string/backgroundMain" />
Run Code Online (Sandbox Code Playgroud)
和代码:
public void onStart()
{
super.onStart();
Log.d("Teste", "In the onStart() event 5");
ImageView backgroundImg = (ImageView) findViewById(R.id.imageView1);
backgroundImg.setBackgroundColor(Color.rgb(255, 255, 255));
}
Run Code Online (Sandbox Code Playgroud)
我错过了什么?
我正在尝试使用下面的代码使用PHP在body64上发送带有base64图像的电子邮件,但图像永远不会出现...如果我更改为URL它可以工作,但它不适用于base64 ..我在一个新的页面上测试了base64只用了<img src=base64>并且也工作了......我错过了什么?
<?php
// recipients
$to = $_POST['email'];
// subject
$subject = 'Test';
// message
$message = '
<html>
<head>
<title>Test</title>
</head>
<body>
<img src="'.$_POST['imageFromOtherPage'].'"/>
</body>
</html>
';
// To send HTML mail, the Content-type header must be set
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
// Mail it
mail($to, $subject, $message, $headers);
?>
Run Code Online (Sandbox Code Playgroud)
这是我的base64图像示例:http://jsfiddle.net/28nP4/