小编Jee*_*eva的帖子

Android - 如何获取当前位置(经度和纬度)?

我使用以下代码来获取当前位置即(纬度和经度),但我没有获得当前位置(纬度和经度).

谁知道为什么?

package com.ram.currentlocation;

import android.app.Activity;    
import android.content.Context;
import android.location.Location;
import android.location.LocationListener;
import android.location.LocationManager;
import android.os.Bundle;
import android.widget.Toast;

public class Location_Gps extends Activity
{

    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState)
    {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.main);

      /* Use the LocationManager class to obtain GPS locations */
      LocationManager mlocManager = (LocationManager)getSystemService(Context.LOCATION_SERVICE);

      LocationListener mlocListener = new MyLocationListener();
      mlocManager.requestLocationUpdates( LocationManager.GPS_PROVIDER, 0, 0, mlocListener);
    }

    /* Class My Location Listener */
    public class MyLocationListener implements LocationListener
    {

      @Override
      public …
Run Code Online (Sandbox Code Playgroud)

android geolocation latitude-longitude google-latitude geocode

17
推荐指数
2
解决办法
7万
查看次数

设置AlertBox标题栏背景颜色

如何更改警报框标题栏的背景颜色?

AlertDialog.Builder alert=new AlertDialog.Builder(getParent());
alert.setTitle("sample");
alert.show();
Run Code Online (Sandbox Code Playgroud)

android background android-alertdialog

9
推荐指数
1
解决办法
2万
查看次数

如何检查wp7中的InternetConnection?

我想检查我的应用程序中的互联网连接.但是,它没有正确显示.

我正在使用此代码进行互联网连接:

 NetworkInterface.GetIsNetworkAvailable();
Run Code Online (Sandbox Code Playgroud)

在此代码中始终返回true value.if net available或not available仅返回true.

如果有人知道告诉我这样做的想法.

谢谢.

internet-connection windows-phone-7

9
推荐指数
2
解决办法
6979
查看次数

如何在android中删除Html标签?

我正在android中创建一个示例项目.我正在使用示例rss feed.

在这样的xml描述中,

 <![CDATA[
    <p>15&nbsp;Mar&nbsp;2012</p>
     <a href="http://newsonair.nic.in/full_news.asp?TOP2">
     <p style='FONT-SIZE: 12px; LINE-HEIGHT: 150%' align='justify'>
 <img style='FLOAT: left; MARGIN-RIGHT: 5px' height='100' width='100' src=http://www.newsonair.nic.in/writereaddata/news_pictures/PICNEWS1.jpg?
0.7055475></a><br/> 
Parliament was today disrupted over the issue of removal of Trinamool Congress&#39;s leader and the Railway Minister, Mr.Dinesh Trivedi from the Council of Ministers.</p><br clear="all" />
    ]]>
Run Code Online (Sandbox Code Playgroud)

我想要这样显示,

Parliament was today disrupted over the issue of removal of Trinamool Congress&#39;s leader and the Railway Minister, Mr.Dinesh Trivedi from the Council of Ministers.
Run Code Online (Sandbox Code Playgroud)

任何人都可以说出这个想法.谢谢.

html android textview

9
推荐指数
2
解决办法
2万
查看次数

如何使Tablayout指标和文本的宽度相同

在我的应用程序中,我正在使用tablayout.一切正常,但我想tablayout文本和指标线都应该相同的大小.

但左右指示器宽度占用额外空间.如何删除额外的空间或使其宽度相等.

需要的

谢谢

android android-layout android-tablayout

5
推荐指数
0
解决办法
1813
查看次数

Android转换列表<String []>到String []

Android如何转换List<String[]>String[].....

android

4
推荐指数
1
解决办法
2万
查看次数

Android:如何使用泰米尔语字体

这是我的泰米尔语html unicode字符串

முதல்பக்கக்திகள்

我正在使用此代码:

    TextView text=(TextView)findViewById(R.id.text); // initialize to your textview
    Typeface tf = Typeface.createFromAsset(this.getAssets(),"fonts/tamil.ttf");
    text.setTypeface(tf);
    text.setText("????? ???? ?????????");
Run Code Online (Sandbox Code Playgroud)

在Android中,这可能吗?

layout fonts android textview typeface

4
推荐指数
1
解决办法
8047
查看次数

如何在Listbox中实现Hold?

如果按住列表框,我想获得列表框索引.

这是我的代码:

<ListBox Margin="0,0,-12,0" 
         Hold="holdlistbox" 
         x:Name="listbox" 
         SelectionChanged="listbox_SelectionChanged" 
         SelectedIndex="-1">
</ListBox>



private void holdlistbox(object sender, System.Windows.Input.GestureEventArgs e)
{
    //How to get ListBox index here
}  
Run Code Online (Sandbox Code Playgroud)

如果有人知道帮助我这样做.

listbox selectedindex tapandhold windows-phone-7

4
推荐指数
1
解决办法
2503
查看次数

Windows 7手机倾斜效果?

如何使用listbox添加TiltEffect for datepicker和stackpanel?

effects windows-phone-7

1
推荐指数
2
解决办法
2033
查看次数

手机:WebBrowser禁用平移/缩放wp7?

我正在使用此代码,

 <phone:WebBrowser Foreground="White" Opacity="0" Height="600" Width="430" x:Name="weblink" LoadCompleted="weblink_LoadCompleted" VerticalAlignment="Top"/>
Run Code Online (Sandbox Code Playgroud)

在这段代码中我想禁用手机中的平移/缩放:WebBrowser.

如果有人知道这个想法请分享到这里.

谢谢.

browser zoom windows-phone-7

0
推荐指数
1
解决办法
4217
查看次数