import{_ as s,o as n,c as a,e as l}from"./app--CGKFO0X.js";const e={},o=l(`<h1 id="looking-toward-the-future" tabindex="-1"><a class="header-anchor" href="#looking-toward-the-future" aria-hidden="true">#</a> Looking Toward the Future</h1><blockquote><p>The future is bright and uncertain, let us look forward to the future development space of <code>Hikage</code>.</p></blockquote><h2 id="future-plans" tabindex="-1"><a class="header-anchor" href="#future-plans" aria-hidden="true">#</a> Future Plans</h2><blockquote><p>Features that <code>Hikage</code> may add later are included here.</p></blockquote><h3 id="process-attributeset" tabindex="-1"><a class="header-anchor" href="#process-attributeset" aria-hidden="true">#</a> Process AttributeSet</h3><p><code>Hikage</code> will support processing <code>AttributeSet</code> in the future to interface with the original XML properties to implement the takeover of some third-party components that are not open to customization of layout properties in the code.</p><p><code>Hikage</code> currently supports automated creation of <code>XmlBlock</code>, but does not support the direct processing of customized <code>AttributeSet</code>. Because of its historical problems and high processing difficulty, it may be considered whether to continue to improve this function in later stages.</p><blockquote><p>The following example</p></blockquote><div class="language-kotlin line-numbers-mode" data-ext="kt"><pre class="shiki github-dark-dimmed" style="background-color:#22272e;" tabindex="0"><code><span class="line"><span style="color:#DCBDFB;">TextView</span><span style="color:#ADBAC7;">(</span></span>
<span class="line"><span style="color:#ADBAC7;">    id </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> </span><span style="color:#96D0FF;">&quot;text_view&quot;</span><span style="color:#ADBAC7;">,</span></span>
<span class="line"><span style="color:#ADBAC7;">    </span><span style="color:#768390;">// Attributes passed through AttributeSet.</span></span>
<span class="line"><span style="color:#ADBAC7;">    attrs </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> {</span></span>
<span class="line"><span style="color:#ADBAC7;">        </span><span style="color:#DCBDFB;">namespace</span><span style="color:#ADBAC7;">(</span><span style="color:#96D0FF;">&quot;android&quot;</span><span style="color:#ADBAC7;">) {</span></span>
<span class="line"><span style="color:#ADBAC7;">            </span><span style="color:#F47067;">set</span><span style="color:#ADBAC7;">(</span><span style="color:#96D0FF;">&quot;text&quot;</span><span style="color:#ADBAC7;">, </span><span style="color:#96D0FF;">&quot;Hello, World!&quot;</span><span style="color:#ADBAC7;">)</span></span>
<span class="line"><span style="color:#ADBAC7;">            </span><span style="color:#F47067;">set</span><span style="color:#ADBAC7;">(</span><span style="color:#96D0FF;">&quot;textSize&quot;</span><span style="color:#ADBAC7;">, </span><span style="color:#96D0FF;">&quot;16sp&quot;</span><span style="color:#ADBAC7;">)</span></span>
<span class="line"><span style="color:#ADBAC7;">            </span><span style="color:#F47067;">set</span><span style="color:#ADBAC7;">(</span><span style="color:#96D0FF;">&quot;gravity&quot;</span><span style="color:#ADBAC7;">, </span><span style="color:#96D0FF;">&quot;center&quot;</span><span style="color:#ADBAC7;">)</span></span>
<span class="line"><span style="color:#ADBAC7;">        }</span></span>
<span class="line"><span style="color:#ADBAC7;">    }</span></span>
<span class="line"><span style="color:#ADBAC7;">) {</span></span>
<span class="line"><span style="color:#ADBAC7;">    </span><span style="color:#768390;">// Attributes passed through code.</span></span>
<span class="line"><span style="color:#ADBAC7;">    text </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> </span><span style="color:#96D0FF;">&quot;Hello, World!&quot;</span></span>
<span class="line"><span style="color:#ADBAC7;">    textSize </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> </span><span style="color:#6CB6FF;">16f</span></span>
<span class="line"><span style="color:#ADBAC7;">    gravity </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> Gravity.CENTER</span></span>
<span class="line"><span style="color:#ADBAC7;">}</span></span>
<span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><h3 id="generate-components-id" tabindex="-1"><a class="header-anchor" href="#generate-components-id" aria-hidden="true">#</a> Generate Components ID</h3><p><code>Hikage</code> may support the direct call function to generate component IDs customized with strings as required in the future.</p><blockquote><p>The following example</p></blockquote><div class="language-kotlin line-numbers-mode" data-ext="kt"><pre class="shiki github-dark-dimmed" style="background-color:#22272e;" tabindex="0"><code><span class="line"><span style="color:#F47067;">object</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">MyLayout</span><span style="color:#ADBAC7;"> : </span><span style="color:#F69D50;">HikageBuilder</span><span style="color:#ADBAC7;"> {</span></span>
<span class="line"></span>
<span class="line"><span style="color:#ADBAC7;">    </span><span style="color:#F47067;">override</span><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">fun</span><span style="color:#ADBAC7;"> </span><span style="color:#DCBDFB;">build</span><span style="color:#ADBAC7;">() </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> </span><span style="color:#DCBDFB;">Hikageable</span><span style="color:#ADBAC7;">(context) {</span></span>
<span class="line"><span style="color:#ADBAC7;">        </span><span style="color:#DCBDFB;">LinearLayout</span><span style="color:#ADBAC7;">(</span></span>
<span class="line"><span style="color:#ADBAC7;">            id </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> </span><span style="color:#96D0FF;">&quot;lin_layout&quot;</span><span style="color:#ADBAC7;">,</span></span>
<span class="line"><span style="color:#ADBAC7;">            lparams </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> </span><span style="color:#DCBDFB;">LayoutParams</span><span style="color:#ADBAC7;">(matchParent </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> </span><span style="color:#6CB6FF;">true</span><span style="color:#ADBAC7;">),</span></span>
<span class="line"><span style="color:#ADBAC7;">            init </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> {</span></span>
<span class="line"><span style="color:#ADBAC7;">                orientation </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> LinearLayout.VERTICAL</span></span>
<span class="line"><span style="color:#ADBAC7;">                gravity </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> Gravity.CENTER</span></span>
<span class="line"><span style="color:#ADBAC7;">            }</span></span>
<span class="line"><span style="color:#ADBAC7;">        ) {</span></span>
<span class="line"><span style="color:#ADBAC7;">            </span><span style="color:#DCBDFB;">TextView</span><span style="color:#ADBAC7;">(id </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> </span><span style="color:#96D0FF;">&quot;text_view&quot;</span><span style="color:#ADBAC7;">) {</span></span>
<span class="line"><span style="color:#ADBAC7;">                text </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> </span><span style="color:#96D0FF;">&quot;Hello, World!&quot;</span></span>
<span class="line"><span style="color:#ADBAC7;">                textSize </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> </span><span style="color:#6CB6FF;">16f</span></span>
<span class="line"><span style="color:#ADBAC7;">                gravity </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> Gravity.CENTER</span></span>
<span class="line"><span style="color:#ADBAC7;">            }</span></span>
<span class="line"><span style="color:#ADBAC7;">        }</span></span>
<span class="line"><span style="color:#ADBAC7;">    }</span></span>
<span class="line"><span style="color:#ADBAC7;">}</span></span>
<span class="line"></span>
<span class="line"><span style="color:#F47067;">val</span><span style="color:#ADBAC7;"> context: </span><span style="color:#F69D50;">Context</span></span>
<span class="line"><span style="color:#768390;">// Create TypedHikage.</span></span>
<span class="line"><span style="color:#F47067;">val</span><span style="color:#ADBAC7;"> myLayout </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> MyLayout.</span><span style="color:#DCBDFB;">asTyped</span><span style="color:#ADBAC7;">().</span><span style="color:#DCBDFB;">build</span><span style="color:#ADBAC7;">().</span><span style="color:#DCBDFB;">create</span><span style="color:#ADBAC7;">(context)</span></span>
<span class="line"><span style="color:#768390;">// Or, use lazy init.</span></span>
<span class="line"><span style="color:#F47067;">val</span><span style="color:#ADBAC7;"> myLayout </span><span style="color:#F47067;">by</span><span style="color:#ADBAC7;"> context.</span><span style="color:#DCBDFB;">lazyTypedHikage</span><span style="color:#ADBAC7;">(MyLayout)</span></span>
<span class="line"><span style="color:#768390;">// Directly call the ID generated from the string.</span></span>
<span class="line"><span style="color:#F47067;">val</span><span style="color:#ADBAC7;"> linLayout </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> myLayout.linLayout</span></span>
<span class="line"><span style="color:#F47067;">val</span><span style="color:#ADBAC7;"> textView </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> myLayout.textView</span></span>
<span class="line"><span style="color:#768390;">// Get the root layout, i.e. LinearLayout.</span></span>
<span class="line"><span style="color:#F47067;">val</span><span style="color:#ADBAC7;"> root </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> myLayout.root</span></span>
<span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div>`,13),p=[o];function t(r,c){return n(),a("div",null,p)}const d=s(e,[["render",t],["__file","future.html.vue"]]);export{d as default};
