Способ один:
Через library сгенерировать har-пакет, добавить har-пакет в папку libs
В entry в Gradle добавить следующий код:
implementation fileTree(dir: 'libs', include: ['*.jar', '*.har'])
Способ два:
allprojects{
repositories{
mavenCentral()
}
}
implementation 'io.openharmony.tpc.thirdlib:bottomDialog-library:1.0.0'
public class BottomDialog extends BaseOsDiaLog { private Context mContext;
public BottomDialog(Context context) {
super(context);
this.mContext = context;
}
@Override
protected int getDiaLogLayout() {
return ResourceTable.Layout_dialog_bottom_share;
}
@Override
protected int getAlignment() {
return TextAlignment.BOTTOM;
}
@Override
protected DiaLogSize getDiaLogSize() {
return new DiaLogSize(DisplayUtils.getWindowWidth(mContext), 300);
}
@Override
protected void onCreateDiaLog(Component component) {
super.onCreateDiaLog(component);
// Логическая обработка
}
public static void showBottomDialog(Context context) {
new BottomDialog(context)
.setAutoClosable(true)
.show();
}
}
BottomDialog.showBottomDialog(this);
Copyright 2016 shaohui10086
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
You can comment after Login
Inappropriate content may be displayed here and will not be shown on the page. You can check and modify it through the relevant editing function
If you confirm that the content does not involve inappropriate language/advertisement redirection/violence/vulgar pornography/infringement/piracy/false/insignificant or illegal content related to national laws and regulations, you can click submit to make an appeal, and we will handle it as soon as possible.
Comments ( 0 )