Andriod studio学习 之 fragment高级进阶

AndroidStudio安卓原生开发_Fragment_认识使用Fragment_创建_删除fragment---Android原生开发工作笔记116 fragment多个,可以组成一个activity. 一个房子可以由多个房间组成. fragment可以是组件的概念. v4.app可以兼容老版本的. 如果直接就是app下面的fragment,只能兼容3.0以后的系统. 静态加载 fragment是用的v4.app.fragment 那么这里的mainactivity,也必须用 这里必须也用v4下的fragmentActivity ... 阅读详情
第5天Fragment高级进阶
Fragment 回退栈
radioGroupId.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {
            @Override
            public void onCheckedChanged(RadioGroup group, int checkedId) {
                switch (checkedId) {
                    case R.id.person_id:
                        manager = getSupportFragmentManager();
                        fragmentTransaction = manager.beginTransaction();
//                        fragmentTransaction.replace(R.id.frame_layout_id,new FristFragment());
                        fragmentTransaction.add(R.id.frame_layout_id,new FristFragment());
						//入栈
                        fragmentTransaction.addToBackStack("11");
                        fragmentTransaction.commit();
                        break;
                    case R.id.message_id:
                        manager = getSupportFragmentManager();
						
						//出栈
                        manager.popBackStack(); 
                        SelectActivity.this.fragmentTransaction = manager.beginTransaction();
                        SelectActivity.this.fragmentTransaction.replace(R.id.frame_layout_id,new SecondFragment());
//                        fragmentTransaction.addToBackStack(null);
                        SelectActivity.this.fragmentTransaction.commit();
                        break;

                    default:
                        break;
                }
            }
        });
         	case R.id.message_id:
manager = getSupportFragmentManager();
//  manager.popBackStack();
    fragmentTransaction = manager.beginTransaction();
    fragmentTransaction.replace(R.id.frame_layout_id,new SecondFragment());
    //添加了返回栈,点击back的时候,不会退出activity,而会返回到之前的fragment界面.
//  fragmentTransaction.addToBackStack(null);
    fragmentTransaction.commit();
     break;
Fragment 传值介绍

activity 给 fragment传值
主要涉及到一个方法是getArguments()和setArguments().
一个设置属性值,一个去取属性值.

步骤:
要传的值,放到bundle对象里;
在Activity中创建该Fragment的对象fragment,通过调用
fragment.setArguments()传递到fragment中;
然后更新fragment.
在该Fragment中通过调用getArguments()得到bundle对象,就能得到里面的值。

代码来了 这是刚创建完成的activity

package com.example.day004;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;

/**
 * activity 向 fragment 传值
 */
public class A2FActivity extends AppCompatActivity {
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_a_2_f);
    }

	//点击事件的方法
	public void click(View view) {
	}
}
这是修完以后的他的xml的布局文件
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    tools:context=".A2FActivity">

    <EditText
        android:id="@+id/et_id"
        android:hint="来啊,传点啥吧!"
        android:layout_width="match_parent"
        android:layout_height="wrap_content" />

   <!--在activity中定义了点击事件-->
    <Button
        android:id="@+id/button_id"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="点我试试"
        android:onClick="click"
        />

    <!--用来显示内容的,是个容器,里面可以放fragment-->
    <LinearLayout
        android:orientation="horizontal"
        android:id="@+id/linear_layout_id"
        android:layout_width="match_parent"
        android:layout_height="match_parent">
    </LinearLayout>

</LinearLayout>
创建fragment(右键一键完事,带布局)
package com.example.day004.fragment;


import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.example.day004.R;

/**
  *用来接受传值的
 */
public class ShowContextFragment extends Fragment {
    
    public ShowContextFragment() {
        // Required empty public constructor
    }
    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        return inflater.inflate(R.layout.fragment_show_context, container, false);
    }
}
修改后的fragment的xml布局文件
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".fragment.ShowContextFragment">
    
    <!--只加了一个Id,其他可有可无-->
    <TextView
        android:id="@+id/context_tv_id"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:textColor="@color/colorAccent"
        android:textSize="30sp"
        android:text="@string/hello_blank_fragment" />

</FrameLayout>
完整版的fragment
package com.example.day004.fragment;


import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.example.day004.R;

/**
 *用来接受传值的
 */
public class ShowContextFragment extends Fragment {

    private TextView textView;
    public ShowContextFragment() {
        // Required empty public constructor
    }
    //现在text里面的值是"hello_blank_fragment",思路就是拿到控件,重新赋值即可.
    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        View inflate = inflater.inflate(R.layout.fragment_show_context, container, false);
        //1 拿控件
        textView = inflate.findViewById(R.id.context_tv_id);
        //2 给控件赋值
        Bundle arguments = getArguments();
        if(arguments != null){ //第一次启动一定为null,所以要判断一下
            String key = arguments.getString("key");
            textView.setText(key);
        }
        return inflate;
    }

}
完整版的a2fActivity
package com.example.day004;

import android.icu.util.BuddhistCalendar;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentTransaction;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.EditText;

import com.example.day004.fragment.ShowContextFragment;

import java.io.BufferedReader;

/**
 * activity 向 fragment 传值
 */
public class A2FActivity extends AppCompatActivity {
    private FragmentManager fragmentManager;
    private FragmentTransaction fragmentTransaction;
    private EditText editText;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_a_2_f);

        //0,取到edit的控件和值
        editText =  findViewById(R.id.et_id);

        //1,在这里动态添加一个fragment
        fragmentManager = getSupportFragmentManager();
        fragmentTransaction = fragmentManager.beginTransaction();
        //注意这个布局文件,是R.layout.activity_a_2_f xml文件里的线性布局
        fragmentTransaction.add(R.id.linear_layout_id,new ShowContextFragment());
        fragmentTransaction.commit();
    }

    public void click(View view) {
        //取到输入的值
        String string = editText.getText().toString();
        //创建fragment对象
        ShowContextFragment showContextFragment = new ShowContextFragment();
        //创建bundle
        Bundle bundle = new Bundle();
        bundle.putString("key",string);
        //给fragment对象赋值
        showContextFragment.setArguments(bundle);

        //动态修改fragment
        fragmentManager = getSupportFragmentManager();
        fragmentTransaction = fragmentManager.beginTransaction();
        fragmentTransaction.replace(R.id.linear_layout_id,showContextFragment);
        fragmentTransaction.commit();
    }
}
fragment 给 activity传值

第一种:
在Activity中调用getFragmentManager()得到fragmentManager,,调用findFragmentByTag(tag)或者通过findFragmentById(id)
FragmentManager fragmentManager = getFragmentManager();
Fragment fragment = fragmentManager.findFragmentByTag(tag);

第二种:
通过回调的方式,定义一个接口(可以在Fragment类中定义),接口中有一个空的方法,在fragment中需要的时候调用接口的方法,值可以作为参数放在这个方法中,然后让Activity实现这个接口,必然会重写这个方法,这样值就传到了Activity中.
大白话,就是java的父类引用指向了子类对象

Activity中的代码
package com.example.day004;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.widget.TextView;

import com.example.day004.fragment.ShowTitleFragment;

public class F2AActivity extends AppCompatActivity implements ShowTitleFragment.MyListener {

    private TextView textView;
    @Override
    public void sendMessage(String string) {
        textView.setText(string);
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_f_2_a);
        textView = findViewById(R.id.f2a_tv_id);
    }
}
Activity中的xml文件
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:orientation="vertical"
    android:layout_height="match_parent"
    tools:context=".F2AActivity">

    <TextView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:id="@+id/f2a_tv_id"
        android:textSize="30sp"
        android:hint="提示而已"
        />

    <fragment
        android:name="com.example.day004.fragment.ShowTitleFragment"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:id="@+id/f2a_fm_id">

    </fragment>

</LinearLayout>
fragment中的代码
package com.example.day004.fragment;


import android.content.Context;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.EditText;

import com.example.day004.R;

/**
 * A simple {@link Fragment} subclass.
 */
public class ShowTitleFragment extends Fragment {

    private EditText editText;
    private Button button;

    private MyListener listener;

    public ShowTitleFragment() {
        // Required empty public constructor
    }

    @Override
    public void onAttach(Context context) {
        super.onAttach(context);
        //拿到与当前fragment关联的Activity.
        listener = (MyListener) getActivity(); 
    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        View inflate = inflater.inflate(R.layout.fragment_show_title, container, false);

       //取到所有控件
        editText = inflate.findViewById(R.id.fm_title_et_id);
        button = inflate.findViewById(R.id.fm_title_button_id);
        //点击事件
        button.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                String string = editText.getText().toString();
                if(string != null){
                    //注意了.这里是父类引用指向了子类对象,其实是activity中的sendmessage方法在执行.
                    listener.sendMessage(string);
                }
            }
        });
		//返回fragment中的布局视图
        return inflate;
    }

   //自定义的接口
    public interface MyListener{
        void sendMessage(String string);
    }

}
fragment的xml文件
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    tools:context=".fragment.ShowTitleFragment">
    
    <EditText
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:id="@+id/fm_title_et_id"
        android:hint="整的啥吧"
        />

    <Button
        android:id="@+id/fm_title_button_id"
        android:text="发送了啊"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content" />

</LinearLayout>
fragment 给 fragment 传值

第一种:
动态创建的fragment通过findFragmentByTag得到另一个的Fragment的对象,这样就可以调用另一个的方法了。
静态创建的fragment通过findFragmentById得到另一个的Fragment的对象,这样就可以调用另一个的方法了。

package com.example.day005.fragment;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentTransaction;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
import com.example.day005.R;

/**
 * A simple {@link Fragment} subclass.
 */
public class LeftFragment extends Fragment {

    private EditText editText;
    private Button send_button;

    public LeftFragment() {
    }
    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        View inflate = inflater.inflate(R.layout.fragment_left, container, false);
        editText = inflate.findViewById(R.id.left_textView_id);
        send_button = inflate.findViewById(R.id.left_button_id);

        send_button.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                String string = editText.getText().toString();
                
                **了解一种即可,不重点**
                //1 fragment传值方式1
                // 通过id找的指定fragment,调用他的方法,给他的组件赋值.
                FragmentManager fragmentManager = getFragmentManager(); //注意,这个manager是v4包下的.
                RightFragment rightFragment=(RightFragment) fragmentManager.findFragmentById(R.id.right_fragment_id);
                rightFragment.setTextView(string);

                //2 通过id找的指定fragment,得到他所有的view.在通过findViewById 找到组件.赋值
                TextView textView = getFragmentManager().findFragmentById(R.id.right_fragment_id).getView().findViewById(R.id.right_textview_id);
                textView.setText(string);

                //3
                //因为两个fragment在一个activity里面,所有可以通过拿到activity里面所有的指定组件.
                TextView textView = (TextView) getActivity().findViewById(R.id.right_textview_id);
                textView.setText(string);

            }
        });
        return inflate;
    }
}

第二种(重点)

通过接口回调的方式。
与上面的接口回调用法相同

第三种:
通过setArguments,getArguments的方式。

fragment 多层嵌套
与正常使用区别不大

 FragmentManager childFragmentManager = getChildFragmentManager();
 FragmentTransaction fragmentTransaction = childFragmentManager.beginTransaction();
 fragmentTransaction.add(R.id.left_fragment_id,new RightFragment());
 fragmentTransaction.commit();

案例(微信底部按钮与fragment实现界面切换)

activity中的代码
package com.example.day004.activities;

import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentTransaction;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.widget.FrameLayout;
import android.widget.RadioButton;
import android.widget.RadioGroup;
import android.widget.Toast;

import com.example.day004.R;
import com.example.day004.fragment.FristFragment;
import com.example.day004.fragment.SecondFragment;

/**
 * 底部导航
 */
public class SelectActivity extends AppCompatActivity {
    private FrameLayout frameLayoutId;
    private RadioGroup radioGroupId;
    private RadioButton personId;
    private RadioButton messageId;
    private static final String TAG = "SelectActivity";
    private FragmentManager manager;
    private FragmentTransaction fragmentTransaction;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_select);

        frameLayoutId = findViewById(R.id.frame_layout_id);
        radioGroupId = findViewById(R.id.radio_group_id);

        radioGroupId.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {
            @Override
            public void onCheckedChanged(RadioGroup group, int checkedId) {
                switch (checkedId) {
                    case R.id.person_id:
                        manager = getSupportFragmentManager();
                        fragmentTransaction = manager.beginTransaction();
//                        fragmentTransaction.replace(R.id.frame_layout_id,new FristFragment());
                        fragmentTransaction.add(R.id.frame_layout_id,new FristFragment());
                        fragmentTransaction.addToBackStack("11");
                        Log.i(TAG, "onCheckedChanged: "+SelectActivity.class.getName());
                        fragmentTransaction.commit();
                        break;
                    case R.id.message_id:
                        manager = getSupportFragmentManager();
                        manager.popBackStack();
                        SelectActivity.this.fragmentTransaction = manager.beginTransaction();
                        SelectActivity.this.fragmentTransaction.replace(R.id.frame_layout_id,new SecondFragment());
//                        fragmentTransaction.addToBackStack(null);
                        SelectActivity.this.fragmentTransaction.commit();
                        break;
                    default:
                        break;
                }
            }
        });
    }
}
activity的xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    tools:context=".activities.SelectActivity">

    <FrameLayout
        android:id="@+id/frame_layout_id"
        android:layout_weight="9"
        android:layout_width="match_parent"
        android:layout_height="0dp">
    </FrameLayout>

    <RadioGroup
        android:id="@+id/radio_group_id"
        android:layout_weight="1"
        android:orientation="horizontal"
        android:layout_width="match_parent"
        android:layout_height="0dp">

        <RadioButton
            android:layout_weight="1"
            android:id="@+id/person_id"
            android:button="@null"
            android:text="联系人"
            android:gravity="center"
            android:checked="true"
            android:drawableTop="@drawable/select_pserson"
            android:textColor="@drawable/select_text"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            />

        <RadioButton
            android:layout_weight="1"
            android:id="@+id/message_id"
            android:button="@null"
            android:gravity="center"
            android:drawableTop="@drawable/select_message"
            android:textColor="@drawable/select_text"
            android:text="信息"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            />
    </RadioGroup>

</LinearLayout>
说明

android:drawableTop="@drawable/select_message"
android:textColor="@drawable/select_text"
这两个属性,参照下面链接创建
https://blog.youkuaiyun.com/qq_34178710/article/details/91411003
java代码中的fragment,右键创建即可.

打造Android CustomToolBar的高级教程与实践 Android自定义View在移动应用开发中扮演着至关重要的角色。为了打造一个既美观又具备高效交互的用户界面,开发者需要深入理解并掌握自定义View的设计与实现。自定义View不仅能提高应用的可重用性,而且对于满足特定的交互设计需求来说,是一种必要手段。在本章中,我们将探讨自定义View的定义、优势和最佳实践。自定义View是指开发者不满足于系统提供的标准控件,按照特定需求来设计和实现的界面组件。它可以是一个简单的按钮,也可以是复杂的图表控件。通过继承已有的View类,并重写onDraw。 阅读详情

相关推荐

新闻客户端开发:掌握Android关键技术

本文还有配套的精品资源,点击获取 简介:新闻客户端是一款综合性的移动应用,集成了新闻、视频和天气信息,展现了如何利用Android的Fragment技术进行UI设计。该应用使用Fragment实现灵活的界面布局,通过ImageView和图片加载库展示图片,利用ExoPlayer等播放器实现视频功能,采用网络库进行天气信息的获取和JSON解析。本项目涉及Android应用开发...

weixin_42128315的博客 1019

Fragment在低版本中的简单创建使用

本人菜鸟一枚,也就是对刚学的东西有点自己的理解和想法,所以在这里并不能保证我所理解的是正确的,还望各位看官、大牛帮忙指正~ 最近正在学习Android的Fragment,因为我的环境是低版本的,所以在这里要用到v4 support兼容包。 在这里先说明一下,因为Fragment是3.0版本以后才有的,所以在3.0版本之前的低版本中要使用Fragment,就要引入v4 support兼容包。

JamKong 558

【小贪】万字长文介绍因果推断和增益模型

本文首先从一个实例出发阐述了因果性不等于相关性,进而引出因果推断和增益模型。然后简单介绍了因果推断的基础内容,并介绍了主要的三类增益模型:元学习、增益直接建模、表示学习,每一类模型都简要介绍了其经典模型。之后介绍了增益模型的评价指标,包括uplift bins、uplift curve和qini曲线。增益模型实际上是一大类模型框架,本质上可以用传统响应模型或其他机器学习模型嵌入增益模型的框架,但是预测结果并不是一个概率,模型评价方式也有变化。训练样本收集增益模型建模强依赖于ab实验,数据要求很高。

打瞌睡_的博客 2506

Android应用开发进阶与实践

本课程是Android应用开发的进阶篇,以实践为主,学习本课程要求学习者首先掌握Java基础,Android开发基础,此课程在此基础上进一步探索,此课程不适合没有Java和Android基础的人员。

pytorch中dataloader的num_workers参数

结论速递 在Windows系统中,num_workers参数建议设为0,在Linux系统则不需担心。 1 问题描述 在之前的任务超大图上的节点表征学习中,使用PyG库用于数据加载的DataLoader,ClusterLoader等类时,会涉及到参数num_workers。在不同系统环境试验该参数的设定值时,会出现不同的结果 colab(Linux),设为12 有warning message,提示num_workers参数设置不合理,不影响继续运行 /usr/local/lib/python3.7/di

qq_40990057的博客 1万+

Dify安装使用说明

dify可以说是一个功能不错的LLMOps,可以通过dify集中管理模型,可以通过界面创建AI应用,可以上传文档形成知识库,可以创建自定义工具(API),并可以对外提供API。相关功能类似Openai的GPTs或智谱的智能体,其他大厂的大模型也有类似功能,不过貌似只有dify是开源的。这就为个人本地部署AI应用提供了便利。

龙井茶的Sky 1万+

第9天Sqltie数据库

Sqltie数据库SQLite数据库介绍SQL语句复习数据库使用及两个核心类使用事务批量处理数据查询的扩展 (一个查询的案例) SQLite数据库介绍 1.Android 系统中集成的轻量级的数据库 2.特点: 轻量级 只用一个动态的库, 是以单个文件的形式进行存取 跨平台 支持多个操作系统 零配置 无需安装, 直接使用 嵌入式 内嵌到手机中 3.在程序的内部可以通过数据库的名称访问, 其他应...

shuai_ge_feng的博客 1951

从Simulink仿真到DSP28335真机部署:PID闭环控制快速移植指南

本文详细介绍了如何将Simulink中的PID闭环控制算法快速移植到DSP28335嵌入式平台。通过模型与代码映射、浮点与定点数选择、定时器中断配置、物理输出实现以及调试技巧五个关键步骤,帮助工程师高效完成从仿真到真机部署的全过程,特别适合需要实现精确控制的嵌入式开发者。

weixin_42521843的博客 363

Android Studio 1-5 Fragment 基础知识与高级进阶

Android Studio 1-5 Fragment 基础知识与高级进阶 完成一、fragment 给 activty传值1、MainActivty的代码2、MainActivty的布局3 、Frament的布局4、Frament的代码二、fragment 给 fragment 传值1、activty布局与代码2、 fragment布局和代码 一、fragment 给 activty传值 1、M...

v1141261428的博客 498

Zynq UltraScale+网络加速方案:用AXI Ethernet Subsystem实现2.5G吞吐量的配置秘籍

本文详细介绍了在Xilinx Zynq UltraScale+平台上使用AXI Ethernet Subsystem实现2.5Gbps网络吞吐量的配置方法。通过硬件设计优化、Vivado工程配置、Linux驱动调优及性能测试等关键步骤,为工业视觉和5G前传等高速网络应用提供可靠解决方案。

weixin_30485379的博客 615

番外篇 | 复现HIC-YOLOv5,助力小目标物体的检测

在本文中提出了一种改进的YOLOv5算法:HIC-YOLOv5,用于小目标检测,具有更好的性能和较低的计算成本。🌈

小哥谈 1130

Andriod Studio:RecycleView的初识与应用

recycleview的初识与应用 源码链接: https://gitee.com/huo_shui_three_thousand/RecycleView. recycleview应用非常广泛,可以很好的替代ListView,GridView,并且使用起来很灵活多变,这里记录一下和它的第一次打交道——划线和分组 效果如下: 这里是在上一个微信tab页面的基础上,再去做的。所以是Fragment下...

weixin_45710656的博客 340

用 OData V2 元数据驱动表格体验:SAP UI5 Smart Table 全面解析

摘要: Smart Table是SAPUI5中基于OData元数据自动生成表格的控件,支持个性化、排序、过滤等高级功能。文章从九个维度深入解析其工作机制:1)通过元数据和注解自动生成列;2)支持多种表格类型;3)关键属性的静态化特性;4)与其他智能控件的协同;5)导航属性和导出的处理;6)响应式设计;7)个性化配置;8)性能优化策略;9)端到端实现案例。Smart Table通过读取OData元数据自动完成表格渲染,大幅减少开发工作量,特别适合企业级应用开发场景。

2007 年 ~ 2025 年,深耕 SAP 技术 18 年 322

安卓期末课设-缘分星座匹配app,(附下载链接,源码注释详细,含运行截图和apk文件)_android studio 简单的星座app展示

/ 保存选择的星座位置(在GridView当中)@Override// 获取activity传递的数据// 共享参数(利用 SharedPreference 存储数据)//私有@Override// 进行初始化设置// 读取共享参数当中保存的星座名称和logo名称String name = star_pref.getString(“name”, “白羊座”);//参数2:默认值// 依次设置。

2401_84123201的博客 280

199、医疗内窥镜影像:微型镜头与高色彩保真度的ISP定制化方案

医疗内窥镜影像系统开发面临三大光学挑战:衍射极限导致分辨率下降,微型镜头色差严重,镀膜不足引发红外漏光。团队通过定制化ISP方案解决问题:采用分区色差补偿、红外泄露补偿技术,开发12区域分段颜色校正矩阵,并设计自适应伽马曲线。关键经验包括锁定白平衡避免术中偏色,优化FPGA流水线确保30fps流畅度,强调光学标定优先于算法优化。最终方案使DeltaE降至3以下,满足医生对组织颜色细微差异的识别需求,尤其解决了血管与脂肪边界辨识难题。

zzfmlxs的博客 265

ssm框架搭建

这个是一个在idea上成功跑起来的ssm框架项目,保存在这里方便以后使用直接下载

android项目高级UI学习

Android动画之animation-list实现逐帧动画 [Android UI]基础组件的学习——ToggleButton的使用及样式修改

skyang在路上 576

VC中sqlite的使用

在VC中对sqlite的使用,实现数据库大批数据的快速插入,读取数据库中的数据在ListCtrl中显示

android高级框架xUtils之ViewUtils

xUtils 是一个工具类的集合体,其中包含许多实用的Android工具,使用这些工具将给我们的编程带来很多方便

program008的博客 1116

Data-Structures-and-Algorithm-Analysis-in-Java.pdf

作者: Weiss, Mark A. 出版社: Addison Wesley Data Structures and Algorithm Analysis in Java is an “advanced algorithms” book that fits between traditional CS2 and Algorithms Analysis courses. In the old ACM Curriculum Guidelines, this course was known as CS7. This text is for readers who want to learn good programming and algorithm analysis skills simultaneously so that they can develop such programs with the maximum amo...

Android移动应用设计与开发(第2版)——基于Android Studio开发环境 胡敏 黄宏程 李冲编著

Android移动应用设计与开发_基于Android_Studio开发环境_第2版 电子资源不可上传,需要加q+1074476581 麻烦备注好书名哦

weixin_43217921的博客 736

22年Android面经分享,秋招互联网大厂Android面经合集

在大多数情况下,我认为程序员的个人技能成长速度,其实远远大于公司规模或业务的成长速度。所以,跳槽这个行业里成为了一个最常见的一个词汇。但在实际上,跳槽的目的无非是为了涨薪或是职业发展,我也不例外。普通本科毕业后,进了一家互联网公司,这几年里不断在积累经验,最终选择跳到阿里,涨薪了50%,下面分享一下我个人的面试学习资料。

m0_56255097的博客 544

Android Studio 快捷键使用技巧(二)

上一篇Android Studio 使用技巧(一)介绍了一些很实用的技巧,今天再给小伙伴们介绍AS其他的实用技巧 1、Double Shift 快速模糊搜索当前工程任何文件 2、Ctrl+F 当前文件内搜索和替换代码 3、Ctrl+H 搜索工程内任意的代码,还可以指定模块,根据正则匹配搜索 5、Ctrl+Alt+F7 快

nano-11的专栏 702

android高级编程学习笔记-ToDoList第一版

1、 用真机测试apk: 1. 设置手机,勾选USB调试: 各手机设置方法不一样,魅族mx2在设置-->辅助功能-->开发人员工具-->USB调试,将开关打开。 2、安装驱动: 这步折腾了比较久,都没找到能用的驱动,最后发现了个比较简单的办法:在PC端安装个豌豆荚,当手机连接到电脑后,豌豆荚会自动匹配驱动安装, 待安装完后再卸载了豌豆荚。 (可用adb devices查看设备列表,若驱

finewind的专栏 2148

Android开发指南--0 总览

无意间发现一个网站,主打IOS方面的教程,然而作为一个Android开发者,我就找了下网站里有没有Android的教程,还真有,这里就翻译一下。 Android 开发指南想用 Java 来开发 Android APP 吗?

他叫自己Mr.张 1276

《Android App开发从入门到精通》书籍赠送

感谢作者为广大 Android 开发者写了一本好书,更感谢作者赞助 5本给公众号「code小生」的读者,谢谢大家的关注。书籍内容简介本书使用 Android Studio...

code小生 3145

Android 常用开发功能 博客导航

转载地址:http://blog.youkuaiyun.com/ciqing123/article/details/52931663?locationNum=16&fps=1 简介:第一次在优快云上发表博客,将自己关注或者看过的一些博客整理了一下,其中包含了鸿神和郭神的全部博客,包括两位大神微信公众号推荐的博客,另外还有一些安卓开发社区的博客,后续每天都会更新这个导航,希望这个博客导航能够给小伙伴

JLow 3673

android 已经弃用的方法还有必要学吗_Android开发:腾讯第三面,惨挂…

大家应该看过很多分享面试成功的经验,但根据幸存者偏差的理论,也许多看看别人面试失败在哪里,对自己才更有帮助。第一次看我文章的小伙伴可以关注一下我,顺便关注一下我的专栏:Android高级开发架构,每天更新各种技术干货,分享更多最热程序员圈内事。Android高级开发架构​zhuanlan.zhihu.com最近跟一个读者“MuMu”聊天,他准备了3个月,刚刚参加了腾讯微视的第三面,视频面,嗯,挂了...

weixin_39763683的博客 176
上一篇: Andriod studio 学习 之 Fragment基础知识
下一篇: Andriod studio 学习 之 ViewPager的介绍和使用
Young_cloud
博客等级 码龄7年 18粉丝 37原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值