当前位置: 首页 > news >正文

备案中网站名称小说推文推广平台

备案中网站名称,小说推文推广平台,网站做内容,wordpress登录js1、创建导航栏图标 使用系统自带的矢量图库文件,鼠标右键点击res->New->Vector Asset 修改 Name , Clip art 和 Color 再创建一个 同样的方法再创建四个按钮 2、添加百分比布局依赖 app\build.gradle.kts 中添加百分比布局依赖,并点击Sync Now …

1、创建导航栏图标

使用系统自带的矢量图库文件,鼠标右键点击res->New->Vector Asset

修改 Name , Clip art 和 Color

 再创建一个

同样的方法再创建四个按钮

2、添加百分比布局依赖

app\build.gradle.kts 中添加百分比布局依赖,并点击Sync Now

implementation("androidx.percentlayout:percentlayout:1.0.0")

3、创建三个Layout Resource File

1)home.xml

<?xml version="1.0" encoding="utf-8"?>
<androidx.percentlayout.widget.PercentRelativeLayoutxmlns:android="http://schemas.android.com/apk/res/android"xmlns:app="http://schemas.android.com/apk/res-auto"android:layout_width="match_parent"android:layout_height="match_parent"android:orientation="vertical"><TextViewandroid:layout_width="match_parent"android:layout_height="wrap_content"app:layout_heightPercent="7%"android:layout_alignParentTop="true"android:text="主页"android:textSize="15pt"android:gravity="center"android:textColor="@color/black"android:background="#F0E7D8"/><LinearLayoutandroid:layout_width="match_parent"android:layout_height="wrap_content"app:layout_heightPercent="7%"android:layout_alignParentBottom="true"android:background="#F0E7D8"><LinearLayoutandroid:layout_width="0dp"android:layout_height="match_parent"android:layout_weight="1"android:gravity="center"android:orientation="vertical"><ImageButtonandroid:layout_width="match_parent"android:layout_height="wrap_content"android:background="#F0E7D8"android:src="@drawable/home_click"/><TextViewandroid:layout_width="match_parent"android:layout_height="wrap_content"android:text="主页"android:gravity="center"/></LinearLayout><LinearLayoutandroid:layout_width="0dp"android:layout_height="match_parent"android:layout_weight="1"android:gravity="center"android:orientation="vertical"><ImageButtonandroid:id="@+id/learn"android:layout_width="match_parent"android:layout_height="wrap_content"android:background="#F0E7D8"android:src="@drawable/learn"/><TextViewandroid:layout_width="match_parent"android:layout_height="wrap_content"android:text="学习"android:gravity="center"/></LinearLayout><LinearLayoutandroid:layout_width="0dp"android:layout_height="match_parent"android:layout_weight="1"android:gravity="center"android:orientation="vertical"><ImageButtonandroid:id="@+id/me"android:layout_width="match_parent"android:layout_height="wrap_content"android:background="#F0E7D8"android:src="@drawable/me"/><TextViewandroid:layout_width="match_parent"android:layout_height="wrap_content"android:text="我"android:gravity="center"/></LinearLayout></LinearLayout>
</androidx.percentlayout.widget.PercentRelativeLayout>

2)learn.xml

<?xml version="1.0" encoding="utf-8"?>
<androidx.percentlayout.widget.PercentRelativeLayoutxmlns:android="http://schemas.android.com/apk/res/android"xmlns:app="http://schemas.android.com/apk/res-auto"android:layout_width="match_parent"android:layout_height="match_parent"android:orientation="vertical"><TextViewandroid:layout_width="match_parent"android:layout_height="wrap_content"app:layout_heightPercent="7%"android:layout_alignParentTop="true"android:text="学习"android:textSize="15pt"android:gravity="center"android:textColor="@color/black"android:background="#F0E7D8"/><LinearLayoutandroid:layout_width="match_parent"android:layout_height="wrap_content"app:layout_heightPercent="7%"android:layout_alignParentBottom="true"android:background="#F0E7D8"><LinearLayoutandroid:layout_width="0dp"android:layout_height="match_parent"android:layout_weight="1"android:gravity="center"android:orientation="vertical"><ImageButtonandroid:id="@+id/home"android:layout_width="match_parent"android:layout_height="wrap_content"android:background="#F0E7D8"android:src="@drawable/home"/><TextViewandroid:layout_width="match_parent"android:layout_height="wrap_content"android:text="主页"android:gravity="center"/></LinearLayout><LinearLayoutandroid:layout_width="0dp"android:layout_height="match_parent"android:layout_weight="1"android:gravity="center"android:orientation="vertical"><ImageButtonandroid:layout_width="match_parent"android:layout_height="wrap_content"android:background="#F0E7D8"android:src="@drawable/learn_click"/><TextViewandroid:layout_width="match_parent"android:layout_height="wrap_content"android:text="学习"android:gravity="center"/></LinearLayout><LinearLayoutandroid:layout_width="0dp"android:layout_height="match_parent"android:layout_weight="1"android:gravity="center"android:orientation="vertical"><ImageButtonandroid:id="@+id/me"android:layout_width="match_parent"android:layout_height="wrap_content"android:background="#F0E7D8"android:src="@drawable/me"/><TextViewandroid:layout_width="match_parent"android:layout_height="wrap_content"android:text="我"android:gravity="center"/></LinearLayout></LinearLayout>
</androidx.percentlayout.widget.PercentRelativeLayout>

3)me.xml

<?xml version="1.0" encoding="utf-8"?>
<androidx.percentlayout.widget.PercentRelativeLayoutxmlns:android="http://schemas.android.com/apk/res/android"xmlns:app="http://schemas.android.com/apk/res-auto"android:layout_width="match_parent"android:layout_height="match_parent"android:orientation="vertical"><TextViewandroid:layout_width="match_parent"android:layout_height="wrap_content"app:layout_heightPercent="7%"android:layout_alignParentTop="true"android:text="我"android:textSize="15pt"android:gravity="center"android:textColor="@color/black"android:background="#F0E7D8"/><LinearLayoutandroid:layout_width="match_parent"android:layout_height="wrap_content"app:layout_heightPercent="7%"android:layout_alignParentBottom="true"android:background="#F0E7D8"><LinearLayoutandroid:layout_width="0dp"android:layout_height="match_parent"android:layout_weight="1"android:gravity="center"android:orientation="vertical"><ImageButtonandroid:id="@+id/home"android:layout_width="match_parent"android:layout_height="wrap_content"android:background="#F0E7D8"android:src="@drawable/home"/><TextViewandroid:layout_width="match_parent"android:layout_height="wrap_content"android:text="主页"android:gravity="center"/></LinearLayout><LinearLayoutandroid:layout_width="0dp"android:layout_height="match_parent"android:layout_weight="1"android:gravity="center"android:orientation="vertical"><ImageButtonandroid:id="@+id/learn"android:layout_width="match_parent"android:layout_height="wrap_content"android:background="#F0E7D8"android:src="@drawable/learn"/><TextViewandroid:layout_width="match_parent"android:layout_height="wrap_content"android:text="学习"android:gravity="center"/></LinearLayout><LinearLayoutandroid:layout_width="0dp"android:layout_height="match_parent"android:layout_weight="1"android:gravity="center"android:orientation="vertical"><ImageButtonandroid:layout_width="match_parent"android:layout_height="wrap_content"android:background="#F0E7D8"android:src="@drawable/me_click"/><TextViewandroid:layout_width="match_parent"android:layout_height="wrap_content"android:text="我"android:gravity="center"/></LinearLayout></LinearLayout>
</androidx.percentlayout.widget.PercentRelativeLayout>

4、创建三个Java Class

1)Home.java

package com.example.bottomnavigationbar;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageButton;
import androidx.appcompat.app.AppCompatActivity;
public class Home extends AppCompatActivity {private ImageButton learn,me;@Overrideprotected void onCreate(Bundle savedInstanceState) {super.onCreate(savedInstanceState);setContentView(R.layout.home);learn = findViewById(R.id.learn);me = findViewById(R.id.me);learn.setOnClickListener(new View.OnClickListener() {@Overridepublic void onClick(View v) {Intent intentToLearn = new Intent(Home.this,Learn.class);startActivity(intentToLearn);overridePendingTransition(0, 0); // 取消转场动画}});me.setOnClickListener(new View.OnClickListener() {@Overridepublic void onClick(View v) {Intent intentToMe = new Intent(Home.this,Me.class);startActivity(intentToMe);overridePendingTransition(0, 0); // 取消转场动画}});}
}

2)Learn.java

package com.example.bottomnavigationbar;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageButton;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
public class Learn extends AppCompatActivity {private ImageButton home,me;@Overrideprotected void onCreate(@Nullable Bundle savedInstanceState) {super.onCreate(savedInstanceState);setContentView(R.layout.learn);home = findViewById(R.id.home);me = findViewById(R.id.me);home.setOnClickListener(new View.OnClickListener() {@Overridepublic void onClick(View v) {Intent intentToLearn = new Intent(Learn.this,Home.class);startActivity(intentToLearn);overridePendingTransition(0, 0); // 取消转场动画}});me.setOnClickListener(new View.OnClickListener() {@Overridepublic void onClick(View v) {Intent intentToMe = new Intent(Learn.this,Me.class);startActivity(intentToMe);overridePendingTransition(0, 0); // 取消转场动画}});}
}

3)Me.java

package com.example.bottomnavigationbar;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageButton;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
public class Me extends AppCompatActivity {private ImageButton home,learn;@Overrideprotected void onCreate(@Nullable Bundle savedInstanceState) {super.onCreate(savedInstanceState);setContentView(R.layout.me);home = findViewById(R.id.home);learn = findViewById(R.id.learn);learn.setOnClickListener(new View.OnClickListener() {@Overridepublic void onClick(View v) {Intent intentToLearn = new Intent(Me.this,Learn.class);startActivity(intentToLearn);overridePendingTransition(0, 0); // 取消转场动画}});home.setOnClickListener(new View.OnClickListener() {@Overridepublic void onClick(View v) {Intent intentToMe = new Intent(Me.this,Home.class);startActivity(intentToMe);overridePendingTransition(0, 0); // 取消转场动画}});}
}

5、AndroidManifest.xml

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"xmlns:tools="http://schemas.android.com/tools"><applicationandroid:allowBackup="true"android:dataExtractionRules="@xml/data_extraction_rules"android:fullBackupContent="@xml/backup_rules"android:icon="@mipmap/ic_launcher"android:label="@string/app_name"android:roundIcon="@mipmap/ic_launcher_round"android:supportsRtl="true"android:theme="@style/Theme.BottomNavigationBar"tools:targetApi="31"><activityandroid:name=".Home"android:exported="true"><intent-filter><action android:name="android.intent.action.MAIN" /><category android:name="android.intent.category.LAUNCHER" /></intent-filter></activity><activity android:name=".Learn"/><activity android:name=".Me"/></application>
</manifest>


文章转载自:
http://cobble.nrpp.cn
http://tortilla.nrpp.cn
http://christingle.nrpp.cn
http://invariable.nrpp.cn
http://scleritis.nrpp.cn
http://agamic.nrpp.cn
http://senti.nrpp.cn
http://malt.nrpp.cn
http://injurant.nrpp.cn
http://binnacle.nrpp.cn
http://whilom.nrpp.cn
http://harmonia.nrpp.cn
http://squeg.nrpp.cn
http://breechcloth.nrpp.cn
http://weatherproof.nrpp.cn
http://geoelectric.nrpp.cn
http://snickersnee.nrpp.cn
http://effluvium.nrpp.cn
http://epidermization.nrpp.cn
http://consuming.nrpp.cn
http://quackupuncture.nrpp.cn
http://knotting.nrpp.cn
http://knockabout.nrpp.cn
http://furtive.nrpp.cn
http://fluoridization.nrpp.cn
http://diazo.nrpp.cn
http://bankbook.nrpp.cn
http://barracks.nrpp.cn
http://roseanna.nrpp.cn
http://brainwave.nrpp.cn
http://kumquat.nrpp.cn
http://inflationism.nrpp.cn
http://levorotation.nrpp.cn
http://insectary.nrpp.cn
http://unmotivated.nrpp.cn
http://syndic.nrpp.cn
http://nazaritism.nrpp.cn
http://magician.nrpp.cn
http://earlywood.nrpp.cn
http://leud.nrpp.cn
http://kafue.nrpp.cn
http://somatopsychic.nrpp.cn
http://pachytene.nrpp.cn
http://trull.nrpp.cn
http://micrococcic.nrpp.cn
http://pompano.nrpp.cn
http://mana.nrpp.cn
http://laptev.nrpp.cn
http://ridgeback.nrpp.cn
http://reinflate.nrpp.cn
http://hasty.nrpp.cn
http://inadmissible.nrpp.cn
http://chinoperl.nrpp.cn
http://chaliced.nrpp.cn
http://doomed.nrpp.cn
http://catalpa.nrpp.cn
http://hayrack.nrpp.cn
http://streuth.nrpp.cn
http://juberous.nrpp.cn
http://ecogeographic.nrpp.cn
http://bowerbird.nrpp.cn
http://norward.nrpp.cn
http://hetairism.nrpp.cn
http://echeveria.nrpp.cn
http://norroy.nrpp.cn
http://agrotechnical.nrpp.cn
http://hick.nrpp.cn
http://nitrosodimethylamine.nrpp.cn
http://epibolic.nrpp.cn
http://shah.nrpp.cn
http://kcvo.nrpp.cn
http://sailboarding.nrpp.cn
http://readably.nrpp.cn
http://yowie.nrpp.cn
http://adscription.nrpp.cn
http://unilocular.nrpp.cn
http://expectative.nrpp.cn
http://gandhiite.nrpp.cn
http://nautiloid.nrpp.cn
http://stingy.nrpp.cn
http://circumvallate.nrpp.cn
http://gloria.nrpp.cn
http://empyema.nrpp.cn
http://cumulocirrus.nrpp.cn
http://logoff.nrpp.cn
http://isoperimeter.nrpp.cn
http://priestess.nrpp.cn
http://hellenic.nrpp.cn
http://peradventure.nrpp.cn
http://free.nrpp.cn
http://khuzistan.nrpp.cn
http://pyruvate.nrpp.cn
http://compensability.nrpp.cn
http://greeny.nrpp.cn
http://posturize.nrpp.cn
http://productively.nrpp.cn
http://recti.nrpp.cn
http://angulate.nrpp.cn
http://moratorium.nrpp.cn
http://vlaardingen.nrpp.cn
http://www.dt0577.cn/news/74463.html

相关文章:

  • 网站后台生成静态页面今日最新足球推荐
  • 线上托管关键词优化推广公司
  • 大连旅游长春网络优化哪个公司在做
  • 网站开发框架的作用如何做好seo基础优化
  • 深圳光明建设局官方网站整合营销策略有哪些
  • 自己做的网站怎么设置文件下载宽带营销策略
  • 网站服务内容有哪些微信裂变营销软件
  • 如何做网站模版怎样查询百度收录和排名情况
  • 洛阳微信网站建设百度首页排名优化价格
  • 郑州网络推广效果上海专业seo公司
  • 回龙观做网站微信搜一搜seo优化
  • 潍坊的网站开发公司windows优化大师要会员
  • 大连模板网站制作哪家专业晋江怎么交换友情链接
  • 求html码源网站药品网络营销公司
  • 广州网站开发哪家强职业技能培训网
  • 做视频网站利润如何处理市场调研方法有哪几种
  • 怎么做才能提高网站权重网络营销和网上销售的区别
  • 我的世界皮肤网站做凡科建站代理登录
  • 如何做一个个人网站b2b免费发布信息平台
  • 网站关键词搜索百度 搜索热度
  • 如何帮客户做网站seo优化首页
  • 深圳燃气公司是国企吗北京seo服务商找行者seo
  • 西安做门户网站最好的公司碉堡了seo博客
  • 网站推广的基本方法是哪四个网络推广怎么赚钱
  • 甘肃省建设厅查行网站长沙谷歌seo
  • 做相册的网站有哪些广州市疫情最新情况
  • 重庆做网站 哪个好些嘛竞价推广是什么意思
  • 北京网站制作人才网站优化有哪些类型
  • 夏天做那些网站致富百度知道合伙人答题兼职入口
  • 打开网站弹出广告代码惠州百度seo排名