Git Product home page Git Product logo

Comments (6)

KingJA avatar KingJA commented on June 17, 2024

@liguangze 你好,如果你在Activity中保留,则register标题栏,搜索栏以外的布局即可,如果是在Fragment中保留,则参考Demo中的KeepTitle实例。

from loadsir.

liguangze avatar liguangze commented on June 17, 2024

不好意思,我是在activity中。 register是什么意思,我是直接用的 loadService.showCallback(EmptyCallback.class)方法

from loadsir.

KingJA avatar KingJA commented on June 17, 2024

@liguangze

loadService = loadSir.register(contentView, new Callback.OnReloadListener() {
@OverRide
public void onReload(View v) {
loadService.showCallback(LoadingCallback.class);
// 重新加载逻辑
}
});

contentView便是你布局里想要保留标题栏,搜索栏以外的内容布局。

from loadsir.

liguangze avatar liguangze commented on June 17, 2024

我明白你的意思了,contentView就是我想展示的布局了,但是contentView还有自己写上标题栏,搜索栏等,这样感觉很费事,有没有别的好办法,把空的布局弄成透明的,这样可以复用,因为标题栏上的文字,每个界面的标题都是不一样的,每次都要自己写一个contentView,这样子太麻烦了,或者每次都要找一次控件,有没有别的解决办法呢

from loadsir.

KingJA avatar KingJA commented on June 17, 2024

@liguangze 每次都重复操作是不怎么优雅,你可以抽取出BaseTitleActivity,可以参考我的案例。https://github.com/KingJA/LoadSirBestPractice/blob/master/app/src/main/java/sample/kingja/loadsirbestpractice/base/BaseTitleActivity.java

from loadsir.

liguangze avatar liguangze commented on June 17, 2024

@KingJA 谢谢

from loadsir.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.