android-获取手机小区信息界面设计

本文详细介绍了如何在Android应用程序中实现获取手机所在小区信息的功能,并探讨了相关的界面设计思路和技术实现步骤。
摘要由CSDN通过智能技术生成

1. manifests

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.npsmaster.phoneinfo">

    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:supportsRtl="true"
        android:theme="@style/AppTheme">
        <activity android:name=".MainActivity">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" >
    </uses-permission>
    <uses-permission android:name="android.permission.READ_PHONE_STATE" />
    <uses-permission android:name="com.android.launcher.permission.READ_SETTINGS" />
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" >
    </uses-permission>
</manifest>
2.main
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/activity_main"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingBottom="@dimen/activity_vertical_margin"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    tools:context="com.npsmaster.phoneinfo.MainActivity">
<!--start-->
    <LinearLayout
        android:orientation="vertical"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:id="@+id/childlayout"
        android:layout_alignParentTop="true"
        android:layout_alignParentLeft="true"
        android:layout_alignParentStart="true">
        <TableLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:background="#ffcccccc"
            android:layout_margin="1dp">
            <!-- line1 -->
            <TableRow
                android:layout_width="match_parent"
                android:layout_height="20dp"
                android:background="#ffcccccc"
                android:layout_margin="0.5dp">

                <TextView
                    android:text="General Information"
                    android:layout_marginTop="5dp"
                    android:layout_width="0.0dp"
                    android:layout_height="20dp"
                    android:layout_weight="1"
                    android:id="@+id/tvStaticInfoLable">
                </TextView>
                <TextView
                    android:text="Time:"
                    android:layout_marginTop="5dp"
                    android:layout_width="0.0dp"
                    android:layout_height="20dp"
                    android:layout_weight="1"
                    android:id="@+id/tvTimeleaps">
                </TextView>
            </TableRow>
            <!--line2-->
            <TableRow
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值